]> git.ipfire.org Git - thirdparty/pdns.git/blob - .github/workflows/build-and-test-all.yml
build(deps): bump actions/checkout from 3 to 4
[thirdparty/pdns.git] / .github / workflows / build-and-test-all.yml
1 ---
2 name: 'Build and test everything'
3
4 on:
5 push:
6 pull_request:
7 schedule:
8 - cron: '0 22 * * 3'
9
10 permissions: # least privileges, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
11 contents: read
12
13 env:
14 COMPILER: clang
15 CLANG_VERSION: '13'
16 # github.workspace variable points to the Runner home folder. Container home folder defined below.
17 REPO_HOME: '/__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}'
18 BUILDER_VERSION: '0.0.0-git1'
19 COVERAGE: yes
20 LLVM_PROFILE_FILE: "/tmp/code-%p.profraw"
21 OPTIMIZATIONS: yes
22 DECAF_SUPPORT: yes
23
24 jobs:
25 build-auth:
26 name: build auth
27 if: ${{ !github.event.schedule || vars.SCHEDULED_JOBS_BUILD_AND_TEST_ALL }}
28 runs-on: ubuntu-20.04
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
37 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
38 defaults:
39 run:
40 working-directory: ./pdns-${{ env.BUILDER_VERSION }}
41 steps:
42 - uses: actions/checkout@v4
43 with:
44 fetch-depth: 5
45 submodules: recursive
46 - name: get timestamp for cache
47 id: get-stamp
48 run: |
49 echo "stamp=$(/bin/date +%s)" >> "$GITHUB_OUTPUT"
50 shell: bash
51 working-directory: .
52 - run: mkdir -p ~/.ccache
53 working-directory: .
54 - name: let GitHub cache our ccache data
55 uses: actions/cache@v3
56 with:
57 path: ~/.ccache
58 key: auth-ccache-${{ steps.get-stamp.outputs.stamp }}
59 restore-keys: auth-ccache-
60 - run: inv ci-autoconf
61 working-directory: .
62 - run: inv ci-auth-configure
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/
68 - run: inv ci-auth-install-remotebackend-test-deps
69 - run: inv ci-auth-run-unit-tests
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
79 - run: inv ci-make-install
80 - run: ccache -s
81 - name: Store the binaries
82 uses: actions/upload-artifact@v3 # this takes 30 seconds, maybe we want to tar
83 with:
84 name: pdns-auth
85 path: /opt/pdns-auth
86 retention-days: 1
87
88 build-recursor:
89 name: build recursor
90 if: ${{ !github.event.schedule || vars.SCHEDULED_JOBS_BUILD_AND_TEST_ALL }}
91 runs-on: ubuntu-20.04
92 strategy:
93 matrix:
94 sanitizers: [ubsan+asan, tsan]
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
102 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
103 defaults:
104 run:
105 working-directory: ./pdns/recursordist/pdns-recursor-${{ env.BUILDER_VERSION }}
106 steps:
107 - uses: actions/checkout@v4
108 with:
109 fetch-depth: 5
110 submodules: recursive
111 - name: get timestamp for cache
112 id: get-stamp
113 run: |
114 echo "stamp=$(/bin/date +%s)" >> "$GITHUB_OUTPUT"
115 shell: bash
116 working-directory: .
117 - run: mkdir -p ~/.ccache
118 working-directory: .
119 - name: let GitHub cache our ccache data
120 uses: actions/cache@v3
121 with:
122 path: ~/.ccache
123 key: recursor-${{ matrix.sanitizers }}-ccache-${{ steps.get-stamp.outputs.stamp }}
124 restore-keys: recursor-${{ matrix.sanitizers }}-ccache-
125 - run: inv ci-install-rust ${{ env.REPO_HOME }}
126 working-directory: ./pdns/recursordist/
127 - run: inv ci-autoconf
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/
133 - run: inv ci-rec-configure
134 - run: inv ci-rec-make-bear
135 - run: inv ci-rec-run-unit-tests
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
146 - run: inv ci-make-install
147 - run: ccache -s
148 - name: Store the binaries
149 uses: actions/upload-artifact@v3 # this takes 30 seconds, maybe we want to tar
150 with:
151 name: pdns-recursor-${{ matrix.sanitizers }}
152 path: /opt/pdns-recursor
153 retention-days: 1
154
155 build-dnsdist:
156 name: build dnsdist
157 if: ${{ !github.event.schedule || vars.SCHEDULED_JOBS_BUILD_AND_TEST_ALL }}
158 runs-on: ubuntu-20.04
159 strategy:
160 matrix:
161 sanitizers: [ubsan+asan, tsan]
162 features: [least, full]
163 exclude:
164 - sanitizers: tsan
165 features: least
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
173 FUZZING_TARGETS: yes
174 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
175 defaults:
176 run:
177 working-directory: ./pdns/dnsdistdist/dnsdist-${{ env.BUILDER_VERSION }}
178 steps:
179 - uses: actions/checkout@v4
180 with:
181 fetch-depth: 5
182 submodules: recursive
183 - name: get timestamp for cache
184 id: get-stamp
185 run: |
186 echo "stamp=$(/bin/date +%s)" >> "$GITHUB_OUTPUT"
187 shell: bash
188 working-directory: .
189 - run: mkdir -p ~/.ccache
190 working-directory: .
191 - name: let GitHub cache our ccache data
192 uses: actions/cache@v3
193 with:
194 path: ~/.ccache
195 key: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-ccache-${{ steps.get-stamp.outputs.stamp }}
196 restore-keys: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-ccache-
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/
201 - run: inv ci-autoconf
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/
207 - run: inv ci-dnsdist-configure ${{ matrix.features }}
208 - run: inv ci-dnsdist-make-bear
209 - run: inv ci-dnsdist-run-unit-tests
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
220 - run: inv ci-make-install
221 - run: ccache -s
222 - name: Store the binaries
223 uses: actions/upload-artifact@v3 # this takes 30 seconds, maybe we want to tar
224 with:
225 name: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}
226 path: /opt/dnsdist
227 retention-days: 1
228
229 test-auth-api:
230 needs: build-auth
231 runs-on: ubuntu-20.04
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"
239 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
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:
266 - uses: actions/checkout@v4
267 with:
268 fetch-depth: 5
269 submodules: recursive
270 - name: Fetch the binaries
271 uses: actions/download-artifact@v3
272 with:
273 name: pdns-auth
274 path: /opt/pdns-auth
275 - run: inv apt-fresh
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 }}
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
287
288 test-auth-backend:
289 needs: build-auth
290 runs-on: ubuntu-20.04
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"
299 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
300 strategy:
301 matrix:
302 include:
303 - backend: remote
304 image: coscale/docker-sleep
305 env: {}
306 ports: []
307 - backend: gmysql
308 image: mysql:5
309 env:
310 MYSQL_ALLOW_EMPTY_PASSWORD: 1
311 ports:
312 - 3306:3306
313 - backend: gmysql
314 image: mariadb:10
315 env:
316 MYSQL_ALLOW_EMPTY_PASSWORD: 1
317 ports:
318 - 3306:3306
319 - backend: gpgsql
320 image: postgres:9
321 env:
322 POSTGRES_USER: runner
323 POSTGRES_HOST_AUTH_METHOD: trust
324 ports:
325 - 5432:5432
326 - backend: gsqlite3 # this also runs regression-tests.nobackend and pdnsutil test-algorithms
327 image: coscale/docker-sleep
328 env: {}
329 ports: []
330 - backend: lmdb
331 image: coscale/docker-sleep
332 env: {}
333 ports: []
334 - backend: bind
335 image: coscale/docker-sleep
336 env: {}
337 ports: []
338 - backend: geoip
339 image: coscale/docker-sleep
340 env: {}
341 ports: []
342 - backend: lua2
343 image: coscale/docker-sleep
344 env: {}
345 ports: []
346 - backend: tinydns
347 image: coscale/docker-sleep
348 env: {}
349 ports: []
350 - backend: authpy
351 image: coscale/docker-sleep
352 env: {}
353 ports: []
354 - backend: godbc_sqlite3
355 image: coscale/docker-sleep
356 env: {}
357 ports: []
358 - backend: godbc_mssql
359 image: mcr.microsoft.com/mssql/server:2017-GA-ubuntu
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: []
376 fail-fast: false
377 services:
378 database:
379 image: ${{ matrix.image }}
380 env: ${{ matrix.env }}
381 ports: ${{ matrix.ports }}
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:
386 - uses: actions/checkout@v4
387 with:
388 fetch-depth: 5
389 submodules: recursive
390 - name: Fetch the binaries
391 uses: actions/download-artifact@v3
392 with:
393 name: pdns-auth
394 path: /opt/pdns-auth
395 # FIXME: install recursor for backends that have ALIAS
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 }}
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
407
408 test-ixfrdist:
409 needs: build-auth
410 runs-on: ubuntu-20.04
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
416 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
417 steps:
418 - uses: actions/checkout@v4
419 with:
420 fetch-depth: 5
421 submodules: recursive
422 - name: Fetch the binaries
423 uses: actions/download-artifact@v3
424 with:
425 name: pdns-auth
426 path: /opt/pdns-auth
427 - run: inv install-clang-runtime
428 - run: inv install-auth-test-deps
429 - run: inv test-ixfrdist
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
438
439 test-recursor-api:
440 needs: build-recursor
441 runs-on: ubuntu-20.04
442 strategy:
443 matrix:
444 sanitizers: [ubsan+asan, tsan]
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"
454 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
455 steps:
456 - uses: actions/checkout@v4
457 with:
458 fetch-depth: 5
459 submodules: recursive
460 - name: Fetch the binaries
461 uses: actions/download-artifact@v3
462 with:
463 name: pdns-recursor-${{ matrix.sanitizers }}
464 path: /opt/pdns-recursor
465 - run: inv apt-fresh
466 - run: inv add-auth-repo ${{ matrix.dist_name }} ${{ matrix.dist_release_name }} ${{ matrix.pdns_repo_version }}
467 - run: inv install-clang-runtime
468 - run: inv install-rec-test-deps
469 - run: inv test-api recursor
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
480
481 test-recursor-regression:
482 needs: build-recursor
483 runs-on: ubuntu-20.04
484 strategy:
485 matrix:
486 sanitizers: [ubsan+asan, tsan]
487 dist_name: [debian]
488 dist_release_name: [bullseye]
489 pdns_repo_version: ['48']
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"
496 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
497 steps:
498 # - uses: PowerDNS/pdns/set-ubuntu-mirror@meta
499 - uses: actions/checkout@v4
500 with:
501 fetch-depth: 5
502 submodules: recursive
503 - name: Fetch the binaries
504 uses: actions/download-artifact@v3
505 with:
506 name: pdns-recursor-${{ matrix.sanitizers }}
507 path: /opt/pdns-recursor
508 - run: inv apt-fresh
509 - run: inv add-auth-repo ${{ matrix.dist_name }} ${{ matrix.dist_release_name }} ${{ matrix.pdns_repo_version }}
510 - run: inv install-clang-runtime
511 - run: inv install-rec-test-deps
512 - run: inv test-regression-recursor
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
523
524 test-recursor-bulk:
525 name: 'test rec *mini* bulk'
526 needs: build-recursor
527 runs-on: ubuntu-20.04
528 strategy:
529 matrix:
530 sanitizers: [ubsan+asan, tsan]
531 threads: [1, 2, 3, 4, 8]
532 mthreads: [2048]
533 shards: [1, 2, 1024]
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"
540 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
541 steps:
542 - uses: actions/checkout@v4
543 with:
544 fetch-depth: 5
545 submodules: recursive
546 - name: Fetch the binaries
547 uses: actions/download-artifact@v3
548 with:
549 name: pdns-recursor-${{ matrix.sanitizers }}
550 path: /opt/pdns-recursor
551 - run: inv install-clang-runtime
552 - run: inv install-rec-bulk-deps
553 - run: inv test-bulk-recursor ${{ matrix.threads }} ${{ matrix.mthreads }} ${{ matrix.shards }}
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
564
565 test-dnsdist-regression:
566 needs: build-dnsdist
567 runs-on: ubuntu-20.04
568 strategy:
569 matrix:
570 sanitizers: [ubsan+asan, tsan]
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
580 SANITIZERS: ${{ matrix.sanitizers }}
581 COVERAGE: yes
582 options: --sysctl net.ipv6.conf.all.disable_ipv6=0
583 steps:
584 - uses: actions/checkout@v4
585 with:
586 fetch-depth: 5
587 submodules: recursive
588 - name: Fetch the binaries
589 uses: actions/download-artifact@v3
590 with:
591 name: dnsdist-full-${{ matrix.sanitizers }}
592 path: /opt/dnsdist
593 - run: inv install-clang-runtime
594 - run: inv install-dnsdist-test-deps
595 - run: inv test-dnsdist
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
606
607 swagger-syntax-check:
608 if: ${{ !github.event.schedule || vars.SCHEDULED_JOBS_BUILD_AND_TEST_ALL }}
609 runs-on: ubuntu-20.04
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
614 steps:
615 - uses: PowerDNS/pdns/set-ubuntu-mirror@meta
616 - uses: actions/checkout@v4
617 with:
618 fetch-depth: 5
619 submodules: recursive
620 - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade
621 - run: inv install-swagger-tools
622 - run: inv swagger-syntax-check
623
624 collect:
625 needs:
626 - build-auth
627 - build-dnsdist
628 - build-recursor
629 - swagger-syntax-check
630 - test-auth-api
631 - test-auth-backend
632 - test-dnsdist-regression
633 - test-ixfrdist
634 - test-recursor-api
635 - test-recursor-regression
636 - test-recursor-bulk
637 if: success() || failure()
638 runs-on: ubuntu-20.04
639 steps:
640 - name: Coveralls Parallel Finished
641 uses: coverallsapp/github-action@v2
642 with:
643 parallel-finished: true
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;"
648 - uses: actions/checkout@v4
649 with:
650 fetch-depth: 5
651 submodules: recursive
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"
658
659 # FIXME: if we can make upload/download-artifact fasts, running unit tests outside of build can let regression tests start earlier