]> git.ipfire.org Git - thirdparty/pdns.git/blame - .circleci/config.yml
Collect some stats
[thirdparty/pdns.git] / .circleci / config.yml
CommitLineData
fbd89850
PD
1version: 2.1
2
3commands:
85277158
PL
4 checkout-shallow:
5 description: "Do a shallow checkout of the repository"
6 steps:
7 - run:
8 name: Install git and openssh
9 command: apt-get update && apt-get -qq -y install openssh-client git
10 - run:
11 name: Store the keyid for the git repo
12 command: mkdir -p $HOME/.ssh && ssh-keyscan $(echo ${CIRCLE_REPOSITORY_URL} | sed 's,.*@\([^:]*\):.*,\1,') > $HOME/.ssh/known_hosts
13 - run:
14 name: Clone the repo
2045291c 15 command: |
06fde25c 16 mkdir -p /opt/project
2045291c
KH
17 if [ -n "$CIRCLE_PR_NUMBER" ]
18 then
19 echo === Checking out PR "$CIRCLE_PR_NUMBER" from "$CIRCLE_REPOSITORY_URL"
06fde25c
PD
20 git clone --depth 1 $CIRCLE_REPOSITORY_URL /opt/project
21 cd /opt/project
2045291c
KH
22 git fetch --depth 1 origin +refs/pull/${CIRCLE_PR_NUMBER}/merge
23 git checkout -qf FETCH_HEAD
24 else
25 echo === Checking out branch "${CIRCLE_BRANCH}" from "$CIRCLE_REPOSITORY_URL"
06fde25c 26 git clone --depth 1 --branch $CIRCLE_BRANCH $CIRCLE_REPOSITORY_URL /opt/project
2045291c 27 fi
06fde25c 28 cd /opt/project
bf0e6ec0 29 git --no-pager show -s
85277158 30
06fde25c
PD
31 get-workspace:
32 description: "Attach workspace to /opt and symlink checkout into home"
33 steps:
34 - run:
35 name: ensure ca-certificates is installed
36 command: apt-get update && apt-get -qq -y install ca-certificates
37 - attach_workspace:
38 at: /opt
39 - run:
40 name: symlink checkout into home
41 command: rmdir ~/project && ln -s /opt/project ~/project
294df2f7
OM
42 - run:
43 name: include $BASH_ENV for both interactive and non-interactive shells
44 command: echo '. $BASH_ENV' >> $HOME/.bashrc
06fde25c 45
4dc779ef
PL
46 install-coverity-tools:
47 description: Install the coverity tools to /usr/local
48 steps:
49 - run:
50 name: Install Coverity tools
abc49a2b 51 command: curl -s https://scan.coverity.com/download/linux64 --data "token=${COVERITY_TOKEN}&project=${COVERITY_PROJECT}" | gunzip | tar xvf /dev/stdin --strip-components=1 --no-same-owner -C /usr/local
4dc779ef 52
af96487b
PL
53 add-docs-upload-ssh:
54 description: Add ssh known_hosts fingerprints
55 steps:
56 - run:
79961c36 57 command: mkdir -p $HOME/.ssh && echo "${DOCS_HOST} ${DOCS_FINGERPRINT}" > $HOME/.ssh/known_hosts
d550fcf8
PL
58 - add_ssh_keys:
59 fingerprints:
60 - "3e:0a:aa:2c:30:69:89:f3:eb:17:c1:3f:3b:78:40:7a"
af96487b 61
2bfa1796
PL
62 auth-regress-setup:
63 description: Prepare the environment for auth regression tests
fbd89850 64 steps:
06fde25c 65 - get-workspace
2bfa1796 66 - install-auth-deps
85277158
PL
67 - run:
68 name: Install test dependencies
69 command: |
70 apt-get -y -qq install \
71 bc \
72 bind9utils \
d1986d2f 73 curl \
85277158
PL
74 default-jre-headless \
75 dnsutils \
76 ldnsutils \
e9b496b9 77 libnet-dns-perl \
85277158 78 unbound-host
2bfa1796
PL
79 - run:
80 name: Install jdnssectools
81 command: |
294df2f7 82 if [ ! -e $HOME/bin/jdnssec-verifyzone ]; then
2bfa1796
PL
83 apt-get install -qq -y wget
84 wget https://github.com/dblacka/jdnssec-tools/releases/download/0.14/jdnssec-tools-0.14.tar.gz
294df2f7 85 tar xfz jdnssec-tools-0.14.tar.gz -C $HOME
2bfa1796
PL
86 rm jdnssec-tools-0.14.tar.gz
87 fi
294df2f7 88 echo 'export PATH=$HOME/jdnssec-tools-0.14/bin:$PATH' >> $BASH_ENV
7cc012b7
PL
89 - run:
90 name: Allow missing tools in verify-dnssec-zone
91 command: touch regression-tests/tests/verify-dnssec-zone/allow-missing
2bfa1796
PL
92
93 auth-regress:
94 description: Run one auth regression context
95 parameters:
96 skip:
97 type: string
98 default: ""
8f1ac516
PL
99 rootskip:
100 type: string
101 default: ""
3001deca
PL
102 doroot:
103 type: boolean
104 default: true
2bfa1796
PL
105 context:
106 type: string
107 default: ""
108 prefix:
109 type: string
110 default: "/opt/pdns-auth/"
111 steps:
85277158
PL
112 - run:
113 workdir: ~/project/regression-tests
114 name: Run << parameters.context >> tests
115 command: |
116 [ -e ./vars ] && . ./vars
294df2f7 117 export
85277158
PL
118 rm -rf tests/*/skip
119 for t in << parameters.skip >>
120 do
121 touch tests/$t/skip
122 done
123 PDNS=<< parameters.prefix >>sbin/pdns_server \
124 PDNS2=<< parameters.prefix >>sbin/pdns_server \
125 SDIG=<< parameters.prefix >>bin/sdig \
126 NOTIFY=<< parameters.prefix >>bin/pdns_notify \
127 NSEC3DIG=<< parameters.prefix >>bin/nsec3dig \
128 SAXFR=<< parameters.prefix >>bin/saxfr \
129 ZONE2SQL=<< parameters.prefix >>bin/zone2sql \
8f1ac516
PL
130 ZONE2LDAP=<< parameters.prefix >>bin/zone2ldap \
131 PDNSUTIL=<< parameters.prefix >>bin/pdnsutil \
132 PDNSCONTROL=<< parameters.prefix >>bin/pdns_control \
133 ./start-test-stop 5300 << parameters.context >>
3001deca
PL
134 - when:
135 condition: << parameters.doroot >>
136 steps:
137 - run:
138 workdir: ~/project/regression-tests.rootzone
139 name: Run << parameters.context >> tests for the root zone
140 command: |
141 [ -e ../regression-tests/vars ] && . ../regression-tests/vars
142 rm -rf tests/*/skip
143 for t in << parameters.rootskip >>
144 do
145 touch tests/$t/skip
146 done
147 PDNS=<< parameters.prefix >>sbin/pdns_server \
148 PDNS2=<< parameters.prefix >>sbin/pdns_server \
149 SDIG=<< parameters.prefix >>bin/sdig \
150 NOTIFY=<< parameters.prefix >>bin/pdns_notify \
151 NSEC3DIG=<< parameters.prefix >>bin/nsec3dig \
152 SAXFR=<< parameters.prefix >>bin/saxfr \
153 ZONE2SQL=<< parameters.prefix >>bin/zone2sql \
154 ZONE2LDAP=<< parameters.prefix >>bin/zone2ldap \
155 PDNSUTIL=<< parameters.prefix >>bin/pdnsutil \
156 PDNSCONTROL=<< parameters.prefix >>bin/pdns_control \
157 ./start-test-stop 5300 << parameters.context >>
fbd89850 158
36d385ad
PL
159 install-recursor-deps:
160 description: "Install all libraries needed for the recursor"
161 steps:
162 - run: apt-get update
163 - run:
164 command: |
165 apt-get install -qq -y \
166 libluajit-5.1 \
167 libboost-all-dev \
168 libcap2 \
169 libssl1.1 \
170 libsystemd0 \
294df2f7
OM
171 libsodium23 \
172 libfstrm0 \
173 libprotobuf17
36d385ad 174
85277158
PL
175 install-auth-deps:
176 description: Install all libraries needed to run the auth
177 steps:
178 - run: |
179 apt-get install -qq -y --no-install-recommends \
180 libboost-all-dev \
8b20e344 181 libcdb1 \
4854160f 182 libcurl4 \
1d353ed5
PL
183 libkrb5-3 \
184 libldap-2.4-2 \
4528f4cc 185 liblmdb0 \
4854160f 186 libluajit-5.1-2 \
d2cb3584 187 libpq5 \
85277158 188 libssl1.1 \
294df2f7 189 libsodium23 \
85277158
PL
190 libsystemd0 \
191 default-libmysqlclient-dev \
192 unixodbc
193
44637a00
PD
194 install-dnsdist-deps:
195 description: "Install all libraries needed for testing dnsdist"
196 steps:
197 - run: apt-get update
198 - run:
199 command: |
200 apt-get install -qq -y \
201 libluajit-5.1 \
202 libboost-all-dev \
203 libcap2 \
60fb9966 204 libcdb1 \
44637a00
PD
205 libcurl4-openssl-dev \
206 libfstrm0 \
207 libh2o-evloop0.13 \
60fb9966
RG
208 liblmdb0 \
209 libprotobuf17 \
44637a00
PD
210 libre2-5 \
211 libssl-dev \
212 libsystemd0 \
213 libsodium23 \
44637a00
PD
214 protobuf-compiler \
215 virtualenv
216
26c5a7f9
PD
217 install-ixfrdist-deps:
218 description: "Install all libraries needed for testing ixfrdist"
219 steps:
220 - run: apt-get update
221 - run:
222 command: |
223 apt-get install -qq -y \
06fde25c 224 git \
26c5a7f9
PD
225 libboost-all-dev \
226 libsystemd0 \
294df2f7 227 libyaml-cpp0.6 \
26c5a7f9
PD
228 virtualenv
229
85277158
PL
230 install-auth-dev-deps:
231 description: Install all packages needed to build the auth
232 steps:
233 - run: apt-get update
234 - run:
235 command: |
236 apt-get install -qq -y --no-install-recommends \
237 autoconf \
238 automake \
239 bison \
ad5b67b0
PL
240 bzip2 \
241 curl \
85277158
PL
242 default-libmysqlclient-dev \
243 flex \
244 g++ \
245 git \
246 libboost-all-dev \
8b20e344 247 libcdb-dev \
4854160f 248 libcurl4-openssl-dev \
1d353ed5
PL
249 libkrb5-dev \
250 libldap2-dev \
4528f4cc 251 liblmdb-dev \
4854160f 252 libluajit-5.1-dev \
d2cb3584 253 libpq-dev \
bf8cbec1 254 libsodium-dev \
80e2a9ef 255 libsqlite3-dev \
d2cb3584 256 libssl-dev \
0e0e64f0 257 libsystemd-dev \
85277158 258 libtool \
26c5a7f9 259 libyaml-cpp-dev \
85277158
PL
260 make \
261 pkg-config \
262 ragel \
263 sqlite3 \
0e0e64f0 264 systemd \
85277158
PL
265 unixodbc-dev \
266 virtualenv \
267 wget
268
36d385ad
PL
269 add-auth-repo:
270 description: "Add the debian repo for the auth"
271 parameters:
272 version:
273 type: string
274 default: "42"
275 distro:
276 type: string
277 default: "debian"
278 release:
279 type: string
294df2f7 280 default: "buster"
36d385ad
PL
281 steps:
282 - run:
283 name: "Install dependencies"
284 command: "apt-get update && apt-get install -qq -y curl gnupg2"
285 - run:
286 name: "Install apt-keys"
287 command: |
288 if [ "<< parameters.version >>" = "master" ]; then
289 curl https://repo.powerdns.com/CBC8B383-pub.asc | apt-key add -
290 else
291 curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add -
292 fi
293 - run:
294 name: "Add repository"
295 command: |
296 echo 'deb [arch=amd64] http://repo.powerdns.com/<< parameters.distro >> << parameters.release >>-auth-<< parameters.version>> main' >> /etc/apt/sources.list.d/pdns.list
297 - run:
298 name: "add pinning"
299 command: |
300 echo 'Package: pdns-*' > /etc/apt/preferences.d/pdns
301 echo 'Pin: origin repo.powerdns.com' >> /etc/apt/preferences.d/pdns
302 echo 'Pin-Priority: 600' >> /etc/apt/preferences.d/pdns
303 - run:
304 name: update apt cache
305 command: apt-get update
306
85277158
PL
307 setup-ccache:
308 description: Install .ccache and set $PATH
309 steps:
310 - run:
311 name: Install ccache
312 command: apt-get update && apt-get -qq -y install ccache
313 - run:
314 name: Setup ccache in $PATH
315 command: echo 'export PATH=/usr/lib/ccache:$PATH' >> $BASH_ENV
316
12538b7a
PL
317 save-ccache-cache:
318 description: Store the .ccache directory
319 parameters:
320 product:
321 type: string
322 default: ""
323 steps:
324 - save_cache:
325 key: ccache-cache-{{ arch }}-<< parameters.product >>-{{ .Branch }}
326 paths:
327 - ~/.ccache
328
329 restore-cache-ccache:
330 description: Restore the .ccache directory
331 parameters:
332 product:
333 type: string
334 default: ""
335 steps:
85277158 336 - setup-ccache
12538b7a
PL
337 - run:
338 name: ensure ca-certificates is installed
339 command: apt-get update && apt-get -qq -y install ca-certificates
340 - restore_cache:
341 keys:
342 - ccache-cache-{{ arch }}-<< parameters.product >>-{{ .Branch }}
85277158 343 - ccache-cache-{{ arch }}-<< parameters.product >>-
12538b7a 344
bc728a55
PL
345 install-doc-deps:
346 description: Install dependencies needed to build the documentation
347 steps:
348 - run:
349 name: Install dependencies
350 command: |
351 apt-get update && apt-get -qq -y install \
352 autoconf \
353 automake \
354 bison \
355 curl \
356 flex \
357 g++ \
358 git \
359 latexmk \
360 libboost-all-dev \
361 libedit-dev \
362 libluajit-5.1-dev \
363 libssl-dev \
364 make \
365 pkg-config \
366 ragel \
6f06a1be 367 rsync \
bc728a55
PL
368 virtualenv
369 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
370 apt-get update && apt-get -qq -y install \
371 texlive-full
372 fi
373
374 build-auth-docs:
375 description: Build documentation
376 steps:
377 - run:
378 name: autoconf
379 command: |
380 BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
381 - run:
382 name: configure
383 command: |
384 ./configure \
385 --disable-lua-records \
386 --disable-unit-tests \
387 --without-dynmodules \
388 --without-modules
389 - run:
390 name: build docs
391 command: |
392 make -C docs html-docs
393 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
394 make -C docs all-docs
395 fi
af96487b
PL
396
397 upload-auth-docs:
398 steps:
bc728a55
PL
399 - run:
400 name: Upload documents
401 command: |
402 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
c628e3e2
PL
403 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' ./docs/html-docs/ docs_powerdns_com@${DOCS_HOST}:/authoritative/
404 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./docs/html-docs.tar.bz2 docs_powerdns_com@${DOCS_HOST}:/authoritative/
405 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./docs/PowerDNS-Authoritative.pdf docs_powerdns_com@${DOCS_HOST}:/authoritative/
bc728a55
PL
406 fi
407
408 build-recursor-docs:
409 description: Build Recursor documentation
410 steps:
411 - run:
412 name: autoconf
413 command: |
414 BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
415 working_directory: ~/project/pdns/recursordist
416 - run:
417 name: configure
418 command: |
419 ./configure \
420 --disable-unit-tests \
421 --disable-protobuf
422 working_directory: ~/project/pdns/recursordist
423 - run:
424 name: build docs
425 command: |
b0656abd 426 make html-docs
bc728a55
PL
427 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
428 make all-docs
429 fi
430 working_directory: ~/project/pdns/recursordist
af96487b
PL
431
432 upload-recursor-docs:
433 steps:
bc728a55
PL
434 - run:
435 name: Upload documents
436 working_directory: ~/project/pdns/recursordist
437 command: |
438 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
4fc65afc
PL
439 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' html-docs/ docs_powerdns_com@${DOCS_HOST}:/recursor/
440 rsync -crv --no-p --chmod=g=rwX --exclude '*~' html-docs.tar.bz2 docs_powerdns_com@${DOCS_HOST}:/recursor/
441 rsync -crv --no-p --chmod=g=rwX --exclude '*~' PowerDNS-Recursor.pdf docs_powerdns_com@${DOCS_HOST}:/recursor/
bc728a55
PL
442 fi
443
444 build-dnsdist-docs:
445 description: Build dnsdist documentation
446 steps:
447 - run:
448 name: autoconf
449 command: |
450 BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
451 working_directory: ~/project/pdns/dnsdistdist
452 - run:
453 name: configure
454 command: |
455 ./configure \
456 --disable-unit-tests \
457 --disable-protobuf
458 working_directory: ~/project/pdns/dnsdistdist
459 - run:
460 name: build docs
461 command: |
b0656abd
PL
462 make html-docs
463 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
464 make all-docs
465 fi
bc728a55 466 working_directory: ~/project/pdns/dnsdistdist
af96487b
PL
467
468 upload-dnsdist-docs:
469 steps:
bc728a55
PL
470 - run:
471 name: Upload documents
472 working_directory: ~/project/pdns/dnsdistdist
473 command: |
474 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
9e4d15a4
PL
475 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' html-docs/ dnsdist_org@${DOCS_HOST}:
476 rsync -crv --no-p --chmod=g=rwX --exclude '*~' html-docs.tar.bz2 dnsdist_org@${DOCS_HOST}:
477 rsync -crv --no-p --chmod=g=rwX --exclude '*~' dnsdist.pdf dnsdist_org@${DOCS_HOST}:
bc728a55
PL
478 fi
479
fbd89850 480jobs:
06fde25c 481 checkout:
9ec5537e
PD
482 resource_class: small
483
06fde25c
PD
484 docker:
485 - image: debian:buster
486
487 steps:
488 - checkout-shallow
489 - persist_to_workspace:
490 root: /opt
491 paths:
492 - project
493
6466c5e1
OM
494 check-formatting:
495 docker:
496 - image: debian:buster
497 steps:
498 - run:
499 name: Install dependencies
500 command: |
8e416b30
OM
501 echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
502 apt-get update && apt-get -qq --no-install-recommends install git
503 apt-get -qq -t buster-backports --no-install-recommends install clang-format-8
6466c5e1
OM
504 - get-workspace
505 - run:
506 name: Check formatting
507 command: |
508 ./build-scripts/format-code pdns/recursordist/*.[ch][ch]
8e416b30 509 git --no-pager diff
6466c5e1
OM
510 exit $(git diff | wc -l)
511 working_directory: ~/project
512
1d8e4b3c 513 build-auth:
fbd89850 514 docker:
294df2f7 515 - image: debian:buster
fbd89850
PD
516
517 steps:
06fde25c 518 - get-workspace
85277158
PL
519 - install-auth-dev-deps
520 - restore-cache-ccache:
521 product: auth
fbd89850
PD
522 - run:
523 name: autoconf
85277158 524 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
fbd89850
PD
525 - run:
526 name: configure
85277158 527 command: |
690b86b7
OM
528 CFLAGS="-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security" \
529 CXXFLAGS="-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS" \
85277158 530 ./configure \
4854160f 531 --with-modules='bind lmdb ldap gmysql gsqlite3 gpgsql godbc random tinydns lua2' \
0e0e64f0 532 --enable-systemd \
85277158 533 --enable-tools \
bba5f1bb
RG
534 --enable-unit-tests \
535 --enable-backend-unit-tests \
5ca439f1 536 --enable-fuzz-targets \
4528f4cc 537 --with-lmdb=/usr \
bf8cbec1 538 --with-libsodium \
26c5a7f9
PD
539 --prefix=/opt/pdns-auth \
540 --enable-ixfrdist
fbd89850
PD
541 - run:
542 name: build
543 command: make -j3 -k
85277158
PL
544 - save-ccache-cache:
545 product: auth
bba5f1bb
RG
546 - run:
547 name: Run unit tests
dec0b05b 548 command: PDNS_TEST_NO_IPV6=1 make check || (cat pdns/test-suite.log; false)
85277158
PL
549 - run:
550 name: Install the binaries
551 command: make install
552 - persist_to_workspace:
553 root: /opt
554 paths:
555 - pdns-auth
fbd89850 556
85277158 557 test-auth-regress-odbc-sqlite3:
9ec5537e
PD
558 resource_class: small
559
85277158 560 docker:
294df2f7 561 - image: debian:buster
85277158 562 steps:
2bfa1796 563 - auth-regress-setup
85277158
PL
564 - run:
565 name: Configure ODBC for sqlite
566 command: |
567 cat >> ~/.odbc.ini \<<- __EOF__
568 [pdns-sqlite3-1]
569 Driver = SQLite3
570 Database = ${PWD}/regression-tests/pdns.sqlite3
571 [pdns-sqlite3-2]
572 Driver = SQLite3
573 Database = ${PWD}/regression-tests/pdns.sqlite32
574 __EOF__
fbd89850 575 - run:
85277158
PL
576 name: Install ODBC deps
577 command: |
578 apt-get install -qq -y \
579 unixodbc \
580 libsqliteodbc \
581 sqlite3
85277158 582 - run:
2bfa1796
PL
583 name: Set up sqlite3 odbc testing
584 command: echo 'export GODBC_SQLITE3_DSN=pdns-sqlite3-1' > ./vars
85277158 585 workdir: ~/project/regression-tests
2bfa1796
PL
586 - auth-regress:
587 context: godbc_sqlite3-nsec3
3001deca 588 doroot: false # Broken at the moment
fbd89850 589
85277158
PL
590 test-auth-regress-odbc-mssql:
591 docker:
294df2f7 592 - image: debian:buster
ce4caef4 593 - image: mcr.microsoft.com/mssql/server:2017-GA-ubuntu
85277158
PL
594 environment:
595 - ACCEPT_EULA: Y
596 - SA_PASSWORD: 'SAsa12%%'
597 steps:
2bfa1796 598 - auth-regress-setup
85277158
PL
599 - run:
600 name: Install ODBC deps
601 command: |
602 apt-get install -qq -y \
603 freetds-bin \
604 tdsodbc \
605 unixodbc
fbd89850
PD
606 - run:
607 name: set up mssql odbc
85277158
PL
608 command: |
609 cat >> ~/.odbc.ini \<<- __EOF__
610 [pdns-mssql-docker]
611 Driver=FreeTDS
612 Trace=No
613 Server=127.0.0.1
614 Port=1433
615 Database=pdns
616 TDS_Version=7.1
617 [pdns-mssql-docker-nodb]
618 Driver=FreeTDS
619 Trace=No
620 Server=127.0.0.1
621 Port=1433
622 TDS_Version=7.1
623 __EOF__
624 - run:
550b65b2 625 command: cat /usr/share/tdsodbc/odbcinst.ini <(echo Threading=1) >> /etc/odbcinst.ini
85277158
PL
626 - run:
627 name: create database
628 command: echo 'create database pdns' | isql -v pdns-mssql-docker-nodb sa SAsa12%%
fbd89850 629 - run:
2bfa1796 630 name: Set up mssql odbc testing
85277158
PL
631 command: echo 'export GODBC_MSSQL_PASSWORD=SAsa12%% GODBC_MSSQL_USERNAME=sa GODBC_MSSQL_DSN=pdns-mssql-docker' > ./vars
632 workdir: ~/project/regression-tests
fbd89850
PD
633 - auth-regress:
634 context: godbc_mssql-nodnssec
635 skip: 8bit-txt-unescaped
636 - auth-regress:
637 context: godbc_mssql
638 skip: 8bit-txt-unescaped
639 - auth-regress:
640 context: godbc_mssql-nsec3
641 skip: 8bit-txt-unescaped
642 - auth-regress:
643 context: godbc_mssql-nsec3-optout
9955ccf6 644 skip: 8bit-txt-unescaped
fbd89850
PD
645 - auth-regress:
646 context: godbc_mssql-nsec3-narrow
647 skip: 8bit-txt-unescaped
1d8e4b3c 648
80e2a9ef 649 test-auth-regress-gsqlite3:
9ec5537e
PD
650 resource_class: small
651
80e2a9ef 652 docker:
294df2f7 653 - image: debian:buster
80e2a9ef
PL
654 steps:
655 - auth-regress-setup
656 - run:
657 command: apt-get install -qq -y sqlite3
658 - auth-regress:
659 context: gsqlite3-nodnssec-both
660 - auth-regress:
661 context: gsqlite3-both
662 - auth-regress:
663 context: gsqlite3-nsec3-both
664 - auth-regress:
665 context: gsqlite3-nsec3-optout-both
666 - auth-regress:
667 context: gsqlite3-nsec3-narrow
668
b51a7f16 669 test-auth-regress-bind:
9ec5537e
PD
670 resource_class: small
671
b51a7f16 672 docker:
294df2f7 673 - image: debian:buster
b51a7f16
PL
674 - image: circleci/mysql:5 # for the hybrid test
675 steps:
676 - auth-regress-setup
677 - run:
678 command: apt-get install -qq -y sqlite3
679 - auth-regress:
680 context: bind-both
681 - auth-regress:
682 context: bind-dnssec-both
683 - auth-regress:
684 context: bind-dnssec-nsec3-both
685 - auth-regress:
686 context: bind-dnssec-nsec3-optout-both
687 - auth-regress:
688 context: bind-dnssec-nsec3-narrow
689 - run:
690 command: apt-get install -qq -y default-mysql-client
691 - run:
692 command: |
693 cat >> ~/.my.cnf \<<- __EOF__
694 [client]
695 protocol=TCP
696 __EOF__
294df2f7
OM
697 - run:
698 name: Set up mysql client lib to force TCP
6273e401 699 command: echo 'export GMYSQLHOST=127.0.0.1' > ./vars
294df2f7 700 workdir: ~/project/regression-tests
b51a7f16
PL
701 - auth-regress:
702 context: bind-hybrid-nsec3
703
5ba42c57 704 test-auth-regress-gmysql:
9ec5537e
PD
705 resource_class: small
706
5ba42c57 707 docker:
294df2f7 708 - image: debian:buster
5ba42c57
PL
709 - image: circleci/mysql:5
710 steps:
711 - auth-regress-setup
712 - run:
713 command: apt-get install -qq -y default-mysql-client
714 - run:
715 command: |
716 cat >> ~/.my.cnf \<<- __EOF__
294df2f7
OM
717 [client]
718 protocol=TCP
719 default-character-set=latin1
5ba42c57 720 __EOF__
294df2f7
OM
721 - run:
722 name: Set up mysql client lib to force TCP
6273e401 723 command: echo 'export GMYSQLHOST=127.0.0.1 export GMYSQL2HOST=127.0.0.1 ' > ./vars
294df2f7 724 workdir: ~/project/regression-tests
5ba42c57
PL
725 - auth-regress:
726 context: gmysql-nodnssec-both
727 - auth-regress:
728 context: gmysql-both
729 - auth-regress:
730 context: gmysql-nsec3-both
731 - auth-regress:
732 context: gmysql-nsec3-optout-both
733 - auth-regress:
734 context: gmysql-nsec3-narrow
735
d2cb3584 736 test-auth-regress-gpgsql:
9ec5537e
PD
737 resource_class: small
738
d2cb3584 739 docker:
294df2f7 740 - image: debian:buster
d2cb3584
PL
741 - image: circleci/postgres:9
742 environment:
743 POSTGRES_USER: root
fed8314d 744 POSTGRES_HOST_AUTH_METHOD: trust
d2cb3584
PL
745 steps:
746 - auth-regress-setup
747 - run:
748 command: apt-get install -qq -y postgresql-client
749 - run:
750 name: Use TCP for Postgresql connections
751 command: |
752 cat >> ./vars \<<- __EOF__
753 export PGHOST=127.0.0.1
754 export PGPORT=5432
755 __EOF__
756 workdir: ~/project/regression-tests
757 - auth-regress:
758 context: gpgsql-nodnssec-both
759 - auth-regress:
760 context: gpgsql-both
761 - auth-regress:
762 context: gpgsql-nsec3-both
763 - auth-regress:
764 context: gpgsql-nsec3-optout-both
765 - auth-regress:
766 context: gpgsql-nsec3-narrow
767
1d353ed5 768 test-auth-regress-ldap:
9ec5537e
PD
769 resource_class: small
770
1d353ed5 771 docker:
294df2f7 772 - image: debian:buster
1d353ed5
PL
773 environment:
774 LDAPHOST: ldap://ldapserver/
775 - image: powerdns/ldap-regress:1.2.4-0 # OpenLDAP 2.4.47
776 name: ldapserver
777 command: '--loglevel debug'
778 environment:
779 LDAP_LOG_LEVEL: 0
780 steps:
781 - auth-regress-setup
782 - run: DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ldap-utils
783 - auth-regress:
784 context: ldap-tree
785 doroot: false
786 - auth-regress:
787 context: ldap-simple
788 doroot: false
789 - auth-regress:
790 context: ldap-strict
791 doroot: false
792
8b20e344 793 test-auth-regress-tinydns:
9ec5537e
PD
794 resource_class: small
795
8b20e344 796 docker:
294df2f7 797 - image: debian:buster
8b20e344
PL
798 steps:
799 - auth-regress-setup
800 - auth-regress:
801 context: tinydns
802 doroot: false
803
4528f4cc 804 test-auth-regress-lmdb:
9ec5537e
PD
805 resource_class: small
806
4528f4cc 807 docker:
294df2f7 808 - image: debian:buster
4528f4cc
PL
809 steps:
810 - auth-regress-setup
d1986d2f 811 - run: apt-get install -y -qq jq
4528f4cc
PL
812 - auth-regress:
813 context: lmdb-nodnssec-both
814 - auth-regress:
815 context: lmdb-both
816 - auth-regress:
817 context: lmdb-nsec3-both
818 - auth-regress:
819 context: lmdb-nsec3-optout-both
820 - auth-regress:
821 context: lmdb-nsec3-narrow
822
7bd61e2f 823 test-auth-algorithms:
9ec5537e
PD
824 resource_class: small
825
7bd61e2f 826 docker:
294df2f7 827 - image: debian:buster
7bd61e2f
PL
828 steps:
829 - auth-regress-setup
830 - run:
831 name: Test all algorithms
832 command: /opt/pdns-auth/bin/pdnsutil test-algorithms
833
c6c3c165 834 test-auth-api:
9ec5537e
PD
835 resource_class: small
836
c6c3c165 837 docker:
294df2f7 838 - image: debian:buster
c6c3c165
PL
839 steps:
840 - auth-regress-setup
841 - run: apt-get -y -qq install virtualenv sqlite3
842 - run:
843 name: Run API tests
844 workdir: ~/project/regression-tests.api
845 command: |
846 PDNSSERVER="/opt/pdns-auth/sbin/pdns_server" \
847 PDNSUTIL="/opt/pdns-auth/bin/pdnsutil" \
848 SDIG="/opt/pdns-auth/bin/sdig" \
849 ZONE2SQL="/opt/pdns-auth/bin/zone2sql" \
850 ./runtests authoritative
851
7fff14ef
PL
852 build-recursor:
853 docker:
294df2f7 854 - image: debian:buster
7fff14ef 855 steps:
12538b7a
PL
856 - restore-cache-ccache:
857 product: recursor
7fff14ef
PL
858 - run:
859 name: Install dependencies
860 command: |
861 apt-get update && apt-get -qq --no-install-recommends install \
862 autoconf \
863 automake \
864 ca-certificates \
865 curl \
866 bison \
867 flex \
868 g++ \
869 git \
870 libboost-all-dev \
871 libcap-dev \
872 libluajit-5.1-dev \
294df2f7 873 libfstrm-dev \
7fff14ef
PL
874 libprotobuf-dev \
875 libsodium-dev \
876 libssl-dev \
877 libsystemd-dev \
878 libtool \
879 make \
880 pkg-config \
881 protobuf-compiler \
882 ragel \
0e0e64f0 883 systemd \
7fff14ef 884 virtualenv
06fde25c 885 - get-workspace
7fff14ef
PL
886 - run:
887 name: autoconf
85277158 888 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
7fff14ef
PL
889 working_directory: ~/project/pdns/recursordist
890 - run:
891 name: configure
892 command: |
690b86b7
OM
893 CFLAGS="-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security" \
894 CXXFLAGS="-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS" \
7fff14ef
PL
895 ./configure \
896 --enable-unit-tests \
43905750 897 --enable-nod \
0e0e64f0 898 --enable-systemd \
7fff14ef
PL
899 --prefix=/opt/pdns-recursor \
900 --with-libsodium \
901 --with-lua=luajit \
902 --with-libcap \
903 --with-protobuf=yes \
904 --without-net-snmp
905 working_directory: ~/project/pdns/recursordist
906 - run:
907 name: build
85277158 908 command: make -j3 -k
7fff14ef 909 working_directory: ~/project/pdns/recursordist
12538b7a
PL
910 - save-ccache-cache:
911 product: recursor
7fff14ef 912 - run:
36d385ad
PL
913 name: Run unit tests
914 command: make check || (cat test-suite.log; false)
915 working_directory: ~/project/pdns/recursordist
916 - run:
917 name: Install resulting binaries
918 command: make install
7fff14ef 919 working_directory: ~/project/pdns/recursordist
36d385ad
PL
920 - persist_to_workspace:
921 root: /opt
922 paths:
923 - pdns-recursor
924
925 test-recursor-regression:
9ec5537e
PD
926 resource_class: small
927
36d385ad 928 docker:
294df2f7 929 - image: debian:buster
36d385ad
PL
930 steps:
931 - add-auth-repo
c51c551e 932 - run: apt-get --no-install-recommends install -qq -y pdns-server pdns-backend-bind pdns-tools daemontools authbind jq libfaketime lua-posix lua-socket moreutils bc virtualenv protobuf-compiler
36d385ad
PL
933 - install-recursor-deps
934 - run:
935 name: Set up authbind
936 command: |
937 touch /etc/authbind/byport/53
938 chmod 755 /etc/authbind/byport/53
06fde25c 939 - get-workspace
36d385ad
PL
940 - run:
941 name: Run regression tests
942 workdir: ~/project
943 command: |
944 PDNSRECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
945 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
946 ./build-scripts/test-recursor
947
948 test-recursor-bulk:
045e4577 949 resource_class: medium
9ec5537e 950
36d385ad 951 docker:
294df2f7 952 - image: debian:buster
36d385ad
PL
953 steps:
954 - add-auth-repo
955 - run: apt-get --no-install-recommends install -qq -y pdns-tools moreutils time
956 - install-recursor-deps
06fde25c 957 - get-workspace
36d385ad
PL
958 - run:
959 name: Get the majestic million list
960 workdir: ~/project/regression-tests
961 command: |
962 apt-get install -qq -y unzip && \
963 curl -LO http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip && \
964 unzip top-1m.csv.zip -d .
965 - run:
045e4577
OM
966 name: Run bulktest A
967 command: |
968 DNSBULKTEST=/usr/bin/dnsbulktest \
969 RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
38645cdf 970 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
045e4577
OM
971 THRESHOLD=95 \
972 TRACE=no \
973 ./timestamp ./recursor-test 5300 50000 2
974 workdir: ~/project/regression-tests
975 - run:
976 name: Run bulktest B
977 command: |
978 DNSBULKTEST=/usr/bin/dnsbulktest \
979 RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
38645cdf 980 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
045e4577
OM
981 THRESHOLD=95 \
982 TRACE=no \
983 ./timestamp ./recursor-test 5300 50000 4
984 workdir: ~/project/regression-tests
985 - run:
986 name: Run bulktest C
987 command: |
988 DNSBULKTEST=/usr/bin/dnsbulktest \
989 RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
38645cdf 990 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
045e4577
OM
991 THRESHOLD=95 \
992 TRACE=no \
993 ./timestamp ./recursor-test 5300 50000 8
994 workdir: ~/project/regression-tests
995 - run:
996 name: Run bulktest D
997 command: |
998 DNSBULKTEST=/usr/bin/dnsbulktest \
999 RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
38645cdf 1000 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
045e4577
OM
1001 THRESHOLD=95 \
1002 TRACE=no \
1003 ./timestamp ./recursor-test 5300 50000 16
1004 workdir: ~/project/regression-tests
1005 - run:
1006 name: Run bulktest E
1007 command: |
1008 DNSBULKTEST=/usr/bin/dnsbulktest \
1009 RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
38645cdf 1010 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
045e4577
OM
1011 THRESHOLD=95 \
1012 TRACE=no \
1013 ./timestamp ./recursor-test 5300 50000 2 4096
1014 workdir: ~/project/regression-tests
1015 - run:
1016 name: Run bulktest F
1017 command: |
1018 DNSBULKTEST=/usr/bin/dnsbulktest \
1019 RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
38645cdf 1020 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
045e4577
OM
1021 THRESHOLD=95 \
1022 TRACE=no \
1023 ./timestamp ./recursor-test 5300 50000 4 4096
1024 workdir: ~/project/regression-tests
1025 - run:
1026 name: Run bulktest G
1027 command: |
1028 DNSBULKTEST=/usr/bin/dnsbulktest \
1029 RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
38645cdf 1030 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
045e4577
OM
1031 THRESHOLD=95 \
1032 TRACE=no \
1033 ./timestamp ./recursor-test 5300 50000 8 4096
1034 workdir: ~/project/regression-tests
1035 - run:
1036 name: Run bulktest H
36d385ad
PL
1037 command: |
1038 DNSBULKTEST=/usr/bin/dnsbulktest \
1039 RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
38645cdf 1040 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
36d385ad
PL
1041 THRESHOLD=95 \
1042 TRACE=no \
045e4577 1043 ./timestamp ./recursor-test 5300 50000 16 4096
36d385ad 1044 workdir: ~/project/regression-tests
7fff14ef 1045
4befa62e 1046 test-recursor-api:
9ec5537e
PD
1047 resource_class: small
1048
4befa62e 1049 docker:
294df2f7 1050 - image: debian:buster
4befa62e
PL
1051 steps:
1052 - add-auth-repo
1053 - run: apt-get --no-install-recommends install -qq -y virtualenv pdns-tools
1054 - install-recursor-deps
06fde25c 1055 - get-workspace
4befa62e
PL
1056 - run:
1057 name: Run API tests
1058 workdir: ~/project/regression-tests.api
1059 command: |
1060 PDNSRECURSOR="/opt/pdns-recursor/sbin/pdns_recursor" \
1061 ./runtests recursor
1062
bc728a55 1063 build-auth-docs:
9ec5537e
PD
1064 resource_class: small
1065
bc728a55 1066 docker:
294df2f7 1067 - image: debian:buster
bc728a55 1068 steps:
06fde25c 1069 - get-workspace
bc728a55
PL
1070 - install-doc-deps
1071 - build-auth-docs
1072
af96487b 1073 deploy-auth-docs:
9ec5537e
PD
1074 resource_class: small
1075
af96487b 1076 docker:
294df2f7 1077 - image: debian:buster
af96487b 1078 steps:
06fde25c 1079 - get-workspace
af96487b
PL
1080 - install-doc-deps
1081 - build-auth-docs
1082 - add-docs-upload-ssh
1083 - upload-auth-docs
1084
bc728a55 1085 build-recursor-docs:
9ec5537e
PD
1086 resource_class: small
1087
bc728a55 1088 docker:
294df2f7 1089 - image: debian:buster
bc728a55 1090 steps:
06fde25c 1091 - get-workspace
bc728a55
PL
1092 - install-doc-deps
1093 - build-recursor-docs
1094
af96487b 1095 deploy-recursor-docs:
9ec5537e
PD
1096 resource_class: small
1097
af96487b 1098 docker:
294df2f7 1099 - image: debian:buster
af96487b 1100 steps:
06fde25c 1101 - get-workspace
af96487b
PL
1102 - install-doc-deps
1103 - build-recursor-docs
1104 - add-docs-upload-ssh
1105 - upload-recursor-docs
1106
bc728a55 1107 build-dnsdist-docs:
9ec5537e
PD
1108 resource_class: small
1109
bc728a55 1110 docker:
294df2f7 1111 - image: debian:buster
bc728a55 1112 steps:
06fde25c 1113 - get-workspace
bc728a55
PL
1114 - install-doc-deps
1115 - build-dnsdist-docs
1116
af96487b 1117 deploy-dnsdist-docs:
9ec5537e
PD
1118 resource_class: small
1119
af96487b 1120 docker:
294df2f7 1121 - image: debian:buster
af96487b 1122 steps:
06fde25c 1123 - get-workspace
af96487b
PL
1124 - install-doc-deps
1125 - build-dnsdist-docs
1126 - add-docs-upload-ssh
1127 - upload-dnsdist-docs
1128
ad5b67b0
PL
1129 coverity-auth:
1130 docker:
294df2f7 1131 - image: debian:buster
ad5b67b0
PL
1132 steps:
1133 - install-auth-dev-deps
1134 - install-coverity-tools
639da53c 1135 - checkout-shallow
ad5b67b0
PL
1136 - run:
1137 name: autoconf
7d96eb59 1138 working_directory: /opt/project/
ad5b67b0
PL
1139 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
1140 - run:
1141 name: configure
7d96eb59 1142 working_directory: /opt/project/
ad5b67b0 1143 command: |
d8bcbd10
RG
1144 CFLAGS="-O1 -Werror=vla -Wformat=2 -Werror=format-security" \
1145 CXXFLAGS="-O1 -Werror=vla -Wformat=2 -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS" \
ad5b67b0 1146 ./configure \
0e0e64f0 1147 --disable-systemd \
6273e401 1148 --with-modules='bind lmdb ldap gmysql gsqlite3 gpgsql godbc random tinydns' \
ad5b67b0
PL
1149 --enable-tools \
1150 --with-lmdb=/usr \
1151 --with-libsodium \
1152 --prefix=/opt/pdns-auth
1153 - run:
1154 name: build
7d96eb59 1155 working_directory: /opt/project/
ad5b67b0
PL
1156 command: /usr/local/bin/cov-build --dir cov-int make -j2 -k
1157 - run:
1158 name: Create Coverity tarball
7d96eb59 1159 working_directory: /opt/project/
ad5b67b0
PL
1160 command: tar caf auth.tar.bz2 cov-int
1161 - run:
1162 name: Upload tarball to coverity
7d96eb59 1163 working_directory: /opt/project/
ad5b67b0
PL
1164 command: |
1165 curl --form token=${COVERITY_TOKEN} \
1166 --form email="${COVERITY_EMAIL}" \
1167 --form file=@auth.tar.bz2 \
1168 --form version="$(./builder-support/gen-version)" \
1169 --form description="master build" \
1170 https://scan.coverity.com/builds?project=${COVERITY_PROJECT}
1171
793a9240
PL
1172 coverity-dnsdist:
1173 docker:
294df2f7 1174 - image: debian:buster
793a9240
PL
1175 steps:
1176 - run:
1177 name: Install dependencies
1178 command: |
1179 apt-get update && apt-get -qq --no-install-recommends install \
1180 autoconf \
1181 automake \
1182 bison \
1183 bzip2 \
1184 ca-certificates \
1185 curl \
1186 flex \
1187 g++ \
1188 git \
1189 libboost-all-dev \
1190 libcap-dev \
60fb9966 1191 libcdb-dev \
793a9240
PL
1192 libedit-dev \
1193 libfstrm-dev \
60fb9966 1194 liblmdb-dev \
793a9240
PL
1195 libluajit-5.1-dev \
1196 libprotobuf-dev \
1197 libre2-dev \
1198 libsnmp-dev \
1199 libsodium-dev \
1200 libssl-dev \
1201 libsystemd-dev \
1202 libtool \
793a9240
PL
1203 make \
1204 pkg-config \
1205 protobuf-compiler \
1206 ragel \
1207 virtualenv
4dc779ef 1208 - install-coverity-tools
639da53c 1209 - checkout-shallow
793a9240
PL
1210 - run:
1211 name: autoconf
1212 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
7d96eb59 1213 working_directory: /opt/project/pdns/dnsdistdist
793a9240
PL
1214 - run:
1215 name: configure
1216 command: |
a30aa727
RG
1217 CFLAGS="-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security" \
1218 CXXFLAGS="-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS" \
793a9240
PL
1219 ./configure \
1220 --disable-systemd \
1221 --disable-unit-tests \
1222 --enable-dnstap \
1223 --enable-dnscrypt \
1224 --enable-dns-over-tls \
793a9240
PL
1225 --prefix=/opt/dnsdist \
1226 --with-libsodium \
1227 --with-lua=luajit \
1228 --with-libcap \
1229 --with-protobuf=yes \
1230 --with-re2
7d96eb59 1231 working_directory: /opt/project/pdns/dnsdistdist
793a9240
PL
1232 - run:
1233 name: build
1234 command: /usr/local/bin/cov-build --dir cov-int make -j2 -k
7d96eb59 1235 working_directory: /opt/project/pdns/dnsdistdist
793a9240
PL
1236 - run:
1237 name: Create Coverity tarball
1238 command: tar caf dnsdist.tar.bz2 cov-int
7d96eb59 1239 working_directory: /opt/project/pdns/dnsdistdist
793a9240
PL
1240 - run:
1241 name: Upload tarball to coverity
413447ba 1242 working_directory: /opt/project/
793a9240
PL
1243 command: |
1244 curl --form token=${COVERITY_TOKEN} \
1245 --form email="${COVERITY_EMAIL}" \
1246 --form file=@pdns/dnsdistdist/dnsdist.tar.bz2 \
1247 --form version="$(./builder-support/gen-version)" \
1248 --form description="master build" \
4dc779ef
PL
1249 https://scan.coverity.com/builds?project=${COVERITY_PROJECT}
1250
1251 coverity-recursor:
1252 docker:
294df2f7 1253 - image: debian:buster
4dc779ef
PL
1254 steps:
1255 - run:
1256 name: Install dependencies
1257 command: |
1258 apt-get update && apt-get -qq --no-install-recommends install \
1259 autoconf \
1260 automake \
1261 ca-certificates \
1262 curl \
1263 bison \
1264 bzip2 \
1265 flex \
1266 g++ \
1267 git \
1268 libboost-all-dev \
1269 libcap-dev \
1270 libluajit-5.1-dev \
294df2f7 1271 libfstrm-dev \
4dc779ef
PL
1272 libprotobuf-dev \
1273 libsodium-dev \
1274 libssl-dev \
1275 libsystemd-dev \
1276 libtool \
1277 make \
1278 pkg-config \
1279 protobuf-compiler \
1280 ragel \
1281 virtualenv
1282 - install-coverity-tools
639da53c 1283 - checkout-shallow
4dc779ef
PL
1284 - run:
1285 name: autoconf
1286 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
7d96eb59 1287 working_directory: /opt/project/pdns/recursordist
4dc779ef
PL
1288 - run:
1289 name: configure
1290 command: |
d8bcbd10
RG
1291 CFLAGS="-O1 -Werror=vla -Wformat=2 -Werror=format-security" \
1292 CXXFLAGS="-O1 -Werror=vla -Wformat=2 -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS" \
4dc779ef
PL
1293 ./configure \
1294 --disable-systemd \
1295 --disable-unit-tests \
1296 --prefix=/opt/pdns-recursor \
1297 --with-libsodium \
1298 --with-lua=luajit \
1299 --with-libcap \
1300 --with-protobuf=yes \
1301 --without-net-snmp
7d96eb59 1302 working_directory: /opt/project/pdns/recursordist
4dc779ef
PL
1303 - run:
1304 name: build
1305 command: /usr/local/bin/cov-build --dir cov-int make -j2 -k
7d96eb59 1306 working_directory: /opt/project/pdns/recursordist
4dc779ef
PL
1307 - run:
1308 name: Create Coverity tarball
1309 command: tar caf recursor.tar.bz2 cov-int
7d96eb59 1310 working_directory: /opt/project/pdns/recursordist
4dc779ef
PL
1311 - run:
1312 name: Upload tarball to coverity
413447ba 1313 working_directory: /opt/project/
4dc779ef
PL
1314 command: |
1315 curl --form token=${COVERITY_TOKEN} \
1316 --form email="${COVERITY_EMAIL}" \
1317 --form file=@pdns/recursordist/recursor.tar.bz2 \
1318 --form version="$(./builder-support/gen-version)" \
1319 --form description="master build" \
1320 https://scan.coverity.com/builds?project=${COVERITY_PROJECT}
793a9240 1321
44637a00
PD
1322 build-dnsdist:
1323 docker:
1324 - image: debian:buster
b4a7a585
PD
1325 environment:
1326 UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
44637a00
PD
1327 steps:
1328 - restore-cache-ccache:
1329 product: dnsdist
1330 - run:
1331 name: Install dependencies
1332 command: |
1333 apt-get update && apt-get -qq --no-install-recommends install \
1334 autoconf \
1335 automake \
1336 g++ \
1337 git \
1338 libboost-all-dev \
1339 libcap-dev \
60fb9966 1340 libcdb-dev \
44637a00
PD
1341 libedit-dev \
1342 libfstrm-dev \
1343 libh2o-evloop-dev \
60fb9966 1344 liblmdb-dev \
44637a00
PD
1345 libluajit-5.1-dev \
1346 libprotobuf-dev \
1347 libre2-dev \
1348 libsnmp-dev \
1349 libsodium-dev \
1350 libssl-dev \
1351 libsystemd-dev \
1352 libtool \
1353 make \
1354 pkg-config \
1355 protobuf-compiler \
1356 ragel \
0e0e64f0 1357 systemd \
44637a00 1358 virtualenv
06fde25c 1359 - get-workspace
44637a00
PD
1360 - run:
1361 name: autoconf
1362 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
1363 working_directory: ~/project/pdns/dnsdistdist
1364 - run:
1365 name: configure
1366 command: |
a30aa727
RG
1367 CFLAGS="-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security" \
1368 CXXFLAGS="-O1 -Werror=vla -Werror=shadow -Wformat=2 -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS" \
44637a00
PD
1369 ./configure \
1370 --enable-unit-tests \
1371 --enable-dnstap \
1372 --enable-dnscrypt \
1373 --enable-dns-over-tls \
1374 --enable-dns-over-https \
0e0e64f0 1375 --enable-systemd \
44637a00
PD
1376 --prefix=/opt/dnsdist \
1377 --with-libsodium \
1378 --with-lua=luajit \
1379 --with-libcap \
1380 --with-protobuf=yes \
1381 --with-re2 \
1382 --enable-asan \
1383 --enable-ubsan
1384 working_directory: ~/project/pdns/dnsdistdist
1385 - run:
1386 name: build
1387 command: make -j1 -k
1388 working_directory: ~/project/pdns/dnsdistdist
1389 - save-ccache-cache:
1390 product: dnsdist
1391 - run:
1392 name: Run unit tests
1393 command: make check || (cat test-suite.log; false)
1394 working_directory: ~/project/pdns/dnsdistdist
1395 - run:
1396 name: Install resulting binaries
1397 command: make install
1398 working_directory: ~/project/pdns/dnsdistdist
1399 - persist_to_workspace:
1400 root: /opt
1401 paths:
1402 - dnsdist
1403
1404 test-dnsdist-regression:
9ec5537e
PD
1405 resource_class: small
1406
44637a00
PD
1407 docker:
1408 - image: debian:buster
b4a7a585
PD
1409 environment:
1410 UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
44637a00
PD
1411 steps:
1412 - install-dnsdist-deps
06fde25c 1413 - get-workspace
44637a00
PD
1414 - run:
1415 name: setup snmp
1416 command: |
1417 apt-get -qq --no-install-recommends install snmpd
1418 sed "s/agentxperms 0700 0755 dnsdist/agentxperms 0700 0755/g" regression-tests.dnsdist/snmpd.conf > /etc/snmp/snmpd.conf
1419 /etc/init.d/snmpd start
116b2602
RG
1420 - run:
1421 name: install prometheus tools
1422 command: |
1423 apt-get -qq --no-install-recommends install prometheus
44637a00
PD
1424 - run:
1425 name: Run dnsdist tests
1426 workdir: ~/project/regression-tests.dnsdist
1427 command: |
1428 DNSDISTBIN="/opt/dnsdist/bin/dnsdist" \
1429 ./runtests
1430
26c5a7f9 1431 test-ixfrdist-regression:
9ec5537e
PD
1432 resource_class: small
1433
26c5a7f9 1434 docker:
294df2f7 1435 - image: debian:buster
26c5a7f9
PD
1436 environment:
1437 UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
1438 steps:
1439 - install-ixfrdist-deps
06fde25c 1440 - get-workspace
26c5a7f9
PD
1441 - run:
1442 name: Run ixfrdist tests
1443 workdir: ~/project/regression-tests.ixfrdist
1444 command: |
1445 IXFRDISTBIN="/opt/pdns-auth/bin/ixfrdist" \
1446 ./runtests
1447
1d8e4b3c
PL
1448workflows:
1449 version: 2
793a9240 1450 coverity:
c08182e2
PL
1451 triggers:
1452 - schedule:
1453 cron: "0 0 * * *"
1454 filters:
1455 branches:
1456 only: master
793a9240 1457 jobs:
ad5b67b0
PL
1458 - coverity-auth:
1459 context: auth-coverity
793a9240
PL
1460 - coverity-dnsdist:
1461 context: dnsdist-coverity
4dc779ef
PL
1462 - coverity-recursor:
1463 context: recursor-coverity
1464
7fff14ef 1465 build-and-test-all:
1d8e4b3c 1466 jobs:
06fde25c
PD
1467 - checkout
1468 - build-auth:
1469 requires:
1470 - checkout
c6c3c165
PL
1471 - test-auth-api:
1472 requires:
1473 - build-auth
7bd61e2f
PL
1474 - test-auth-algorithms:
1475 requires:
1476 - build-auth
85277158
PL
1477 - test-auth-regress-odbc-sqlite3:
1478 requires:
1479 - build-auth
1480 - test-auth-regress-odbc-mssql:
1481 requires:
1482 - build-auth
5ba42c57
PL
1483 - test-auth-regress-gmysql:
1484 requires:
1485 - build-auth
b51a7f16
PL
1486 - test-auth-regress-bind:
1487 requires:
1488 - build-auth
80e2a9ef
PL
1489 - test-auth-regress-gsqlite3:
1490 requires:
1491 - build-auth
d2cb3584
PL
1492 - test-auth-regress-gpgsql:
1493 requires:
1494 - build-auth
4528f4cc
PL
1495 - test-auth-regress-lmdb:
1496 requires:
1497 - build-auth
1d353ed5
PL
1498 - test-auth-regress-ldap:
1499 requires:
1500 - build-auth
8b20e344
PL
1501 - test-auth-regress-tinydns:
1502 requires:
1503 - build-auth
6466c5e1
OM
1504 - check-formatting:
1505 requires:
1506 - checkout
06fde25c
PD
1507 - build-recursor:
1508 requires:
1509 - checkout
36d385ad
PL
1510 - test-recursor-regression:
1511 requires:
1512 - build-recursor
1513 - test-recursor-bulk:
1514 requires:
1515 - build-recursor
4befa62e
PL
1516 - test-recursor-api:
1517 requires:
1518 - build-recursor
06fde25c
PD
1519 - build-dnsdist:
1520 requires:
1521 - checkout
44637a00
PD
1522 - test-dnsdist-regression:
1523 requires:
1524 - build-dnsdist
26c5a7f9
PD
1525 - test-ixfrdist-regression:
1526 requires:
1527 - build-auth
bc728a55
PL
1528
1529 build-docs:
1530 jobs:
06fde25c 1531 - checkout
af96487b
PL
1532 - build-auth-docs:
1533 filters:
1534 branches:
1535 ignore: master
06fde25c
PD
1536 requires:
1537 - checkout
af96487b
PL
1538 - build-recursor-docs:
1539 filters:
1540 branches:
1541 ignore: master
06fde25c
PD
1542 requires:
1543 - checkout
af96487b
PL
1544 - build-dnsdist-docs:
1545 filters:
1546 branches:
1547 ignore: master
06fde25c
PD
1548 requires:
1549 - checkout
af96487b
PL
1550
1551 # These actually deploy
1552 - deploy-auth-docs:
1553 context: docs
1554 filters:
1555 branches:
1556 only: master
06fde25c
PD
1557 requires:
1558 - checkout
af96487b
PL
1559 - deploy-recursor-docs:
1560 context: docs
1561 filters:
1562 branches:
1563 only: master
06fde25c
PD
1564 requires:
1565 - checkout
af96487b
PL
1566 - deploy-dnsdist-docs:
1567 context: docs
1568 filters:
1569 branches:
1570 only: master
06fde25c
PD
1571 requires:
1572 - checkout