forked from syslog-ng/syslog-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
335 lines (302 loc) · 13.6 KB
/
devshell.yml
File metadata and controls
335 lines (302 loc) · 13.6 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
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
name: CI @ devshell
on:
pull_request:
push:
branches: [ "develop", "master" ]
schedule:
- cron: "00 21 * * *"
workflow_dispatch:
inputs:
use_all:
description: Should we build for all images?
required: false
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read # actions/checkout
actions: write # actions/upload-artifact + inherited by devshell-build.yml
packages: read # pull ghcr.io/syslog-ng/dbld-* container images
jobs:
build:
strategy:
fail-fast: false
matrix:
# We test building in dbld docker images only that have no binary packages, or docker installations.
# OS varians that have binary packages or docker installations will be built by the 'Nightly release'
# NOTE: Keep the image list synced with the dbld-images.yaml !!!
# --------------------------------------------------------------------
# Current Build/Test Matrix Coverage
#
# image - name | cmake | autotools | gcc | clang | X86-64 | arm64 | light | func | criterion |
# --------------------|-------|-----------|-----|-------|--------|-------|-------|------|-----------|
# almalinux-8 | x | | x | x | x | | x | x | x |
# almalinux-9 | x | | x | x | x | | x | x | x |
# almalinux-10 | x | | x | x | x | | x | x | x |
# centos-stream9 | x | | x | x | x | | x | x | x |
# centos-stream10 | x | | x | x | x | | x | x | x |
# fedora-latest | x | | x | x | x | | x | x | x |
# fedora-rawhide | x | | x | x | x | | x | x | x |
# opensuse-tumbleweed | | | | | | | | | | (TODO: not yet enabled)
# rocky-9 | x | | x | x | x | | x | x | x |
# ubuntu-focal | x | | x | x | x | | x | x | x |
# ---------------------------------------------------------------------------------------------------
# debian-bullseye | x | | x | x | x | | x | x | x |
# debian-bookworm | x | | x | x | x | | x | x | x |
# debian-testing | x | | x | x | x | | x | x | x |
# debian-sid | x | | x | x | x | | x | x | x |
# ubuntu-jammy | x | | x | x | x | | x | x | x |
# ubuntu-noble | x | | x | x | x | | x | x | x |
# ubuntu-plucky | x | | x | x | x | | x | x | x |
# rhel-8 | x | | x | x | x | | x | x | x |
# rhel-9 | x | | x | x | x | | x | x | x |
# rhel-10 | x | | x | x | x | | x | x | x |
# ---------------------------------------------------------------------------------------------------
# debian-trixie | x | | x | x | x | | x | x | x |
# ---------------------------------------------------------------------------------------------------
# devshell | x | x | x | x | x | x | x | x | x |
# devshell (i386) | x | | x | | x | | x | x | x |
# ---------------------------------------------------------------------------------------------------
build-tool: [ autotools, cmake ]
cc: [ gcc, clang ]
platform: [ ubuntu-24.04-arm, ubuntu-latest ]
image:
- name: almalinux-8
# grpc/protobuf is presented, but configure cannot find protobuf
configure_flags: "--disable-sql --disable-grpc --disable-ebpf --with-python=3.9"
cmake_configure_flags: "-DENABLE_SQL=OFF -DENABLE_GRPC=OFF -DENABLE_EBPF=OFF -DPYTHON_VERSION=3.9"
- name: almalinux-9
# grpc is presented, but does not compile
configure_flags: "--disable-sql --disable-grpc"
cmake_configure_flags: "-DENABLE_SQL=OFF -DENABLE_GRPC=OFF"
- name: almalinux-10
configure_flags: "--disable-sql --disable-mqtt"
cmake_configure_flags: "-DENABLE_SQL=OFF -DENABLE_MQTT=OFF"
- name: centos-stream9
# grpc is presented, but does not compile
configure_flags: "--disable-sql --disable-mqtt --disable-grpc"
cmake_configure_flags: "-DENABLE_SQL=OFF -DENABLE_MQTT=OFF -DENABLE_GRPC=OFF"
- name: centos-stream10
configure_flags: "--disable-sql --disable-mqtt"
cmake_configure_flags: "-DENABLE_SQL=OFF -DENABLE_MQTT=OFF"
- name: fedora-latest
- name: fedora-rawhide
# TODO: We still need to implement install_rpm_build_deps for opensuse
#- name: opensuse-tumbleweed
- name: rocky-9
- name: ubuntu-focal
# too old ebpf
configure_flags: "--disable-ebpf"
cmake_configure_flags: "-DENABLE_EBPF=OFF"
# --------------------------------------------------------------------
- name: debian-bullseye
# too old ebpf
configure_flags: "--disable-ebpf"
cmake_configure_flags: "-DENABLE_EBPF=OFF"
- name: debian-bookworm
- name: debian-testing
- name: debian-sid
- name: ubuntu-jammy
# too old ebpf
configure_flags: "--disable-ebpf"
cmake_configure_flags: "-DENABLE_EBPF=OFF"
- name: ubuntu-noble
# no bpftool ?!?
configure_flags: "--disable-ebpf"
cmake_configure_flags: "-DENABLE_EBPF=OFF"
- name: ubuntu-plucky
- name: rhel-8
configure_flags: "--disable-ebpf --with-python=3.9"
cmake_configure_flags: "-DENABLE_EBPF=OFF -DPYTHON_VERSION=3.9"
- name: rhel-9
- name: rhel-10
# --------------------------------------------------------------------
- name: debian-trixie
# --------------------------------------------------------------------
- name: devshell
# Now only for devsell we support -Werror, all other none-packaged targets are just best efforts
configure_flags: "--enable-werror"
cmake_configure_flags: "-DENABLE_WERROR=ON"
# --------------------------------------------------------------------
exclude:
- platform: ubuntu-24.04-arm
# Test autotools only in devshell, all other none-packaged targets are just best efforts with autotools, use cmake
- build-tool: autotools
include:
# Add back excluded autotools builds for devshell
- platform: ubuntu-latest
image:
name: devshell
build-tool: autotools
cc: gcc
- platform: ubuntu-latest
image:
name: devshell
build-tool: autotools
cc: clang
# Currently testing ARM64 in devshell only
- platform: ubuntu-24.04-arm
image:
name: devshell
arch_suffix: "-arm64"
build-tool: autotools
cc: gcc
- platform: ubuntu-24.04-arm
image:
name: devshell
arch_suffix: "-arm64"
build-tool: autotools
cc: clang
- platform: ubuntu-24.04-arm
image:
name: devshell
arch_suffix: "-arm64"
build-tool: cmake
cc: gcc
- platform: ubuntu-24.04-arm
image:
name: devshell
arch_suffix: "-arm64"
build-tool: cmake
cc: clang
# Currently testing i386 in devshell only
# NOTE: We use ubuntu-latest (x86_64) because GitHub has no i386 builder support anymore
- platform: ubuntu-latest
image:
name: devshell
arch_suffix: "-i386"
# TODO: jemalloc causes hangs in some kira tests, investigate and fix it, but for now just disable it for i386
configure_flags: "--disable-jemalloc"
cmake_configure_flags: "-DENABLE_JEMALLOC=OFF"
build-tool: cmake
cc: gcc
uses: ./.github/workflows/devshell-build.yml
with:
build-tool: ${{ matrix.build-tool }}
cc: ${{ matrix.cc }}
platform: ${{ matrix.platform }}
image-name: ${{ matrix.image.name }}
image-arch-suffix: ${{ matrix.image.arch_suffix }}
image-cflags: ${{ matrix.image.cflags }}
image-configure-flags: ${{ matrix.image.configure_flags }}
image-cmake-configure-flags: ${{ matrix.image.cmake_configure_flags }}
run-condition: ${{ matrix.image.name == 'devshell' || github.event_name == 'schedule' }}
use_all: ${{ inputs.use_all == true }}
distcheck:
runs-on: ubuntu-latest
container:
image: ghcr.io/syslog-ng/dbld-devshell:latest
options: --security-opt seccomp=unconfined --ulimit core=-1
steps:
- name: Checkout syslog-ng source
uses: actions/checkout@v4
- name: Setup Git safedir
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Set ENV variables
run: |
. .github/workflows/gh-tools.sh
DISTCHECK_CONFIGURE_FLAGS="
--prefix=${HOME}/install/syslog-ng
--enable-werror
--with-ivykis=internal
--with-jsonc=system
--enable-tcp-wrapper
--enable-linux-caps
--enable-manpages
--enable-all-modules
--disable-java
--disable-java-modules
--with-python=3
"
gh_export DISTCHECK_CONFIGURE_FLAGS
- name: autogen.sh
run: ./autogen.sh
- name: configure
run: ./configure --disable-all-modules --enable-manpages
- name: distcheck
run: |
. tests/build-log-cflags-propagation.sh
exec_prop_check "make distcheck -j 3 V=1"
style-check:
runs-on: ubuntu-latest
container:
image: ghcr.io/syslog-ng/dbld-devshell:latest
steps:
- name: Checkout syslog-ng source
uses: actions/checkout@v4
- name: Setup Git safedir
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Prepare
run: |
./autogen.sh
mkdir build && cd build
../configure
- name: Style check (C)
id: c-style-check
run: |
scripts/style-checker.sh format
git diff --exit-code > c-style-problems.diff || \
(cat c-style-problems.diff && git reset --hard HEAD && exit 1)
- name: Style check (pylib)
if: always()
working-directory: ./build
run: |
make pymodules-linters || (git reset --hard HEAD && exit 1)
- name: Style check (Light)
id: light-style-check
if: always()
working-directory: ./build
shell: bash
run: |
make light-linters || \
(git diff > ../light-style-problems.diff ; git reset --hard HEAD && exit 1)
- name: "Artifact: c-style-problems"
uses: actions/upload-artifact@v4
if: always() && steps.c-style-check.outcome == 'failure'
with:
name: c-style-problems
path: c-style-problems.diff
- name: "Artifact: light-style-problems"
uses: actions/upload-artifact@v4
if: always() && steps.light-style-check.outcome == 'failure'
with:
name: light-style-problems
path: light-style-problems.diff
copyright-check:
runs-on: ubuntu-latest
container:
image: ghcr.io/syslog-ng/dbld-devshell:latest
env:
COPYRIGHTVERBOSITY: 1
steps:
- name: Checkout syslog-ng source
uses: actions/checkout@v4
- name: Setup Git safedir
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Copyright check
run: tests/copyright/check.sh . .
- name: "Artifact: copyright-run.log"
uses: actions/upload-artifact@v4
if: failure()
with:
name: copyright-run.log
path: copyright-run.log
commits-check:
runs-on: ubuntu-latest
container:
image: ghcr.io/syslog-ng/dbld-devshell:latest
steps:
- name: Checkout syslog-ng source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Git safedir
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Commits check (Pull request)
if: github.event_name == 'pull_request'
run: tests/commits/check.sh origin/${{ github.base_ref }}..HEAD
- name: Commits check (Push)
if: github.event_name == 'push'
run: tests/commits/check.sh