Skip to content

Commit 9b46c6a

Browse files
committed
.github/workflows/test.yml: use GitHub Actions
.github/workflows/test.yml is copied from current master's (last update by commit 0a2e8c6), and then the LibreSSL versions to run test with are adjusted for Ruby/OpenSSL 2.1.
1 parent 0b5ae0f commit 9b46c6a

File tree

3 files changed

+120
-65
lines changed

3 files changed

+120
-65
lines changed

.github/workflows/test.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
name: >-
8+
${{ matrix.os }} ${{ matrix.ruby }}
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ ubuntu-latest, macos-latest ]
14+
ruby: [ head, 2.7, 2.6, 2.5, 2.4, 2.3 ]
15+
steps:
16+
- name: repo checkout
17+
uses: actions/checkout@v2
18+
19+
- name: load ruby
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
ruby-version: ${{ matrix.ruby }}
23+
24+
- name: depends
25+
run: rake install_dependencies
26+
27+
- name: compile
28+
run: rake compile -- --enable-debug
29+
30+
- name: test
31+
run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1
32+
33+
test-windows:
34+
name: >-
35+
${{ matrix.os }} ${{ matrix.ruby }}
36+
runs-on: ${{ matrix.os }}
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
os: [ windows-latest ]
41+
ruby: [ mswin, mingw, 2.7, 2.6, 2.5, 2.4, 2.3 ]
42+
steps:
43+
- name: repo checkout
44+
uses: actions/checkout@v2
45+
46+
- name: load ruby, install/update gcc, install openssl
47+
uses: MSP-Greg/setup-ruby-pkgs@v1
48+
with:
49+
ruby-version: ${{ matrix.ruby }}
50+
mingw: _upgrade_ openssl
51+
52+
- name: depends
53+
run: rake install_dependencies
54+
55+
# SSL_DIR is set as needed by MSP-Greg/setup-ruby-pkgs
56+
# only used with mswin
57+
- name: compile
58+
run: rake compile -- --enable-debug $env:SSL_DIR
59+
60+
- name: test
61+
run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1
62+
63+
test-openssls:
64+
name: >-
65+
${{ matrix.openssl }}
66+
runs-on: ${{ matrix.os }}
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
os: [ ubuntu-latest ]
71+
ruby: [ 2.7 ]
72+
openssl:
73+
- openssl-1.0.1u # EOL
74+
- openssl-1.0.2u # EOL
75+
- openssl-1.1.0l # EOL
76+
- openssl-1.1.1g
77+
- libressl-2.5.5 # EOL
78+
- libressl-3.1.3
79+
- libressl-3.2.0
80+
steps:
81+
- name: repo checkout
82+
uses: actions/checkout@v2
83+
84+
- name: prepare openssl
85+
run: |
86+
mkdir -p tmp/build-openssl && cd tmp/build-openssl
87+
case ${{ matrix.openssl }} in
88+
openssl-*)
89+
curl -OL https://ftp.openssl.org/source/${{ matrix.openssl }}.tar.gz
90+
tar xf ${{ matrix.openssl }}.tar.gz && cd ${{ matrix.openssl }}
91+
# shared is required for 1.0.x.
92+
./Configure --prefix=$HOME/.openssl/${{ matrix.openssl }} \
93+
shared linux-x86_64
94+
make depend
95+
;;
96+
libressl-*)
97+
curl -OL https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${{ matrix.openssl }}.tar.gz
98+
tar xf ${{ matrix.openssl }}.tar.gz && cd ${{ matrix.openssl }}
99+
./configure --prefix=$HOME/.openssl/${{ matrix.openssl }}
100+
;;
101+
*)
102+
false
103+
;;
104+
esac
105+
make -j4
106+
make install_sw
107+
108+
- name: load ruby
109+
uses: ruby/setup-ruby@v1
110+
with:
111+
ruby-version: ${{ matrix.ruby }}
112+
113+
- name: depends
114+
run: rake install_dependencies
115+
116+
- name: compile
117+
run: rake compile -- --enable-debug --with-openssl-dir=$HOME/.openssl/${{ matrix.openssl }}
118+
119+
- name: test
120+
run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1

.travis.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

appveyor.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)