]> git.ipfire.org Git - thirdparty/pdns.git/blame - .github/workflows/build-and-test-all.yml
Merge pull request #13387 from omoerbeek/rec-b-root-servers
[thirdparty/pdns.git] / .github / workflows / build-and-test-all.yml
CommitLineData
99bb3530
PD
1---
2name: 'Build and test everything'
3
4on:
5 push:
6 pull_request:
7 schedule:
8 - cron: '0 22 * * 3'
9
aff4e1ea
RG
10permissions: # least privileges, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
11 contents: read
12
7d862cb3 13env:
2ef73ca0 14 COMPILER: clang
7d862cb3
AR
15 CLANG_VERSION: '13'
16 # github.workspace variable points to the Runner home folder. Container home folder defined below.
17 REPO_HOME: '/__w/pdns/pdns'
e917c86b 18 BUILDER_VERSION: '0.0.0-git1'
628a1dec
RG
19 COVERAGE: yes
20 LLVM_PROFILE_FILE: "/tmp/code-%p.profraw"
2ef73ca0 21 OPTIMIZATIONS: yes
825560a1 22 DECAF_SUPPORT: yes
7d862cb3 23
99bb3530
PD
24jobs:
25 build-auth:
26 name: build auth
d540dd1c 27 if: ${{ !github.event.schedule || vars.SCHEDULED_JOBS_BUILD_AND_TEST_ALL }}
99bb3530 28 runs-on: ubuntu-20.04
7d862cb3
AR
29 container:
30 image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
31 env:
32 ASAN_OPTIONS: detect_leaks=0
33 FUZZING_TARGETS: yes
34 SANITIZERS: asan+ubsan
35 UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp"
36 UNIT_TESTS: yes
7a4858f8 37 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
e917c86b
AR
38 defaults:
39 run:
40 working-directory: ./pdns-${{ env.BUILDER_VERSION }}
99bb3530 41 steps:
f9a8b3fb 42 - uses: actions/checkout@v3
99bb3530
PD
43 with:
44 fetch-depth: 5
45 submodules: recursive
d3cb00f9
PD
46 - name: get timestamp for cache
47 id: get-stamp
48 run: |
d3cc827b 49 echo "stamp=$(/bin/date +%s)" >> "$GITHUB_OUTPUT"
d3cb00f9 50 shell: bash
e917c86b 51 working-directory: .
7d862cb3 52 - run: mkdir -p ~/.ccache
e917c86b 53 working-directory: .
d3cb00f9 54 - name: let GitHub cache our ccache data
fa0fcbfb 55 uses: actions/cache@v3
d3cb00f9
PD
56 with:
57 path: ~/.ccache
58 key: auth-ccache-${{ steps.get-stamp.outputs.stamp }}
59 restore-keys: auth-ccache-
99bb3530 60 - run: inv ci-autoconf
e917c86b 61 working-directory: .
99bb3530 62 - run: inv ci-auth-configure
e917c86b
AR
63 working-directory: .
64 - run: inv ci-make-distdir
65 working-directory: .
66 - run: inv ci-auth-configure
67 - run: inv ci-auth-make-bear # This runs under pdns-$BUILDER_VERSION/pdns/
e55d3a4b 68 - run: inv ci-auth-install-remotebackend-test-deps
99bb3530 69 - run: inv ci-auth-run-unit-tests
628a1dec
RG
70 - run: inv generate-coverage-info ./testrunner $GITHUB_WORKSPACE
71 working-directory: ./pdns-${{ env.BUILDER_VERSION }}/pdns
72 - name: Coveralls Parallel auth unit
73 uses: coverallsapp/github-action@v2
74 with:
75 flag-name: auth-unit-${{ matrix.sanitizers }}
76 path-to-lcov: $GITHUB_WORKSPACE/coverage.lcov
77 parallel: true
78 allow-empty: true
99bb3530 79 - run: inv ci-make-install
d3cb00f9 80 - run: ccache -s
99bb3530 81 - name: Store the binaries
97e6cf76 82 uses: actions/upload-artifact@v3 # this takes 30 seconds, maybe we want to tar
99bb3530
PD
83 with:
84 name: pdns-auth
85 path: /opt/pdns-auth
196e7d18 86 retention-days: 1
99bb3530
PD
87
88 build-recursor:
89 name: build recursor
d540dd1c 90 if: ${{ !github.event.schedule || vars.SCHEDULED_JOBS_BUILD_AND_TEST_ALL }}
99bb3530 91 runs-on: ubuntu-20.04
38529f81
O
92 strategy:
93 matrix:
719e5764 94 sanitizers: [ubsan+asan, tsan]
7d862cb3
AR
95 container:
96 image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
97 env:
98 ASAN_OPTIONS: detect_leaks=0
99 SANITIZERS: ${{ matrix.sanitizers }}
100 UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp"
101 UNIT_TESTS: yes
7a4858f8 102 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
99bb3530
PD
103 defaults:
104 run:
e917c86b 105 working-directory: ./pdns/recursordist/pdns-recursor-${{ env.BUILDER_VERSION }}
99bb3530 106 steps:
f9a8b3fb 107 - uses: actions/checkout@v3
99bb3530
PD
108 with:
109 fetch-depth: 5
110 submodules: recursive
d3cb00f9
PD
111 - name: get timestamp for cache
112 id: get-stamp
113 run: |
d3cc827b 114 echo "stamp=$(/bin/date +%s)" >> "$GITHUB_OUTPUT"
d3cb00f9 115 shell: bash
e917c86b 116 working-directory: .
7d862cb3 117 - run: mkdir -p ~/.ccache
e917c86b 118 working-directory: .
d3cb00f9 119 - name: let GitHub cache our ccache data
fa0fcbfb 120 uses: actions/cache@v3
d3cb00f9
PD
121 with:
122 path: ~/.ccache
38529f81
O
123 key: recursor-${{ matrix.sanitizers }}-ccache-${{ steps.get-stamp.outputs.stamp }}
124 restore-keys: recursor-${{ matrix.sanitizers }}-ccache-
9883d3f9 125 - run: inv ci-install-rust ${{ env.REPO_HOME }}
47e38378 126 working-directory: ./pdns/recursordist/
99bb3530 127 - run: inv ci-autoconf
e917c86b
AR
128 working-directory: ./pdns/recursordist/
129 - run: inv ci-rec-configure
130 working-directory: ./pdns/recursordist/
131 - run: inv ci-make-distdir
132 working-directory: ./pdns/recursordist/
99bb3530 133 - run: inv ci-rec-configure
490bc252 134 - run: inv ci-rec-make-bear
99bb3530 135 - run: inv ci-rec-run-unit-tests
628a1dec
RG
136 - run: inv generate-coverage-info ./testrunner $GITHUB_WORKSPACE
137 if: ${{ matrix.sanitizers != 'tsan' }}
138 - name: Coveralls Parallel rec unit
139 if: ${{ matrix.sanitizers != 'tsan' }}
140 uses: coverallsapp/github-action@v2
141 with:
142 flag-name: rec-unit-${{ matrix.sanitizers }}
143 path-to-lcov: $GITHUB_WORKSPACE/coverage.lcov
144 parallel: true
145 allow-empty: true
99bb3530 146 - run: inv ci-make-install
d3cb00f9 147 - run: ccache -s
99bb3530 148 - name: Store the binaries
97e6cf76 149 uses: actions/upload-artifact@v3 # this takes 30 seconds, maybe we want to tar
99bb3530 150 with:
38529f81 151 name: pdns-recursor-${{ matrix.sanitizers }}
99bb3530 152 path: /opt/pdns-recursor
196e7d18 153 retention-days: 1
0e77de07 154
99bb3530
PD
155 build-dnsdist:
156 name: build dnsdist
d540dd1c 157 if: ${{ !github.event.schedule || vars.SCHEDULED_JOBS_BUILD_AND_TEST_ALL }}
99bb3530 158 runs-on: ubuntu-20.04
7ec6fb65
PD
159 strategy:
160 matrix:
161 sanitizers: [ubsan+asan, tsan]
e3d6cf05
RG
162 features: [least, full]
163 exclude:
164 - sanitizers: tsan
165 features: least
7d862cb3
AR
166 container:
167 image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
168 env:
169 ASAN_OPTIONS: detect_leaks=0
170 SANITIZERS: ${{ matrix.sanitizers }}
171 UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp"
172 UNIT_TESTS: yes
e917c86b 173 FUZZING_TARGETS: yes
7a4858f8 174 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
99bb3530
PD
175 defaults:
176 run:
e917c86b 177 working-directory: ./pdns/dnsdistdist/dnsdist-${{ env.BUILDER_VERSION }}
99bb3530 178 steps:
f9a8b3fb 179 - uses: actions/checkout@v3
99bb3530
PD
180 with:
181 fetch-depth: 5
182 submodules: recursive
d3cb00f9
PD
183 - name: get timestamp for cache
184 id: get-stamp
185 run: |
d3cc827b 186 echo "stamp=$(/bin/date +%s)" >> "$GITHUB_OUTPUT"
d3cb00f9 187 shell: bash
e917c86b 188 working-directory: .
7d862cb3 189 - run: mkdir -p ~/.ccache
e917c86b 190 working-directory: .
d3cb00f9 191 - name: let GitHub cache our ccache data
fa0fcbfb 192 uses: actions/cache@v3
d3cb00f9
PD
193 with:
194 path: ~/.ccache
e3d6cf05
RG
195 key: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-ccache-${{ steps.get-stamp.outputs.stamp }}
196 restore-keys: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-ccache-
3e5c7a76
RG
197 - run: inv ci-install-rust ${{ env.REPO_HOME }}
198 working-directory: ./pdns/dnsdistdist/
199 - run: inv ci-build-and-install-quiche
200 working-directory: ./pdns/dnsdistdist/
99bb3530 201 - run: inv ci-autoconf
e917c86b
AR
202 working-directory: ./pdns/dnsdistdist/
203 - run: inv ci-dnsdist-configure ${{ matrix.features }}
204 working-directory: ./pdns/dnsdistdist/
205 - run: inv ci-make-distdir
206 working-directory: ./pdns/dnsdistdist/
e3d6cf05 207 - run: inv ci-dnsdist-configure ${{ matrix.features }}
3f1a58d1 208 - run: inv ci-dnsdist-make-bear
99bb3530 209 - run: inv ci-dnsdist-run-unit-tests
628a1dec
RG
210 - run: inv generate-coverage-info ./testrunner $GITHUB_WORKSPACE
211 if: ${{ matrix.sanitizers != 'tsan' }}
212 - name: Coveralls Parallel dnsdist unit
213 if: ${{ matrix.sanitizers != 'tsan' }}
214 uses: coverallsapp/github-action@v2
215 with:
216 flag-name: dnsdist-unit-${{ matrix.features }}-${{ matrix.sanitizers }}
217 path-to-lcov: $GITHUB_WORKSPACE/coverage.lcov
218 parallel: true
219 allow-empty: true
99bb3530 220 - run: inv ci-make-install
d3cb00f9 221 - run: ccache -s
99bb3530 222 - name: Store the binaries
97e6cf76 223 uses: actions/upload-artifact@v3 # this takes 30 seconds, maybe we want to tar
99bb3530 224 with:
e3d6cf05 225 name: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}
99bb3530 226 path: /opt/dnsdist
196e7d18 227 retention-days: 1
99bb3530
PD
228
229 test-auth-api:
230 needs: build-auth
231 runs-on: ubuntu-20.04
7d862cb3
AR
232 container:
233 image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
234 env:
235 UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp"
236 ASAN_OPTIONS: detect_leaks=0
237 TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ env.REPO_HOME }}/pdns/dnsdistdist/dnsdist-tsan.supp"
238 AUTH_BACKEND_IP_ADDR: "172.17.0.1"
7a4858f8 239 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
99bb3530
PD
240 strategy:
241 matrix:
242 include:
243 - backend: gsqlite3
244 image: coscale/docker-sleep
245 - backend: gmysql
246 image: mysql:5
247 - backend: gpgsql
248 image: postgres:9
249 - backend: lmdb
250 image: coscale/docker-sleep
251 fail-fast: false
252 services:
253 database:
254 image: ${{ matrix.image }}
255 env:
256 POSTGRES_USER: runner
257 POSTGRES_HOST_AUTH_METHOD: trust
258 MYSQL_ALLOW_EMPTY_PASSWORD: 1
259 ports:
260 - 3306:3306
261 - 5432:5432
262 # FIXME: this works around dist-upgrade stopping all docker containers. dist-upgrade is huge on these images anyway. Perhaps we do want to run our tasks in a Docker container too.
263 options: >-
264 --restart always
265 steps:
f9a8b3fb 266 - uses: actions/checkout@v3
99bb3530
PD
267 with:
268 fetch-depth: 5
269 submodules: recursive
270 - name: Fetch the binaries
c440b949 271 uses: actions/download-artifact@v3
99bb3530
PD
272 with:
273 name: pdns-auth
274 path: /opt/pdns-auth
7d862cb3 275 - run: inv apt-fresh
99bb3530
PD
276 - run: inv install-clang-runtime
277 - run: inv install-auth-test-deps -b ${{ matrix.backend }}
278 - run: inv test-api auth -b ${{ matrix.backend }}
628a1dec
RG
279 - run: inv generate-coverage-info /opt/pdns-auth/sbin/pdns_server $GITHUB_WORKSPACE
280 - name: Coveralls Parallel auth API ${{ matrix.backend }}
281 uses: coverallsapp/github-action@v2
282 with:
283 flag-name: auth-api-${{ matrix.backend }}
284 path-to-lcov: $GITHUB_WORKSPACE/coverage.lcov
285 parallel: true
286 allow-empty: true
99bb3530 287
0e77de07
PD
288 test-auth-backend:
289 needs: build-auth
290 runs-on: ubuntu-20.04
7d862cb3
AR
291 container:
292 image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
293 env:
294 UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp"
295 ASAN_OPTIONS: detect_leaks=0
296 LDAPHOST: ldap://ldapserver/
297 ODBCINI: /github/home/.odbc.ini
298 AUTH_BACKEND_IP_ADDR: "172.17.0.1"
7a4858f8 299 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
0e77de07
PD
300 strategy:
301 matrix:
302 include:
303 - backend: remote
304 image: coscale/docker-sleep
c4a7e1df
AR
305 env: {}
306 ports: []
b33a88da
PD
307 - backend: gmysql
308 image: mysql:5
c4a7e1df
AR
309 env:
310 MYSQL_ALLOW_EMPTY_PASSWORD: 1
311 ports:
312 - 3306:3306
b33a88da
PD
313 - backend: gmysql
314 image: mariadb:10
c4a7e1df
AR
315 env:
316 MYSQL_ALLOW_EMPTY_PASSWORD: 1
317 ports:
318 - 3306:3306
b33a88da
PD
319 - backend: gpgsql
320 image: postgres:9
c4a7e1df
AR
321 env:
322 POSTGRES_USER: runner
323 POSTGRES_HOST_AUTH_METHOD: trust
324 ports:
325 - 5432:5432
222d17e2
PD
326 - backend: gsqlite3 # this also runs regression-tests.nobackend and pdnsutil test-algorithms
327 image: coscale/docker-sleep
c4a7e1df
AR
328 env: {}
329 ports: []
b33a88da
PD
330 - backend: lmdb
331 image: coscale/docker-sleep
c4a7e1df
AR
332 env: {}
333 ports: []
b33a88da
PD
334 - backend: bind
335 image: coscale/docker-sleep
c4a7e1df
AR
336 env: {}
337 ports: []
b33a88da
PD
338 - backend: geoip
339 image: coscale/docker-sleep
c4a7e1df
AR
340 env: {}
341 ports: []
b33a88da
PD
342 - backend: lua2
343 image: coscale/docker-sleep
c4a7e1df
AR
344 env: {}
345 ports: []
b33a88da
PD
346 - backend: tinydns
347 image: coscale/docker-sleep
c4a7e1df
AR
348 env: {}
349 ports: []
222d17e2
PD
350 - backend: authpy
351 image: coscale/docker-sleep
c4a7e1df
AR
352 env: {}
353 ports: []
8af54cc6
AR
354 - backend: godbc_sqlite3
355 image: coscale/docker-sleep
c4a7e1df
AR
356 env: {}
357 ports: []
8af54cc6
AR
358 - backend: godbc_mssql
359 image: mcr.microsoft.com/mssql/server:2017-GA-ubuntu
c4a7e1df
AR
360 env:
361 ACCEPT_EULA: Y
362 SA_PASSWORD: 'SAsa12%%'
363 ports:
364 - 1433:1433
365 - backend: ldap
366 image: powerdns/ldap-regress:1.2.4-1
367 env:
368 LDAP_LOG_LEVEL: 0
369 CONTAINER_LOG_LEVEL: 4
370 ports:
371 - 389:389
372 - backend: geoip_mmdb
373 image: coscale/docker-sleep
374 env: {}
375 ports: []
0e77de07
PD
376 fail-fast: false
377 services:
378 database:
379 image: ${{ matrix.image }}
c4a7e1df
AR
380 env: ${{ matrix.env }}
381 ports: ${{ matrix.ports }}
0e77de07
PD
382 # FIXME: this works around dist-upgrade stopping all docker containers. dist-upgrade is huge on these images anyway. Perhaps we do want to run our tasks in a Docker container too.
383 options: >-
384 --restart always
385 steps:
f9a8b3fb 386 - uses: actions/checkout@v3
0e77de07
PD
387 with:
388 fetch-depth: 5
389 submodules: recursive
390 - name: Fetch the binaries
c440b949 391 uses: actions/download-artifact@v3
0e77de07
PD
392 with:
393 name: pdns-auth
394 path: /opt/pdns-auth
0e77de07 395 # FIXME: install recursor for backends that have ALIAS
0e77de07
PD
396 - run: inv install-clang-runtime
397 - run: inv install-auth-test-deps -b ${{ matrix.backend }}
398 - run: inv test-auth-backend -b ${{ matrix.backend }}
628a1dec
RG
399 - run: inv generate-coverage-info /opt/pdns-auth/sbin/pdns_server $GITHUB_WORKSPACE
400 - name: Coveralls Parallel auth backend ${{ matrix.backend }}
401 uses: coverallsapp/github-action@v2
402 with:
403 flag-name: auth-backend-${{ matrix.backend }}
404 path-to-lcov: $GITHUB_WORKSPACE/coverage.lcov
405 parallel: true
406 allow-empty: true
0e77de07 407
b33a88da
PD
408 test-ixfrdist:
409 needs: build-auth
410 runs-on: ubuntu-20.04
7d862cb3
AR
411 container:
412 image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
413 env:
414 UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp"
415 ASAN_OPTIONS: detect_leaks=0
7a4858f8 416 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
b33a88da 417 steps:
f9a8b3fb 418 - uses: actions/checkout@v3
b33a88da
PD
419 with:
420 fetch-depth: 5
421 submodules: recursive
422 - name: Fetch the binaries
c440b949 423 uses: actions/download-artifact@v3
b33a88da
PD
424 with:
425 name: pdns-auth
426 path: /opt/pdns-auth
b33a88da 427 - run: inv install-clang-runtime
222d17e2 428 - run: inv install-auth-test-deps
b33a88da 429 - run: inv test-ixfrdist
628a1dec
RG
430 - run: inv generate-coverage-info /opt/pdns-auth/bin/ixfrdist $GITHUB_WORKSPACE
431 - name: Coveralls Parallel ixfrdist
432 uses: coverallsapp/github-action@v2
433 with:
434 flag-name: ixfrdist
435 path-to-lcov: $GITHUB_WORKSPACE/coverage.lcov
436 parallel: true
437 allow-empty: true
b33a88da 438
99bb3530
PD
439 test-recursor-api:
440 needs: build-recursor
441 runs-on: ubuntu-20.04
38529f81
O
442 strategy:
443 matrix:
719e5764 444 sanitizers: [ubsan+asan, tsan]
7d862cb3
AR
445 dist_name: [debian]
446 dist_release_name: [bullseye]
447 pdns_repo_version: ['45']
448 container:
449 image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
450 env:
451 UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp"
452 ASAN_OPTIONS: detect_leaks=0
453 TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ env.REPO_HOME }}/pdns/recursordist/recursor-tsan.supp"
7a4858f8 454 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
99bb3530 455 steps:
f9a8b3fb 456 - uses: actions/checkout@v3
99bb3530
PD
457 with:
458 fetch-depth: 5
459 submodules: recursive
460 - name: Fetch the binaries
c440b949 461 uses: actions/download-artifact@v3
99bb3530 462 with:
38529f81 463 name: pdns-recursor-${{ matrix.sanitizers }}
99bb3530 464 path: /opt/pdns-recursor
7d862cb3
AR
465 - run: inv apt-fresh
466 - run: inv add-auth-repo ${{ matrix.dist_name }} ${{ matrix.dist_release_name }} ${{ matrix.pdns_repo_version }}
99bb3530
PD
467 - run: inv install-clang-runtime
468 - run: inv install-rec-test-deps
469 - run: inv test-api recursor
628a1dec
RG
470 - run: inv generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE
471 if: ${{ matrix.sanitizers != 'tsan' }}
472 - name: Coveralls Parallel recursor API
473 if: ${{ matrix.sanitizers != 'tsan' }}
474 uses: coverallsapp/github-action@v2
475 with:
476 flag-name: rec-api
477 path-to-lcov: $GITHUB_WORKSPACE/coverage.lcov
478 parallel: true
479 allow-empty: true
99bb3530 480
6b45d67b
O
481 test-recursor-regression:
482 needs: build-recursor
483 runs-on: ubuntu-20.04
38529f81
O
484 strategy:
485 matrix:
77f73670 486 sanitizers: [ubsan+asan, tsan]
7d862cb3
AR
487 dist_name: [debian]
488 dist_release_name: [bullseye]
f9ec8228 489 pdns_repo_version: ['48']
7d862cb3
AR
490 container:
491 image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
492 env:
493 UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp'
494 ASAN_OPTIONS: detect_leaks=0
495 TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ env.REPO_HOME }}/pdns/recursordist/recursor-tsan.supp"
7a4858f8 496 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
6b45d67b 497 steps:
7d862cb3
AR
498 # - uses: PowerDNS/pdns/set-ubuntu-mirror@meta
499 - uses: actions/checkout@v3.1.0
6b45d67b
O
500 with:
501 fetch-depth: 5
502 submodules: recursive
503 - name: Fetch the binaries
c440b949 504 uses: actions/download-artifact@v3
6b45d67b 505 with:
38529f81 506 name: pdns-recursor-${{ matrix.sanitizers }}
6b45d67b 507 path: /opt/pdns-recursor
7d862cb3
AR
508 - run: inv apt-fresh
509 - run: inv add-auth-repo ${{ matrix.dist_name }} ${{ matrix.dist_release_name }} ${{ matrix.pdns_repo_version }}
6b45d67b
O
510 - run: inv install-clang-runtime
511 - run: inv install-rec-test-deps
512 - run: inv test-regression-recursor
628a1dec
RG
513 - run: inv generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE
514 if: ${{ matrix.sanitizers != 'tsan' }}
515 - name: Coveralls Parallel recursor regression
516 if: ${{ matrix.sanitizers != 'tsan' }}
517 uses: coverallsapp/github-action@v2
518 with:
519 flag-name: rec-regression
520 path-to-lcov: $GITHUB_WORKSPACE/coverage.lcov
521 parallel: true
522 allow-empty: true
6b45d67b
O
523
524 test-recursor-bulk:
5d88643c 525 name: 'test rec *mini* bulk'
6b45d67b
O
526 needs: build-recursor
527 runs-on: ubuntu-20.04
375c8fd6
O
528 strategy:
529 matrix:
6e75e139 530 sanitizers: [ubsan+asan, tsan]
6406db0b
OM
531 threads: [1, 2, 3, 4, 8]
532 mthreads: [2048]
ab6031a1 533 shards: [1, 2, 1024]
7d862cb3
AR
534 container:
535 image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
536 env:
537 UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp'
538 ASAN_OPTIONS: detect_leaks=0
539 TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ env.REPO_HOME }}/pdns/recursordist/recursor-tsan.supp"
7a4858f8 540 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
6b45d67b 541 steps:
f9a8b3fb 542 - uses: actions/checkout@v3
6b45d67b
O
543 with:
544 fetch-depth: 5
545 submodules: recursive
546 - name: Fetch the binaries
c440b949 547 uses: actions/download-artifact@v3
6b45d67b 548 with:
38529f81 549 name: pdns-recursor-${{ matrix.sanitizers }}
6b45d67b 550 path: /opt/pdns-recursor
6b45d67b 551 - run: inv install-clang-runtime
4467dd85 552 - run: inv install-rec-bulk-deps
375c8fd6 553 - run: inv test-bulk-recursor ${{ matrix.threads }} ${{ matrix.mthreads }} ${{ matrix.shards }}
628a1dec
RG
554 - run: inv generate-coverage-info /opt/pdns-recursor/sbin/pdns_recursor $GITHUB_WORKSPACE
555 if: ${{ matrix.sanitizers != 'tsan' }}
556 - name: Coveralls Parallel recursor bulk
557 if: ${{ matrix.sanitizers != 'tsan' }}
558 uses: coverallsapp/github-action@v2
559 with:
560 flag-name: rec-regression-bulk
561 path-to-lcov: $GITHUB_WORKSPACE/coverage.lcov
562 parallel: true
563 allow-empty: true
6b45d67b 564
99bb3530
PD
565 test-dnsdist-regression:
566 needs: build-dnsdist
567 runs-on: ubuntu-20.04
7ec6fb65
PD
568 strategy:
569 matrix:
570 sanitizers: [ubsan+asan, tsan]
7d862cb3
AR
571 container:
572 image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
573 env:
574 UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp"
575 # Disabling (intercept_send=0) the custom send wrappers for ASAN and TSAN because they cause the tools to report a race that doesn't exist on actual implementations of send(), see https://github.com/google/sanitizers/issues/1498
576 ASAN_OPTIONS: detect_leaks=0:intercept_send=0
577 TSAN_OPTIONS: "halt_on_error=1:intercept_send=0:suppressions=${{ env.REPO_HOME }}/pdns/dnsdistdist/dnsdist-tsan.supp"
578 # IncludeDir tests are disabled because of a weird interaction between TSAN and these tests which ever only happens on GH actions
579 SKIP_INCLUDEDIR_TESTS: yes
628a1dec
RG
580 SANITIZERS: ${{ matrix.sanitizers }}
581 COVERAGE: yes
7a4858f8 582 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
99bb3530 583 steps:
f9a8b3fb 584 - uses: actions/checkout@v3
99bb3530
PD
585 with:
586 fetch-depth: 5
587 submodules: recursive
588 - name: Fetch the binaries
c440b949 589 uses: actions/download-artifact@v3
99bb3530 590 with:
e3d6cf05 591 name: dnsdist-full-${{ matrix.sanitizers }}
99bb3530 592 path: /opt/dnsdist
99bb3530
PD
593 - run: inv install-clang-runtime
594 - run: inv install-dnsdist-test-deps
595 - run: inv test-dnsdist
628a1dec
RG
596 - run: inv generate-coverage-info /opt/dnsdist/bin/dnsdist $GITHUB_WORKSPACE
597 if: ${{ matrix.sanitizers != 'tsan' }}
598 - name: Coveralls Parallel dnsdist regression
599 if: ${{ matrix.sanitizers != 'tsan' }}
600 uses: coverallsapp/github-action@v2
601 with:
602 flag-name: dnsdist-regression-full-${{ matrix.sanitizers }}
603 path-to-lcov: $GITHUB_WORKSPACE/coverage.lcov
604 parallel: true
605 allow-empty: true
99bb3530 606
dab788a9 607 swagger-syntax-check:
d540dd1c 608 if: ${{ !github.event.schedule || vars.SCHEDULED_JOBS_BUILD_AND_TEST_ALL }}
dab788a9 609 runs-on: ubuntu-20.04
d92e93c7
PD
610 # FIXME: https://github.com/PowerDNS/pdns/pull/12880
611 # container:
612 # image: ghcr.io/powerdns/base-pdns-ci-image/debian-11-pdns-base:master
613 # options: --sysctl net.ipv6.conf.all.disable_ipv6=0
dab788a9 614 steps:
d92e93c7 615 - uses: PowerDNS/pdns/set-ubuntu-mirror@meta
f9a8b3fb 616 - uses: actions/checkout@v3
dab788a9
PD
617 with:
618 fetch-depth: 5
619 submodules: recursive
d92e93c7 620 - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade
dab788a9
PD
621 - run: inv install-swagger-tools
622 - run: inv swagger-syntax-check
623
e5841828
PD
624 collect:
625 needs:
626 - build-auth
e5841828 627 - build-dnsdist
b33a88da 628 - build-recursor
d1d7b61a 629 - swagger-syntax-check
e5841828
PD
630 - test-auth-api
631 - test-auth-backend
e5841828 632 - test-dnsdist-regression
b33a88da
PD
633 - test-ixfrdist
634 - test-recursor-api
375c8fd6
O
635 - test-recursor-regression
636 - test-recursor-bulk
254752e6 637 if: success() || failure()
e5841828
PD
638 runs-on: ubuntu-20.04
639 steps:
628a1dec
RG
640 - name: Coveralls Parallel Finished
641 uses: coverallsapp/github-action@v2
642 with:
643 parallel-finished: true
254752e6
AR
644 - name: Install jq and yq
645 run: "sudo snap install jq yq"
646 - name: Fail job if any of the previous jobs failed
647 run: "for i in `echo '${{ toJSON(needs) }}' | jq '.[].result' | tr -d '\"'`; do if [[ $i == 'failure' ]]; then echo '${{ toJSON(needs) }}'; exit 1; fi; done;"
f9a8b3fb 648 - uses: actions/checkout@v3
e5841828
PD
649 with:
650 fetch-depth: 5
651 submodules: recursive
254752e6
AR
652 - name: Get list of jobs in the workflow
653 run: "yq e '.jobs | keys' .github/workflows/build-and-test-all.yml | awk '{print $2}' | grep -v collect | sort | tee /tmp/workflow-jobs-list.yml"
654 - name: Get list of prerequisite jobs
655 run: "echo '${{ toJSON(needs) }}' | jq 'keys | .[]' | tr -d '\"' | sort | tee /tmp/workflow-needs-list.yml"
656 - name: Fail if there is a job missing on the needs list
657 run: "if ! diff -q /tmp/workflow-jobs-list.yml /tmp/workflow-needs-list.yml; then exit 1; fi"
99bb3530
PD
658
659# FIXME: if we can make upload/download-artifact fasts, running unit tests outside of build can let regression tests start earlier