-
Notifications
You must be signed in to change notification settings - Fork 45
324 lines (287 loc) · 9.32 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# The CI workflow tests Net-SSLeay against the following setups:
#
# - OS: Ubuntu 20.04
# - Perl: the latest patch release of every minor release since 5.8
# - libssl: the latest patch release of every minor release between:
# - OpenSSL: 0.9.8 and 3.2
# - LibreSSL: 2.2 and 3.8
#
# - Non-x86 architectures on Alpine Linux and Ubuntu
#
# - Various BSDs with different LibreSSL and OpenSSL versions
#
# - Windows with Cygwin
name: CI
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
env:
PERL_MM_USE_DEFAULT: 1
RELEASE_TESTING: 0
jobs:
ubuntu-openssl:
name: 'Ubuntu 20.04 (Perl ${{ matrix.perl }}, OpenSSL ${{ matrix.openssl }})'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
perl:
- '5.36'
- '5.34'
- '5.32'
- '5.30'
- '5.28'
- '5.26'
- '5.24'
- '5.22'
- '5.20'
- '5.18'
- '5.16'
- '5.14'
- '5.12'
- '5.10'
- '5.8'
openssl:
- '3.2.0'
- '3.1.4'
- '3.0.12'
- '1.1.1w'
- '1.1.0l'
- '1.0.2u'
- '1.0.1u'
- '1.0.0t'
- '0.9.8zh'
steps:
- name: Check out
uses: actions/checkout@v3
- name: Install Perl ${{ matrix.perl }}
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- name: 'Install OpenSSL ${{ matrix.openssl }}'
run: |
os="ubuntu-20.04"
ver="openssl-${{ matrix.openssl }}"
curl -L "https://github.com/p5-net-ssleay/ci-libssl/releases/download/$ver/$ver-$os.tar.xz" \
| tar -C $HOME -Jx
- name: Install dependencies
run: cpanm --quiet --installdeps --notest .
- name: Create makefile
run: |
LD_LIBRARY_PATH="$HOME/libssl/lib" \
OPENSSL_PREFIX="$HOME/libssl" \
perl Makefile.PL
- name: Build
run: |
LD_LIBRARY_PATH="$HOME/libssl/lib" \
make
- name: Run test suite
run: |
LD_LIBRARY_PATH="$HOME/libssl/lib" \
make test
ubuntu-libressl:
name: 'Ubuntu 20.04 (Perl ${{ matrix.perl }}, LibreSSL ${{ matrix.libressl }})'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
perl:
- '5.36'
- '5.34'
- '5.32'
- '5.30'
- '5.28'
- '5.26'
- '5.24'
- '5.22'
- '5.20'
- '5.18'
- '5.16'
- '5.14'
- '5.12'
- '5.10'
- '5.8'
libressl:
- '3.8.2'
- '3.7.3'
- '3.6.3'
- '3.5.4'
- '3.4.3'
- '3.3.6'
- '3.2.7'
- '3.1.5'
- '3.0.2'
- '2.9.2'
- '2.8.3'
- '2.7.5'
- '2.6.5'
- '2.5.5'
- '2.4.5'
- '2.3.10'
- '2.2.9'
steps:
- name: Check out
uses: actions/checkout@v3
- name: Install Perl ${{ matrix.perl }}
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- name: 'Install LibreSSL ${{ matrix.libressl }}'
run: |
os="ubuntu-20.04"
ver="libressl-${{ matrix.libressl }}"
curl -L "https://github.com/p5-net-ssleay/ci-libssl/releases/download/$ver/$ver-$os.tar.xz" \
| tar -C $HOME -Jx
- name: Install dependencies
run: cpanm --quiet --installdeps --notest .
- name: Create makefile
run: |
LD_LIBRARY_PATH="$HOME/libssl/lib" \
OPENSSL_PREFIX="$HOME/libssl" \
perl Makefile.PL
- name: Build
run: |
LD_LIBRARY_PATH="$HOME/libssl/lib" \
make
- name: Run test suite
run: |
LD_LIBRARY_PATH="$HOME/libssl/lib" \
make test
non_x86_alpine:
name: "${{ matrix.platform }}/Alpine/${{ matrix.alpine_version }} (${{ matrix.package }})"
runs-on: ubuntu-latest
strategy:
matrix:
package:
- openssl
- libressl
platform:
- i386
- s390x
- arm32v6
- arm32v7
- arm64v8
alpine_version:
- '3.18'
- '3.17'
- '3.16'
- '3.15'
exclude:
- package: libressl
platform: s390x
alpine_version: '3.18'
steps:
- uses: actions/checkout@main
with:
submodules: recursive
- name: Get the qemu container
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# NB: “openssl” is correct, even for LibreSSL:
- name: Run tests on ${{ matrix.platform }}
run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ matrix.platform }}/alpine:${{ matrix.alpine_version}} sh -c "apk add perl-dev perl-app-cpanminus make gcc musl-dev zlib-dev ${{ matrix.package }}-dev openssl && perl -V && cd /host && cpanm --verbose --notest --installdeps . && perl Makefile.PL && make test"
non_x86_ubuntu:
name: "${{ matrix.platform }}/Ubuntu"
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- i386
- s390x
- arm32v7
- arm64v8
steps:
- uses: actions/checkout@main
with:
submodules: recursive
- name: Get the qemu container
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Run tests on ${{ matrix.platform }}
run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ matrix.platform }}/ubuntu bash -c "apt update && apt install -y cpanminus make gcc openssl libssl-dev zlib1g-dev && perl -V && cd /host && cpanm --notest --verbose --installdeps . || find /root/.cpanm/work/ -type f | xargs cat; perl Makefile.PL && make test"
BSDs:
runs-on: macos-12
name: ${{ matrix.os.pretty_name }} ${{ matrix.os.version }}
strategy:
fail-fast: false
matrix:
os:
- name: freebsd
pretty_name: FreeBSD (OpenSSL default)
version: '13.2'
pkginstall: pkg install -y p5-ExtUtils-MakeMaker p5-App-cpanminus
- name: freebsd
pretty_name: FreeBSD (OpenSSL 3.1)
version: '13.2'
pkginstall: pkg install -y p5-ExtUtils-MakeMaker p5-App-cpanminus openssl31
- name: freebsd
pretty_name: FreeBSD (OpenSSL 3.2)
version: '13.2'
pkginstall: pkg install -y p5-ExtUtils-MakeMaker p5-App-cpanminus openssl32
- name: freebsd
pretty_name: FreeBSD (LibreSSL)
version: '13.2'
pkginstall: pkg install -y p5-ExtUtils-MakeMaker p5-App-cpanminus libressl libressl-devel
- name: openbsd
pretty_name: OpenBSD
version: '7.3'
pkginstall: pkg_add curl
- name: openbsd
pretty_name: OpenBSD
version: '7.2'
pkginstall: pkg_add curl
- name: netbsd
pretty_name: NetBSD
version: '9.3'
pkginstall: /usr/sbin/pkg_add http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/9.3/All/p5-App-cpanminus
steps:
- uses: actions/checkout@main
with:
submodules: recursive
- name: Test on ${{ matrix.os.name }}
uses: cross-platform-actions/action@master
env:
AUTOMATED_TESTING: 1
with:
operating_system: ${{ matrix.os.name }}
version: ${{ matrix.os.version }}
shell: bash
# Makefile.PL interacts with the TTY, which tricks up the runner.
# Thus the piped “echo n”.
#
run: |
sudo ${{ matrix.os.pkginstall }};
which cpanm || curl https://cpanmin.us | perl - --sudo App::cpanminus
cpanm --verbose --notest --installdeps --with-configure .;
echo n | perl Makefile.PL;
make test;
cygwin:
runs-on: windows-latest
steps:
- name: Set up Cygwin
uses: cygwin/cygwin-install-action@master
with:
platform: x86_64
packages: perl_base perl-ExtUtils-MakeMaker make gcc-g++ libcrypt-devel libssl-devel curl bash
- uses: actions/checkout@main
with:
submodules: recursive
- run: perl -V
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
- name: Install cpanm
run: curl https://cpanmin.us | perl - App::cpanminus
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
- name: Install Dependencies
run: cd $GITHUB_WORKSPACE; cpanm --verbose --notest --installdeps --with-configure .
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
- name: perl Makefile.PL
run: cd $GITHUB_WORKSPACE; perl Makefile.PL
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
- name: make
run: cd $GITHUB_WORKSPACE; make -j3 -j3
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
- name: make test
run: cd $GITHUB_WORKSPACE; make test
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'