-
Notifications
You must be signed in to change notification settings - Fork 94
418 lines (372 loc) · 11.8 KB
/
build.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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
---
name: build
on:
pull_request:
push:
branches:
- master
schedule:
- cron: "0 0 * * 0"
jobs:
linux-build:
name: Build on ${{ matrix.name }}
runs-on: ubuntu-latest
env:
RPM_PKG_MGR: dnf
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
strategy:
matrix:
include:
- container: ubuntu:16.04
name: Ubuntu 16.04 LTS (Xenial Xerus)
- container: ubuntu:18.04
name: Ubuntu 18.04 LTS (Bionic Beaver)
- container: ubuntu:20.04
name: Ubuntu 20.04 LTS (Focal Fossa)
- container: ubuntu:22.04
name: Ubuntu 22.04 LTS (Jammy Jellyfish)
- container: ubuntu:23.04
name: Ubuntu 23.04 (Lunar Lobster)
- container: ubuntu:23.10
name: Ubuntu 23.10 (Mantic Minotaur)
- container: ubuntu:24.04
name: Ubuntu 24.04 LTS (Noble Numbat)
- container: debian:buster
name: Debian 10 (Buster)
- container: debian:bullseye
name: Debian 11 (Bullseye)
- container: debian:bookworm
name: Debian 12 (Bookworm)
- container: fedora:34
name: Fedora 34
- container: fedora:35
name: Fedora 35
- container: fedora:36
name: Fedora 36
- container: fedora:37
name: Fedora 37
- container: fedora:38
name: Fedora 38
- container: fedora:39
name: Fedora 39
- container: quay.io/centos/centos:centos7
name: CentOS 7
- container: quay.io/centos/centos:stream8
name: CentOS Stream 8
- container: quay.io/centos/centos:stream9
name: CentOS Stream 9
- container: alpine:3.17
name: Alpine Linux 3.17
fail-fast: false
container:
image: ${{ matrix.container }}
steps:
- name: Detect OS release
run: |
. /etc/os-release && echo "OS_RELEASE_ID=$ID" >> $GITHUB_ENV
. /etc/os-release && echo "OS_RELEASE_VERSION=$VERSION_ID" >> $GITHUB_ENV
. /etc/os-release && echo "OS_RELEASE_VERSION_MAJOR=${VERSION_ID%%.*}" >> $GITHUB_ENV
- name: Use archived repositories on EL 8
run: |
# CentOS 8 reached EOL 31 December 2021.
# The repositories configured in the container are not working any more.
# Use vault.centos.org package archive instead.
find /etc/yum.repos.d/ -type f -exec sed -i 's/mirrorlist=/#mirrorlist=/g' {} +
find /etc/yum.repos.d/ -type f -exec sed -i 's/#baseurl=/baseurl=/g' {} +
find /etc/yum.repos.d/ -type f -exec sed -i 's/mirror.centos.org/vault.centos.org/g' {} +
if: |
env.OS_RELEASE_ID == 'centos' && env.OS_RELEASE_VERSION == '8'
- name: Adjust package manager for EL 7
run: echo "RPM_PKG_MGR=yum" >> $GITHUB_ENV
if: |
env.OS_RELEASE_ID == 'centos' && env.OS_RELEASE_VERSION == '7'
- name: Add dnf plugins for recent EL
run: ${{env.RPM_PKG_MGR}} install -y dnf-plugins-core
if: |
env.OS_RELEASE_ID == 'centos' && env.RPM_PKG_MGR == 'dnf'
- name: Add powertools repo for EL 8
run: ${{env.RPM_PKG_MGR}} config-manager --set-enabled powertools
if: |
env.OS_RELEASE_ID == 'centos' && env.OS_RELEASE_VERSION == '8'
- name: Add CRB repo for EL 9
run: ${{env.RPM_PKG_MGR}} config-manager --set-enabled crb
if: |
env.OS_RELEASE_ID == 'centos' && env.OS_RELEASE_VERSION == '9'
- name: Add EPEL repo for EL linux
run: ${{env.RPM_PKG_MGR}} -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-${{env.OS_RELEASE_VERSION_MAJOR}}.noarch.rpm
if: |
env.OS_RELEASE_ID == 'centos'
- name: Update Debian OS
run: |
apt-get update -q -y
apt-get upgrade -q -y
if: |
env.OS_RELEASE_ID == 'debian' || env.OS_RELEASE_ID == 'ubuntu'
- name: Update Redhat OS
run: ${{env.RPM_PKG_MGR}} upgrade -y
if: |
env.OS_RELEASE_ID == 'centos' || env.OS_RELEASE_ID == 'fedora'
- name: Update Alpine Linux
run: |
apk update
apk upgrade
if: |
env.OS_RELEASE_ID == 'alpine'
- name: Install perl requirements for Debian systems
run: >
apt-get install -q -y
libarchive-zip-perl
libcgi-pm-perl
libdata-dump-perl
libdate-calc-perl
libdate-manip-perl
libdatetime-format-iso8601-perl
libdatetime-format-sqlite-perl
libdatetime-format-strptime-perl
libdatetime-perl
libdatetime-timezone-perl
libdbd-sqlite3-perl
libdbi-perl
libfile-chdir-perl
libfile-homedir-perl
libfile-slurp-perl
libfile-which-perl
libhtml-parser-perl
libhtml-tree-perl
libhttp-cache-transparent-perl
libhttp-cookies-perl
libhttp-message-perl
libio-stringy-perl
libjson-perl
libjson-xs-perl
liblingua-preferred-perl
liblinux-dvb-perl
liblist-moreutils-perl
liblog-tracemessages-perl
liblwp-protocol-https-perl
liblwp-useragent-determined-perl
libperlio-gzip-perl
libsoap-lite-perl
libterm-progressbar-perl
libterm-readkey-perl
libtimedate-perl
libtk-tablematrix-perl
libtry-tiny-perl
libunicode-string-perl
liburi-encode-perl
liburi-perl
libwww-perl
libxml-dom-perl
libxml-libxml-perl
libxml-libxslt-perl
libxml-parser-perl
libxml-simple-perl
libxml-treepp-perl
libxml-twig-perl
libxml-writer-perl
make
perl
perl-tk
if: |
env.OS_RELEASE_ID == 'debian' || env.OS_RELEASE_ID == 'ubuntu'
- name: Install perl requirements for Redhat systems
run: >
${{env.RPM_PKG_MGR}} install -y
make
perl
perl-Archive-Zip
perl-CGI
perl-Data-Dumper
perl-Date-Calc
perl-Date-Manip
perl-DateTime
perl-DateTime-Format-ISO8601
perl-DateTime-Format-SQLite
perl-DateTime-Format-Strptime
perl-DBD-SQLite
perl-DBI
perl-Digest-SHA
perl-ExtUtils-MakeMaker
perl-File-chdir
perl-File-HomeDir
perl-File-Slurp
perl-File-Temp
perl-File-Which
perl-Getopt-Long
perl-HTML-Parser
perl-HTML-Tree
perl-HTTP-Cache-Transparent
perl-HTTP-Cookies
perl-HTTP-Message
perl-IO-stringy
perl-JSON
perl-JSON-XS
perl-libwww-perl
perl-Lingua-Preferred
perl-List-MoreUtils
perl-LWP-Protocol-https
perl-LWP-UserAgent-Determined
perl-Memoize
perl-PerlIO-gzip
perl-SOAP-Lite
perl-Term-ProgressBar
perl-TermReadKey
perl-Time-HiRes
perl-Time-Local
perl-Time-Piece
perl-TimeDate
perl-Tk
perl-Tk-TableMatrix
perl-Try-Tiny
perl-Unicode-String
perl-URI
perl-URI-Encode
perl-XML-DOM
perl-XML-LibXML
perl-XML-LibXSLT
perl-XML-Parser
perl-XML-Simple
perl-XML-TreePP
perl-XML-Twig
perl-XML-Writer
if: |
env.OS_RELEASE_ID == 'centos' || env.OS_RELEASE_ID == 'fedora'
- name: Install perl requirements for Alpine Linux
run: >
apk add
perl-archive-zip
perl-compress-raw-zlib
perl-date-manip
perl-datetime-format-iso8601
perl-datetime-format-strptime
perl-dbd-sqlite
perl-dbi
perl-file-which
perl-file-slurp
perl-html-parser
perl-io-gzip
perl-io-stringy
perl-json
perl-json-xs
perl-libwww
perl-lingua-en-numbers-ordinate
perl-lingua-preferred
perl-list-moreutils
perl-lwp-protocol-https
perl-lwp-useragent-determined
perl-term-progressbar
perl-term-readkey
perl-timedate
perl-xml-dom
perl-xml-libxml
perl-xml-libxslt
perl-xml-parser
perl-xml-treepp
perl-xml-twig
perl-xml-writer
perl-unicode-string
perl-uri-encode
perl-dev
make
perl-app-cpanminus
perl-module-build
perl-test-fatal
perl-test-requiresinternet
if: |
env.OS_RELEASE_ID == 'alpine'
- name: Build missing perl requirements from CPAN for Alpine Linux
run: >
cpanm
DateTime::Format::SQLite
File::HomeDir
HTML::Tree
HTTP::Cache::Transparent
if: |
env.OS_RELEASE_ID == 'alpine'
- name: Checkout using legacy node version for legacy distros
uses: actions/checkout@v3
if: |
( ( ( env.OS_RELEASE_ID == 'centos' && env.OS_RELEASE_VERSION_MAJOR < 8 ) ||
( env.OS_RELEASE_ID == 'ubuntu' && env.OS_RELEASE_VERSION_MAJOR < 20 ) ) )
- name: Checkout
uses: actions/checkout@v4
if: |
( ! ( ( env.OS_RELEASE_ID == 'centos' && env.OS_RELEASE_VERSION_MAJOR < 8 ) ||
( env.OS_RELEASE_ID == 'ubuntu' && env.OS_RELEASE_VERSION_MAJOR < 20 ) ) )
- name: perl Makefile.PL
run: perl Makefile.PL -default NO_PACKLIST=1 NO_PERLLOCAL=1
- name: make
run: make
- name: make test
run: make test
windows-build:
name: Build on Windows
# Build Windows self-extracting executables.
# Build 32-bit and 64-bit versions.
# Strictly speaking we only need the 32-bit version (since that will also run
# on 64-bit) but there may be some benefit in the 64-bit Perl for machine-
# intensive operations, such as tv_imdb.
strategy:
matrix:
target: [win64, win32]
uses: ./.github/workflows/winbuild.yml
with:
arch: ${{ matrix.target }}
secrets: inherit
macos-build:
name: Build on macOS
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- name: Install dependencies
run: brew install perl cpanminus openssl sqlite tcl-tk
- name: Install perl requirements
run: >
perl /opt/homebrew/bin/cpanm --notest --no-interactive
Archive::Zip
CGI
CGI::Carp
Date::Manip
DateTime
DateTime::Format::ISO8601
DateTime::Format::SQLite
DBD::SQLite
DBI
File::HomeDir
File::Slurp
HTML::FormatText
HTTP::Cache::Transparent
IO::Scalar
JSON
Lingua::EN::Numbers::Ordinate
Lingua::Preferred
List::MoreUtils
LWP::Protocol::https
LWP::UserAgent::Determined
Memoize
SOAP::Lite
Term::ProgressBar
Tk
Tk::TableMatrix
Unicode::String
Unicode::UTF8simple
URI::Encode
XML::DOM
XML::LibXML
XML::LibXSLT
XML::TreePP
XML::Twig
XML::Writer
- name: Show content of log files on failure
if: ${{ failure() }}
run: cat /Users/runner/.cpanm/work/*/build.log
- name: Checkout
uses: actions/checkout@v4
- name: perl Makefile.PL
run: perl Makefile.PL -default NO_PACKLIST=1 NO_PERLLOCAL=1
- name: make
run: make
- name: make test
run: make test