-
Notifications
You must be signed in to change notification settings - Fork 30
220 lines (191 loc) · 5.83 KB
/
Copy pathtestsuite.yml
File metadata and controls
220 lines (191 loc) · 5.83 KB
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
name: testsuite
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
types: [ opened, synchronize, reopened, edited, ready_for_review ]
jobs:
#
# A quick and cheap test first before running other jobs
#
ubuntu:
env:
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v6
- run: openssl version
- run: perl -V
- name: uses install-with-cpm
uses: perl-actions/install-with-cpm@v1
with:
cpanfile: "cpanfile"
- name: Makefile.PL
run: perl -I$(pwd) Makefile.PL
- run: make && ( make test || prove -wbvm t/*.t )
openssl-matrix:
env:
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1
runs-on: ubuntu-latest
needs: [ubuntu]
name: "OpenSSL ${{ matrix.os-version }}"
strategy:
fail-fast: false
matrix:
os-version:
# - debian:buster # OpenSSL 1.1.1
- debian:bullseye # OpenSSL 1.1.1
- debian:bookworm # OpenSSL 3.0.x
- debian:trixie # OpenSSL 3.4.x (Debian 13)
- almalinux:9 # OpenSSL with new crypto policies (RHEL-compatible)
container: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v6
- name: Install dependencies using apt-get
if: ${{ startsWith(matrix.os-version, 'debian:') }}
run: |
apt-get update
apt-get install -y openssl perl make gcc libssl-dev sudo curl
- name: Install dependencies using yum
if: ${{ matrix.os-version == 'almalinux:9' }}
run: |
yum install --skip-broken -y openssl perl make gcc openssl-devel sudo curl
- run: openssl version
- run: perl -V
- name: uses install-with-cpm
uses: perl-actions/install-with-cpm@v1
with:
cpanfile: "cpanfile"
- name: Makefile.PL
run: perl -I$(pwd) Makefile.PL
- run: make && prove -wbvm t/*.t
#
# List of Perl Versions available
#
perl-versions:
runs-on: ubuntu-latest
needs: [openssl-matrix]
name: List Perl versions
outputs:
perl-versions: ${{ steps.action.outputs.perl-versions }}
steps:
- id: action
uses: perl-actions/perl-versions@v2
with:
since-perl: v5.10
with-devel: true
#
# The Perl matrix on linux
#
perl:
env:
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1
runs-on: ubuntu-latest
needs: [openssl-matrix,perl-versions]
name: "Perl ${{ matrix.perl-version }}"
strategy:
fail-fast: false
matrix:
perl-version: ${{ fromJson (needs.perl-versions.outputs.perl-versions) }}
container: perldocker/perl-tester:${{ matrix.perl-version }}
steps:
- uses: actions/checkout@v6
- run: openssl version
- run: perl -V
- name: Deps for testing
run: |
cpanm --notest Crypt::OpenSSL::Random Crypt::OpenSSL::Guess Test::CPAN::Meta Perl::MinimumVersion Test::Pod::Coverage Test::Pod Test::MinimumVersion Crypt::OpenSSL::Bignum ||:
cpanm --notest Crypt::OpenSSL::Random Crypt::OpenSSL::Guess Test::CPAN::Meta Perl::MinimumVersion Test::Pod::Coverage Test::Pod Test::MinimumVersion Crypt::OpenSSL::Bignum
# not available < 5.12
cpanm --notest Test::Kwalitee ||:
- run: perl Makefile.PL
- run: make && ( make test || prove -wbvm t/*.t )
#
# Windows
#
windows:
env:
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 0
AUTOMATED_TESTING: 1
RELEASE_TESTING: 0
needs: [openssl-matrix, perl-versions]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
perl-version: [latest]
steps:
- uses: actions/checkout@v6
- name: Set up Perl
run: |
# skip installing perl if it is already installed.
if (!(Test-Path "C:\strawberry\perl\bin")) {
choco install strawberryperl
}
echo @"
C:\strawberry\c\bin
C:\strawberry\perl\site\bin
C:\strawberry\perl\bin
"@ |
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: openssl version
- run: perl -V
- name: Deps for testing
run: cpanm --notest Crypt::OpenSSL::Random Crypt::OpenSSL::Guess
- run: perl Makefile.PL
- run: make && ( make test || prove -wbvm t/*.t )
#
# macOS — covers LibreSSL (system default) and Homebrew OpenSSL 3.x
#
macos:
env:
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 0
AUTOMATED_TESTING: 1
RELEASE_TESTING: 0
needs: [ubuntu]
runs-on: macos-latest
name: "macOS - ${{ matrix.ssl }}"
strategy:
fail-fast: false
matrix:
include:
- ssl: system LibreSSL
openssl_prefix: ""
- ssl: Homebrew OpenSSL
openssl_prefix: HOMEBREW
steps:
- uses: actions/checkout@v6
- name: Install Homebrew OpenSSL
if: ${{ matrix.openssl_prefix == 'HOMEBREW' }}
run: brew install openssl@3
- name: Set OPENSSL_PREFIX for Homebrew OpenSSL
if: ${{ matrix.openssl_prefix == 'HOMEBREW' }}
run: echo "OPENSSL_PREFIX=$(brew --prefix openssl@3)" >> "$GITHUB_ENV"
- run: openssl version
- run: perl -V
- name: Install cpanm
run: |
curl -L https://cpanmin.us/ -o cpanm
chmod +x cpanm
sudo mv cpanm /usr/local/bin/
- name: Install dependencies
run: cpanm --notest Crypt::OpenSSL::Guess Crypt::OpenSSL::Random Crypt::OpenSSL::Bignum
- name: Makefile.PL
run: perl Makefile.PL
- run: make && ( make test || prove -wbvm t/*.t )