]>
Commit | Line | Data |
---|---|---|
99bb3530 PD |
1 | --- |
2 | name: 'Build and test everything' | |
3 | ||
4 | on: | |
5 | push: | |
6 | pull_request: | |
7 | schedule: | |
8 | - cron: '0 22 * * 3' | |
9 | ||
10 | jobs: | |
11 | build-auth: | |
12 | name: build auth | |
13 | runs-on: ubuntu-20.04 | |
14 | env: | |
cba436ef | 15 | UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp" |
99bb3530 PD |
16 | ASAN_OPTIONS: detect_leaks=0 |
17 | steps: | |
18 | - uses: actions/checkout@v2.3.4 | |
19 | with: | |
20 | fetch-depth: 5 | |
21 | submodules: recursive | |
d3cb00f9 PD |
22 | - name: get timestamp for cache |
23 | id: get-stamp | |
24 | run: | | |
25 | echo "::set-output name=stamp::$(/bin/date +%s)" | |
26 | shell: bash | |
27 | - name: let GitHub cache our ccache data | |
28 | uses: actions/cache@v2 | |
29 | with: | |
30 | path: ~/.ccache | |
31 | key: auth-ccache-${{ steps.get-stamp.outputs.stamp }} | |
32 | restore-keys: auth-ccache- | |
99bb3530 PD |
33 | - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade |
34 | - run: inv install-clang | |
35 | - run: inv install-auth-build-deps | |
36 | - run: inv ci-autoconf | |
37 | - run: inv ci-auth-configure | |
38 | - run: inv ci-auth-make | |
e55d3a4b | 39 | - run: inv ci-auth-install-remotebackend-test-deps |
99bb3530 PD |
40 | - run: inv ci-auth-run-unit-tests |
41 | - run: inv ci-make-install | |
d3cb00f9 | 42 | - run: ccache -s |
99bb3530 PD |
43 | - name: Store the binaries |
44 | uses: actions/upload-artifact@v2 # this takes 30 seconds, maybe we want to tar | |
45 | with: | |
46 | name: pdns-auth | |
47 | path: /opt/pdns-auth | |
196e7d18 | 48 | retention-days: 1 |
99bb3530 PD |
49 | |
50 | build-recursor: | |
51 | name: build recursor | |
52 | runs-on: ubuntu-20.04 | |
38529f81 O |
53 | strategy: |
54 | matrix: | |
719e5764 | 55 | sanitizers: [ubsan+asan, tsan] |
99bb3530 | 56 | env: |
cba436ef | 57 | UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp" |
99bb3530 | 58 | ASAN_OPTIONS: detect_leaks=0 |
38529f81 | 59 | SANITIZERS: ${{ matrix.sanitizers }} |
99bb3530 PD |
60 | defaults: |
61 | run: | |
62 | working-directory: ./pdns/recursordist/ | |
63 | steps: | |
64 | - uses: actions/checkout@v2.3.4 | |
65 | with: | |
66 | fetch-depth: 5 | |
67 | submodules: recursive | |
d3cb00f9 PD |
68 | - name: get timestamp for cache |
69 | id: get-stamp | |
70 | run: | | |
71 | echo "::set-output name=stamp::$(/bin/date +%s)" | |
72 | shell: bash | |
73 | - name: let GitHub cache our ccache data | |
74 | uses: actions/cache@v2 | |
75 | with: | |
76 | path: ~/.ccache | |
38529f81 O |
77 | key: recursor-${{ matrix.sanitizers }}-ccache-${{ steps.get-stamp.outputs.stamp }} |
78 | restore-keys: recursor-${{ matrix.sanitizers }}-ccache- | |
99bb3530 PD |
79 | - run: ../../build-scripts/gh-actions-setup-inv # this runs apt update+upgrade |
80 | - run: inv apt-fresh | |
81 | - run: inv install-clang | |
82 | - run: inv install-rec-build-deps | |
83 | - run: inv ci-autoconf | |
84 | - run: inv ci-rec-configure | |
85 | - run: inv ci-rec-make | |
99bb3530 PD |
86 | - run: inv ci-rec-run-unit-tests |
87 | - run: inv ci-make-install | |
d3cb00f9 | 88 | - run: ccache -s |
99bb3530 PD |
89 | - name: Store the binaries |
90 | uses: actions/upload-artifact@v2 # this takes 30 seconds, maybe we want to tar | |
91 | with: | |
38529f81 | 92 | name: pdns-recursor-${{ matrix.sanitizers }} |
99bb3530 | 93 | path: /opt/pdns-recursor |
196e7d18 | 94 | retention-days: 1 |
0e77de07 | 95 | |
99bb3530 PD |
96 | build-dnsdist: |
97 | name: build dnsdist | |
98 | runs-on: ubuntu-20.04 | |
7ec6fb65 PD |
99 | strategy: |
100 | matrix: | |
101 | sanitizers: [ubsan+asan, tsan] | |
e3d6cf05 RG |
102 | features: [least, full] |
103 | exclude: | |
104 | - sanitizers: tsan | |
105 | features: least | |
99bb3530 | 106 | env: |
cba436ef | 107 | UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp" |
99bb3530 | 108 | ASAN_OPTIONS: detect_leaks=0 |
7ec6fb65 | 109 | SANITIZERS: ${{ matrix.sanitizers }} |
99bb3530 PD |
110 | defaults: |
111 | run: | |
112 | working-directory: ./pdns/dnsdistdist/ | |
113 | steps: | |
114 | - uses: actions/checkout@v2.3.4 | |
115 | with: | |
116 | fetch-depth: 5 | |
117 | submodules: recursive | |
d3cb00f9 PD |
118 | - name: get timestamp for cache |
119 | id: get-stamp | |
120 | run: | | |
121 | echo "::set-output name=stamp::$(/bin/date +%s)" | |
122 | shell: bash | |
123 | - name: let GitHub cache our ccache data | |
124 | uses: actions/cache@v2 | |
125 | with: | |
126 | path: ~/.ccache | |
e3d6cf05 RG |
127 | key: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-ccache-${{ steps.get-stamp.outputs.stamp }} |
128 | restore-keys: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }}-ccache- | |
99bb3530 PD |
129 | - run: ../../build-scripts/gh-actions-setup-inv # this runs apt update+upgrade |
130 | - run: inv apt-fresh | |
131 | - run: inv install-clang | |
132 | - run: inv install-dnsdist-build-deps | |
133 | - run: inv ci-autoconf | |
e3d6cf05 | 134 | - run: inv ci-dnsdist-configure ${{ matrix.features }} |
99bb3530 | 135 | - run: inv ci-dnsdist-make |
99bb3530 PD |
136 | - run: inv ci-dnsdist-run-unit-tests |
137 | - run: inv ci-make-install | |
d3cb00f9 | 138 | - run: ccache -s |
99bb3530 PD |
139 | - name: Store the binaries |
140 | uses: actions/upload-artifact@v2 # this takes 30 seconds, maybe we want to tar | |
141 | with: | |
e3d6cf05 | 142 | name: dnsdist-${{ matrix.features }}-${{ matrix.sanitizers }} |
99bb3530 | 143 | path: /opt/dnsdist |
196e7d18 | 144 | retention-days: 1 |
99bb3530 PD |
145 | |
146 | test-auth-api: | |
147 | needs: build-auth | |
148 | runs-on: ubuntu-20.04 | |
149 | env: | |
cba436ef | 150 | UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp" |
99bb3530 | 151 | ASAN_OPTIONS: detect_leaks=0 |
cba436ef | 152 | TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ github.workspace }}/pdns/dnsdistdist/dnsdist-tsan.supp" |
99bb3530 PD |
153 | strategy: |
154 | matrix: | |
155 | include: | |
156 | - backend: gsqlite3 | |
157 | image: coscale/docker-sleep | |
158 | - backend: gmysql | |
159 | image: mysql:5 | |
160 | - backend: gpgsql | |
161 | image: postgres:9 | |
162 | - backend: lmdb | |
163 | image: coscale/docker-sleep | |
164 | fail-fast: false | |
165 | services: | |
166 | database: | |
167 | image: ${{ matrix.image }} | |
168 | env: | |
169 | POSTGRES_USER: runner | |
170 | POSTGRES_HOST_AUTH_METHOD: trust | |
171 | MYSQL_ALLOW_EMPTY_PASSWORD: 1 | |
172 | ports: | |
173 | - 3306:3306 | |
174 | - 5432:5432 | |
175 | # 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. | |
176 | options: >- | |
177 | --restart always | |
178 | steps: | |
179 | - uses: actions/checkout@v2.3.4 | |
180 | with: | |
181 | fetch-depth: 5 | |
182 | submodules: recursive | |
183 | - name: Fetch the binaries | |
c440b949 | 184 | uses: actions/download-artifact@v3 |
99bb3530 PD |
185 | with: |
186 | name: pdns-auth | |
187 | path: /opt/pdns-auth | |
188 | # - name: Setup upterm session | |
189 | # uses: lhotari/action-upterm@v1 | |
190 | - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade | |
191 | - run: inv install-clang-runtime | |
192 | - run: inv install-auth-test-deps -b ${{ matrix.backend }} | |
193 | - run: inv test-api auth -b ${{ matrix.backend }} | |
194 | ||
0e77de07 PD |
195 | test-auth-backend: |
196 | needs: build-auth | |
197 | runs-on: ubuntu-20.04 | |
198 | env: | |
cba436ef | 199 | UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp" |
0e77de07 PD |
200 | ASAN_OPTIONS: detect_leaks=0 |
201 | strategy: | |
202 | matrix: | |
203 | include: | |
204 | - backend: remote | |
205 | image: coscale/docker-sleep | |
b33a88da PD |
206 | - backend: gmysql |
207 | image: mysql:5 | |
208 | - backend: gmysql | |
209 | image: mariadb:10 | |
210 | - backend: gpgsql | |
211 | image: postgres:9 | |
222d17e2 PD |
212 | - backend: gsqlite3 # this also runs regression-tests.nobackend and pdnsutil test-algorithms |
213 | image: coscale/docker-sleep | |
b33a88da PD |
214 | - backend: lmdb |
215 | image: coscale/docker-sleep | |
216 | - backend: bind | |
217 | image: coscale/docker-sleep | |
218 | - backend: geoip | |
219 | image: coscale/docker-sleep | |
220 | - backend: lua2 | |
221 | image: coscale/docker-sleep | |
222 | - backend: tinydns | |
223 | image: coscale/docker-sleep | |
222d17e2 PD |
224 | - backend: authpy |
225 | image: coscale/docker-sleep | |
0e77de07 PD |
226 | fail-fast: false |
227 | services: | |
228 | database: | |
229 | image: ${{ matrix.image }} | |
230 | env: | |
231 | POSTGRES_USER: runner | |
232 | POSTGRES_HOST_AUTH_METHOD: trust | |
233 | MYSQL_ALLOW_EMPTY_PASSWORD: 1 | |
234 | ports: | |
235 | - 3306:3306 | |
236 | - 5432:5432 | |
237 | # 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. | |
238 | options: >- | |
239 | --restart always | |
240 | steps: | |
241 | - uses: actions/checkout@v2.3.4 | |
242 | with: | |
243 | fetch-depth: 5 | |
244 | submodules: recursive | |
245 | - name: Fetch the binaries | |
c440b949 | 246 | uses: actions/download-artifact@v3 |
0e77de07 PD |
247 | with: |
248 | name: pdns-auth | |
249 | path: /opt/pdns-auth | |
250 | # - name: Setup upterm session | |
251 | # uses: lhotari/action-upterm@v1 | |
252 | # FIXME: install recursor for backends that have ALIAS | |
253 | - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade | |
254 | - run: inv install-clang-runtime | |
255 | - run: inv install-auth-test-deps -b ${{ matrix.backend }} | |
256 | - run: inv test-auth-backend -b ${{ matrix.backend }} | |
257 | ||
b33a88da PD |
258 | test-ixfrdist: |
259 | needs: build-auth | |
260 | runs-on: ubuntu-20.04 | |
261 | env: | |
cba436ef | 262 | UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp" |
b33a88da PD |
263 | ASAN_OPTIONS: detect_leaks=0 |
264 | steps: | |
265 | - uses: actions/checkout@v2.3.4 | |
266 | with: | |
267 | fetch-depth: 5 | |
268 | submodules: recursive | |
269 | - name: Fetch the binaries | |
c440b949 | 270 | uses: actions/download-artifact@v3 |
b33a88da PD |
271 | with: |
272 | name: pdns-auth | |
273 | path: /opt/pdns-auth | |
274 | - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade | |
275 | - run: inv install-clang-runtime | |
222d17e2 | 276 | - run: inv install-auth-test-deps |
b33a88da PD |
277 | - run: inv test-ixfrdist |
278 | ||
99bb3530 PD |
279 | test-recursor-api: |
280 | needs: build-recursor | |
281 | runs-on: ubuntu-20.04 | |
38529f81 O |
282 | strategy: |
283 | matrix: | |
719e5764 | 284 | sanitizers: [ubsan+asan, tsan] |
99bb3530 | 285 | env: |
cba436ef | 286 | UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp" |
99bb3530 | 287 | ASAN_OPTIONS: detect_leaks=0 |
38529f81 | 288 | TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ github.workspace }}/pdns/recursordist/recursor-tsan.supp" |
99bb3530 PD |
289 | steps: |
290 | - uses: actions/checkout@v2.3.4 | |
291 | with: | |
292 | fetch-depth: 5 | |
293 | submodules: recursive | |
294 | - name: Fetch the binaries | |
c440b949 | 295 | uses: actions/download-artifact@v3 |
99bb3530 | 296 | with: |
38529f81 | 297 | name: pdns-recursor-${{ matrix.sanitizers }} |
99bb3530 PD |
298 | path: /opt/pdns-recursor |
299 | - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade | |
300 | - run: inv add-auth-repo # FIXME: do we need this for rec API testing? | |
301 | - run: inv install-clang-runtime | |
302 | - run: inv install-rec-test-deps | |
303 | - run: inv test-api recursor | |
304 | ||
6b45d67b O |
305 | test-recursor-regression: |
306 | needs: build-recursor | |
307 | runs-on: ubuntu-20.04 | |
38529f81 O |
308 | strategy: |
309 | matrix: | |
77f73670 | 310 | sanitizers: [ubsan+asan, tsan] |
6b45d67b | 311 | env: |
c03bc8a7 | 312 | UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp' |
6b45d67b | 313 | ASAN_OPTIONS: detect_leaks=0 |
38529f81 | 314 | TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ github.workspace }}/pdns/recursordist/recursor-tsan.supp" |
6b45d67b O |
315 | steps: |
316 | - uses: actions/checkout@v2.3.4 | |
317 | with: | |
318 | fetch-depth: 5 | |
319 | submodules: recursive | |
320 | - name: Fetch the binaries | |
c440b949 | 321 | uses: actions/download-artifact@v3 |
6b45d67b | 322 | with: |
38529f81 | 323 | name: pdns-recursor-${{ matrix.sanitizers }} |
6b45d67b O |
324 | path: /opt/pdns-recursor |
325 | - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade | |
326 | - run: inv add-auth-repo | |
327 | - run: inv install-clang-runtime | |
328 | - run: inv install-rec-test-deps | |
329 | - run: inv test-regression-recursor | |
330 | ||
331 | test-recursor-bulk: | |
5d88643c | 332 | name: 'test rec *mini* bulk' |
6b45d67b O |
333 | needs: build-recursor |
334 | runs-on: ubuntu-20.04 | |
375c8fd6 O |
335 | strategy: |
336 | matrix: | |
2e8f4675 | 337 | sanitizers: [ubsan+asan] |
375c8fd6 O |
338 | threads: [1, 2, 3, 4, 8, 16] |
339 | mthreads: [2048, 4096] | |
ab6031a1 | 340 | shards: [1, 2, 1024] |
6b45d67b | 341 | env: |
c03bc8a7 | 342 | UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp' |
6b45d67b | 343 | ASAN_OPTIONS: detect_leaks=0 |
38529f81 | 344 | TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ github.workspace }}/pdns/recursordist/recursor-tsan.supp" |
6b45d67b O |
345 | steps: |
346 | - uses: actions/checkout@v2.3.4 | |
347 | with: | |
348 | fetch-depth: 5 | |
349 | submodules: recursive | |
350 | - name: Fetch the binaries | |
c440b949 | 351 | uses: actions/download-artifact@v3 |
6b45d67b | 352 | with: |
38529f81 | 353 | name: pdns-recursor-${{ matrix.sanitizers }} |
6b45d67b O |
354 | path: /opt/pdns-recursor |
355 | - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade | |
356 | - run: inv install-clang-runtime | |
4467dd85 | 357 | - run: inv install-rec-bulk-deps |
375c8fd6 | 358 | - run: inv test-bulk-recursor ${{ matrix.threads }} ${{ matrix.mthreads }} ${{ matrix.shards }} |
6b45d67b | 359 | |
99bb3530 PD |
360 | test-dnsdist-regression: |
361 | needs: build-dnsdist | |
362 | runs-on: ubuntu-20.04 | |
7ec6fb65 PD |
363 | strategy: |
364 | matrix: | |
365 | sanitizers: [ubsan+asan, tsan] | |
99bb3530 | 366 | env: |
cba436ef | 367 | UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp" |
99bb3530 | 368 | ASAN_OPTIONS: detect_leaks=0 |
cba436ef | 369 | TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ github.workspace }}/pdns/dnsdistdist/dnsdist-tsan.supp" |
9fe42298 RG |
370 | # IncludeDir tests are disabled because of a weird interaction between TSAN and these tests which ever only happens on GH actions |
371 | SKIP_INCLUDEDIR_TESTS: yes | |
99bb3530 PD |
372 | steps: |
373 | - uses: actions/checkout@v2.3.4 | |
374 | with: | |
375 | fetch-depth: 5 | |
376 | submodules: recursive | |
377 | - name: Fetch the binaries | |
c440b949 | 378 | uses: actions/download-artifact@v3 |
99bb3530 | 379 | with: |
e3d6cf05 | 380 | name: dnsdist-full-${{ matrix.sanitizers }} |
99bb3530 PD |
381 | path: /opt/dnsdist |
382 | - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade | |
383 | - run: inv install-clang-runtime | |
384 | - run: inv install-dnsdist-test-deps | |
385 | - run: inv test-dnsdist | |
386 | ||
dab788a9 PD |
387 | swagger-syntax-check: |
388 | runs-on: ubuntu-20.04 | |
389 | steps: | |
390 | - uses: actions/checkout@v2.3.4 | |
391 | with: | |
392 | fetch-depth: 5 | |
393 | submodules: recursive | |
394 | - run: build-scripts/gh-actions-setup-inv # this runs apt update+upgrade | |
395 | - run: inv install-swagger-tools | |
396 | - run: inv swagger-syntax-check | |
397 | ||
e5841828 PD |
398 | collect: |
399 | needs: | |
400 | - build-auth | |
e5841828 | 401 | - build-dnsdist |
b33a88da | 402 | - build-recursor |
d1d7b61a | 403 | - swagger-syntax-check |
e5841828 PD |
404 | - test-auth-api |
405 | - test-auth-backend | |
e5841828 | 406 | - test-dnsdist-regression |
b33a88da PD |
407 | - test-ixfrdist |
408 | - test-recursor-api | |
375c8fd6 O |
409 | - test-recursor-regression |
410 | - test-recursor-bulk | |
e5841828 PD |
411 | runs-on: ubuntu-20.04 |
412 | steps: | |
413 | - uses: actions/checkout@v2.3.4 | |
414 | with: | |
415 | fetch-depth: 5 | |
416 | submodules: recursive | |
417 | - name: Install yq | |
418 | run: sudo wget https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq | |
419 | - name: Get full list of jobs for this workflow | |
420 | run: yq e '.jobs | keys' .github/workflows/build-and-test-all.yml | grep -v '^- collect' | sort | tee /tmp/workflow-jobs-list.yml | |
421 | - name: Get list of jobs the collect job depends on | |
422 | run: yq e '.jobs.collect.needs | ... comments=""' .github/workflows/build-and-test-all.yml | sort | tee /tmp/workflow-collect-dependencies.yml | |
423 | - name: Diff them | |
424 | run: diff -u /tmp/workflow-jobs-list.yml /tmp/workflow-collect-dependencies.yml | |
99bb3530 PD |
425 | |
426 | # FIXME: if we can make upload/download-artifact fasts, running unit tests outside of build can let regression tests start earlier |