forked from lighttpd/lighttpd1.4
-
Notifications
You must be signed in to change notification settings - Fork 0
361 lines (345 loc) · 13.5 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
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
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- ci
tags:
- lighttpd-*
concurrency:
group: ${{github.workflow}}-${{github.head_ref}}
cancel-in-progress: true
jobs:
Linux-ubuntu-gcc:
runs-on: ubuntu-latest
name: Linux-ubuntu-${{matrix.platform}}-gcc
strategy:
matrix:
platform: ['x64']
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/setup-gcc@v1
with:
platform: ${{matrix.platform}}
- name: Install packages
run: |
sudo apt-get install build-essential \
cmake meson ninja-build pkg-config scons \
autoconf automake autotools-dev libtool m4 \
nettle-dev gnutls-dev \
libmbedtls-dev libnss3-dev libssl-dev libwolfssl-dev \
libpcre2-dev libbrotli-dev libdeflate-dev zlib1g-dev libzstd-dev \
libsasl2-dev libkrb5-dev libdbi-dev libpam-dev libldap-dev \
libmariadb-dev libpq-dev \
libmaxminddb-dev libunwind-dev liblua5.1-0-dev liblua5.4-dev \
libxml2-dev libsqlite3-dev
- name: Compile and Test
run: |
set -e
cd "${{github.workspace}}" && scripts/ci-build.sh meson
#cd "${{github.workspace}}" && scripts/ci-build.sh cmake
cd "${{github.workspace}}" && scripts/ci-build.sh cmake-asan
cd "${{github.workspace}}" && scripts/ci-build.sh scons
cd "${{github.workspace}}" && scripts/ci-build.sh autobuild
Linux-ubuntu-clang:
runs-on: ubuntu-latest
name: Linux-ubuntu-${{matrix.platform}}-clang
strategy:
matrix:
platform: ['x64']
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/setup-clang@v1
with:
platform: ${{matrix.platform}}
- name: Install packages
run: |
sudo apt-get install build-essential \
cmake meson ninja-build pkg-config scons \
autoconf automake autotools-dev libtool m4 \
nettle-dev gnutls-dev \
libmbedtls-dev libnss3-dev libssl-dev libwolfssl-dev \
libpcre2-dev libbrotli-dev libdeflate-dev zlib1g-dev libzstd-dev \
libsasl2-dev libkrb5-dev libdbi-dev libpam-dev libldap-dev \
libmariadb-dev libpq-dev \
libmaxminddb-dev libunwind-dev liblua5.1-0-dev liblua5.4-dev \
libxml2-dev libsqlite3-dev
- name: Compile and Test
run: |
set -e
#cd "${{github.workspace}}" && scripts/ci-build.sh meson
cd "${{github.workspace}}" && scripts/ci-build.sh cmake
#cd "${{github.workspace}}" && scripts/ci-build.sh scons
#cd "${{github.workspace}}" && scripts/ci-build.sh autobuild
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
brew install meson ninja pkg-config pcre2 perl \
gnutls libressl mbedtls nettle nss wolfssl \
cyrus-sasl krb5 libdbi openldap \
mariadb-connector-c libpq \
brotli libdeflate zlib zstd \
libmaxminddb lua \
libxml2 sqlite
# autoconf automake libtool m4 cmake scons
- name: Compile and Test
run: |
set -e
export NO_UNWIND=1
cd "${{github.workspace}}" && scripts/ci-build.sh meson
DragonflyBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/dragonflybsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y bash ninja meson pkgconf pcre2 perl5
run: |
set -e
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
FreeBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y autoconf automake autotools libtool m4 pkgconf \
ninja meson cmake scons-py39 pcre2 perl5 \
gnutls libressl mbedtls nettle nss wolfssl \
cyrus-sasl krb5 libdbi openldap26-client \
mariadb1011-client postgresql16-client \
brotli libdeflate zstd \
libmaxminddb libunwind lua51 lua54 \
libxml2 sqlite3
run: |
set -e
cd "${{github.workspace}}" && scripts/ci-build.sh meson
cd "${{github.workspace}}" && scripts/ci-build.sh cmake
cd "${{github.workspace}}" && scripts/ci-build.sh scons
cd "${{github.workspace}}" && scripts/ci-build.sh autobuild
NetBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/netbsd-vm@v1
with:
#usesh: true
prepare: |
pkg_add dash cmake ninja pkgconf pcre2 perl \
gnutls libressl mbedtls nettle nss wolfssl \
cyrus-sasl mit-krb5 libdbi openldap-client \
mariadb-client postgresql16-client \
brotli libdeflate zlib zstd \
libmaxminddb libunwind lua51 lua54 \
libxml2 sqlite3
pkg_add dash
# note: repeat 'pkg_add dash' to exit 0
# since NetBSD 10.0 has some issues with the packaging of the listed
# packages above and exits non-zero due to various packaging issues,
# but the result is still sufficient for lighttpd CI build tests.
# autoconf automake gmake libtool m4 meson py311-scons
run: |
set -e
export NO_UNWIND=1
cd "${{github.workspace}}" && scripts/ci-build.sh cmake
OpenBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/openbsd-vm@v1
with:
usesh: true
prepare: |
pkg_add ninja meson pkgconf pcre2 \
gnutls mbedtls libnettle nss \
cyrus-sasl-- heimdal-libs libdbi openldap-client-- \
mariadb-client postgresql-client \
brotli libdeflate zstd \
libmaxminddb lua--%5.1 lua--%5.4 \
libxml sqlite3
# autoconf automake cmake gmake libtool m4 scons
run: |
set -e
export NO_PAM=1 NO_UNWIND=1 NO_WOLFSSL=1
cd "${{github.workspace}}" && scripts/ci-build.sh meson
# # Solaris VM test is really slow compared to other VMs tests
# # (retrieving and installing packages is really slow)
# Solaris:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: vmactions/solaris-vm@v1
# with:
# usesh: true
# prepare: |
# pkgutil -y -i cmake gcc5core gmake pkgconfig perl libpcre2_dev
# run: |
# set -e
# # TODO: configure matrix with Sun Studio compiler
# cmake -S "${{github.workspace}}" -B "build" -Wno-dev -DCMAKE_BUILD_TYPE=Release
# cmake --build build --config Release
# # TODO: figure out why t/* tests are built but not found (not run)
# # TODO: figure out tests/* are not found (not run)
# # ctest --no-tests=error is also failing to fail/cause CI to fail
# ctest -V --test-dir build --build-config Release --no-tests=error
Windows-Cygwin:
runs-on: windows-latest
env:
CYGWIN: winsymlinks:native
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v4
- uses: cygwin/cygwin-install-action@master
with:
packages: >
autoconf automake libtool m4 make
cmake meson ninja scons
gcc-g++ git pkgconf perl
libpcre2-devel
libnettle-devel gnutls-devel mbedtls-devel libnss-devel libssl-devel
libbrotli-devel libdeflate-devel zlib-devel libzstd-devel
libsasl2-devel libkrb5-devel libdbi-devel openldap-devel
libmariadb-devel libpq-devel
libmaxminddb-devel libunwind-devel lua-devel lua5.1-devel
libxml2-devel libsqlite3-devel
libintl-devel
- name: Update
shell: powershell
run: |
# (https://github.com/cygwin/cygwin-install-action/blob/master/action.yml)
Invoke-WebRequest https://cygwin.com/setup-x86_64.exe -OutFile C:\setup.exe
# because setup is a Windows GUI app, make it part of a pipeline to make
# PowerShell wait for it to exit
& C:\setup.exe -qgnO -t | Out-Default
- name: Compile and Test
shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}'
run: |
set -e
export PATH=/usr/bin:$(cygpath ${SYSTEMROOT})/system32
export NO_PAM=1 NO_UNWIND=1 NO_WOLFSSL=1
export SHELL=/bin/dash
cd "${{github.workspace}}" && /bin/dash scripts/ci-build.sh autobuild
Windows-VisualStudio:
runs-on: windows-latest
name: Windows-VisualStudio-${{matrix.platform}}
strategy:
matrix:
platform: ['x64']
#platform: ['x64', 'win32']
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Compile and Test
run: |
$ErrorActionPreference = 'Stop'
cmake -G "Visual Studio 17 2022" -A "${{matrix.platform}}" -S "${{github.workspace}}" -B "build" -Wno-dev -DCMAKE_BUILD_TYPE=Release -DWITH_PCRE2=OFF -DWITH_PCRE=OFF -DWITH_ZLIB=OFF
cmake --build build --config Release
# run the compiled unit tests src/t/test_*;
# (skip the Perl test framework in tests/*)
# (note: tests/CMakeLists.txt also skips Perl tests/* on native WIN32)
ctest -V --test-dir build --build-config Release --no-tests=error -R '^test_'
Windows-MSYS2:
runs-on: windows-latest
name: Windows-MSYS2-${{matrix.platform}}
strategy:
matrix:
platform: ['mingw64', 'ucrt64', 'clang64']
#platform: ['mingw32', 'mingw64', 'ucrt64', 'clang32', 'clang64']
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.platform}}
update: true
install: git m4
pacboy: >-
cc:p autotools:p libtool:p make:p pcre2:p pkgconf:p
nettle:p gnutls:p mbedtls:p nss:p openssl:p
brotli:p libdeflate:p zlib:p zstd:p
cyrus-sasl:p openldap:p
libmariadbclient:p postgresql:p
libmaxminddb:p libunwind:p lua51:p lua:p luajit:p
libxml2:p sqlite3:p
# heimdal-devel: available only on platform: msys (?)
- name: Compile and Test
shell: msys2 {0}
run: |
set -e
# NO_GNUTLS=1 gnutls/socket.h can not find <sys/socket.h>
# NO_MYSQL=1 build not finding mysql_config
export NO_DBI=1 NO_GNUTLS=1 NO_KRB5=1 NO_MYSQL=1 NO_PAM=1 NO_UNWIND=1 NO_WOLFSSL=1
export SHELL=/bin/dash
cd "${{github.workspace}}" && /bin/dash scripts/ci-build.sh autobuild
Linux-alpine-x86_64:
runs-on: ubuntu-latest
name: Linux-alpine-${{matrix.platform}}
# abort if x86_64 fails (x86_64 or x86 are fastest "native" builds)
continue-on-error: ${{ matrix.platform != 'x86_64' }}
strategy:
fail-fast: true
matrix:
platform: ['x86_64']
steps:
- uses: actions/checkout@v4
- uses: jirutka/setup-alpine@v1
with:
branch: latest-stable
arch: ${{matrix.platform}}
packages: >
build-base cmake meson ninja pkgconf perl scons
autoconf automake libtool m4
gnutls-dev mbedtls-dev openssl-dev nettle-dev nss-dev wolfssl-dev
pcre2-dev brotli-dev libdeflate-dev zlib-dev zstd-dev
cyrus-sasl-dev krb5-dev libdbi-dev linux-pam-dev openldap-dev
mariadb-connector-c-dev postgresql16-dev
libmaxminddb-dev libunwind-dev lua5.1-dev lua5.4-dev
libxml2-dev sqlite-dev
zlib-static openssl-libs-static
- name: Compile and Test
shell: alpine.sh {0}
run: |
set -e
# Alpine Linux wolfssl package built w/o features required by lighttpd
#('scons check_fullstatic' needs zlib-static openssl-libs-static)
export NO_WOLFSSL=1
cd "${{github.workspace}}" && scripts/ci-build.sh meson
cd "${{github.workspace}}" && scripts/ci-build.sh cmake
cd "${{github.workspace}}" && scripts/ci-build.sh scons
cd "${{github.workspace}}" && scripts/ci-build.sh autobuild
Linux-alpine:
runs-on: ubuntu-latest
name: Linux-alpine-${{matrix.platform}}
# abort if x86 fails (x86_64 or x86 are fastest "native" builds)
continue-on-error: ${{ matrix.platform != 'x86' }}
strategy:
fail-fast: true
matrix:
platform: ['x86','armhf','armv7','aarch64','ppc64le','riscv64','s390x']
steps:
- uses: actions/checkout@v4
- uses: jirutka/setup-alpine@v1
with:
# riscv64 currently requires 'edge'
branch: edge
arch: ${{matrix.platform}}
packages: >
build-base meson ninja perl pkgconf pcre2-dev zlib-dev
- name: Compile and Test
shell: alpine.sh {0}
run: |
set -e
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose