]> git.ipfire.org Git - thirdparty/pdns.git/blob - .circleci/config.yml
build docs in circleci
[thirdparty/pdns.git] / .circleci / config.yml
1 version: 2.1
2
3 commands:
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
15 command: |
16 if [ -n "$CIRCLE_PR_NUMBER" ]
17 then
18 echo === Checking out PR "$CIRCLE_PR_NUMBER" from "$CIRCLE_REPOSITORY_URL"
19 git clone --depth 1 $CIRCLE_REPOSITORY_URL ~/project
20 cd ~/project
21 git fetch --depth 1 origin +refs/pull/${CIRCLE_PR_NUMBER}/merge
22 git checkout -qf FETCH_HEAD
23 else
24 echo === Checking out branch "${CIRCLE_BRANCH}" from "$CIRCLE_REPOSITORY_URL"
25 git clone --depth 1 --branch $CIRCLE_BRANCH $CIRCLE_REPOSITORY_URL ~/project
26 fi
27 git show -s
28
29 auth-regress-setup:
30 description: Prepare the environment for auth regression tests
31 steps:
32 - run:
33 name: ensure ca-certificates is installed
34 command: apt-get update && apt-get -qq -y install ca-certificates
35 - attach_workspace:
36 at: /opt
37 - install-auth-deps
38 - run:
39 name: Install test dependencies
40 command: |
41 apt-get -y -qq install \
42 bc \
43 bind9utils \
44 default-jre-headless \
45 dnsutils \
46 ldnsutils \
47 libnet-dns-perl \
48 unbound-host
49 - run:
50 name: Install jdnssectools
51 command: |
52 if [ ! -e /usr/bin/jdnssec-verifyzone ]; then
53 apt-get install -qq -y wget
54 wget https://github.com/dblacka/jdnssec-tools/releases/download/0.14/jdnssec-tools-0.14.tar.gz
55 tar xfz jdnssec-tools-0.14.tar.gz --strip-components=1 -C /
56 rm jdnssec-tools-0.14.tar.gz
57 fi
58 - checkout-shallow
59 - run:
60 name: Allow missing tools in verify-dnssec-zone
61 command: touch regression-tests/tests/verify-dnssec-zone/allow-missing
62
63 auth-regress:
64 description: Run one auth regression context
65 parameters:
66 skip:
67 type: string
68 default: ""
69 rootskip:
70 type: string
71 default: ""
72 doroot:
73 type: boolean
74 default: true
75 context:
76 type: string
77 default: ""
78 prefix:
79 type: string
80 default: "/opt/pdns-auth/"
81 steps:
82 - run:
83 workdir: ~/project/regression-tests
84 name: Run << parameters.context >> tests
85 command: |
86 [ -e ./vars ] && . ./vars
87 rm -rf tests/*/skip
88 for t in << parameters.skip >>
89 do
90 touch tests/$t/skip
91 done
92 PDNS=<< parameters.prefix >>sbin/pdns_server \
93 PDNS2=<< parameters.prefix >>sbin/pdns_server \
94 SDIG=<< parameters.prefix >>bin/sdig \
95 NOTIFY=<< parameters.prefix >>bin/pdns_notify \
96 NSEC3DIG=<< parameters.prefix >>bin/nsec3dig \
97 SAXFR=<< parameters.prefix >>bin/saxfr \
98 ZONE2SQL=<< parameters.prefix >>bin/zone2sql \
99 ZONE2LDAP=<< parameters.prefix >>bin/zone2ldap \
100 PDNSUTIL=<< parameters.prefix >>bin/pdnsutil \
101 PDNSCONTROL=<< parameters.prefix >>bin/pdns_control \
102 ./start-test-stop 5300 << parameters.context >>
103 - when:
104 condition: << parameters.doroot >>
105 steps:
106 - run:
107 workdir: ~/project/regression-tests.rootzone
108 name: Run << parameters.context >> tests for the root zone
109 command: |
110 [ -e ../regression-tests/vars ] && . ../regression-tests/vars
111 rm -rf tests/*/skip
112 for t in << parameters.rootskip >>
113 do
114 touch tests/$t/skip
115 done
116 PDNS=<< parameters.prefix >>sbin/pdns_server \
117 PDNS2=<< parameters.prefix >>sbin/pdns_server \
118 SDIG=<< parameters.prefix >>bin/sdig \
119 NOTIFY=<< parameters.prefix >>bin/pdns_notify \
120 NSEC3DIG=<< parameters.prefix >>bin/nsec3dig \
121 SAXFR=<< parameters.prefix >>bin/saxfr \
122 ZONE2SQL=<< parameters.prefix >>bin/zone2sql \
123 ZONE2LDAP=<< parameters.prefix >>bin/zone2ldap \
124 PDNSUTIL=<< parameters.prefix >>bin/pdnsutil \
125 PDNSCONTROL=<< parameters.prefix >>bin/pdns_control \
126 ./start-test-stop 5300 << parameters.context >>
127
128 install-recursor-deps:
129 description: "Install all libraries needed for the recursor"
130 steps:
131 - run: apt-get update
132 - run:
133 command: |
134 apt-get install -qq -y \
135 libluajit-5.1 \
136 libboost-all-dev \
137 libcap2 \
138 libssl1.1 \
139 libsystemd0 \
140 libsodium18 \
141 libprotobuf10
142
143 install-auth-deps:
144 description: Install all libraries needed to run the auth
145 steps:
146 - run: |
147 apt-get install -qq -y --no-install-recommends \
148 libboost-all-dev \
149 libcdb1 \
150 libkrb5-3 \
151 libldap-2.4-2 \
152 liblmdb0 \
153 libpq5 \
154 libssl1.1 \
155 libsodium18 \
156 libsystemd0 \
157 default-libmysqlclient-dev \
158 unixodbc
159
160 install-auth-dev-deps:
161 description: Install all packages needed to build the auth
162 steps:
163 - run: apt-get update
164 - run:
165 command: |
166 apt-get install -qq -y --no-install-recommends \
167 autoconf \
168 automake \
169 bison \
170 default-libmysqlclient-dev \
171 flex \
172 g++ \
173 git \
174 libboost-all-dev \
175 libcdb-dev \
176 libkrb5-dev \
177 libldap2-dev \
178 liblmdb-dev \
179 libpq-dev \
180 libsodium-dev \
181 libsqlite3-dev \
182 libssl-dev \
183 libtool \
184 make \
185 pkg-config \
186 ragel \
187 sqlite3 \
188 unixodbc-dev \
189 virtualenv \
190 wget
191
192 add-auth-repo:
193 description: "Add the debian repo for the auth"
194 parameters:
195 version:
196 type: string
197 default: "42"
198 distro:
199 type: string
200 default: "debian"
201 release:
202 type: string
203 default: "stretch"
204 steps:
205 - run:
206 name: "Install dependencies"
207 command: "apt-get update && apt-get install -qq -y curl gnupg2"
208 - run:
209 name: "Install apt-keys"
210 command: |
211 if [ "<< parameters.version >>" = "master" ]; then
212 curl https://repo.powerdns.com/CBC8B383-pub.asc | apt-key add -
213 else
214 curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add -
215 fi
216 - run:
217 name: "Add repository"
218 command: |
219 echo 'deb [arch=amd64] http://repo.powerdns.com/<< parameters.distro >> << parameters.release >>-auth-<< parameters.version>> main' >> /etc/apt/sources.list.d/pdns.list
220 - run:
221 name: "add pinning"
222 command: |
223 echo 'Package: pdns-*' > /etc/apt/preferences.d/pdns
224 echo 'Pin: origin repo.powerdns.com' >> /etc/apt/preferences.d/pdns
225 echo 'Pin-Priority: 600' >> /etc/apt/preferences.d/pdns
226 - run:
227 name: update apt cache
228 command: apt-get update
229
230 setup-ccache:
231 description: Install .ccache and set $PATH
232 steps:
233 - run:
234 name: Install ccache
235 command: apt-get update && apt-get -qq -y install ccache
236 - run:
237 name: Setup ccache in $PATH
238 command: echo 'export PATH=/usr/lib/ccache:$PATH' >> $BASH_ENV
239
240 save-ccache-cache:
241 description: Store the .ccache directory
242 parameters:
243 product:
244 type: string
245 default: ""
246 steps:
247 - save_cache:
248 key: ccache-cache-{{ arch }}-<< parameters.product >>-{{ .Branch }}
249 paths:
250 - ~/.ccache
251
252 restore-cache-ccache:
253 description: Restore the .ccache directory
254 parameters:
255 product:
256 type: string
257 default: ""
258 steps:
259 - setup-ccache
260 - run:
261 name: ensure ca-certificates is installed
262 command: apt-get update && apt-get -qq -y install ca-certificates
263 - restore_cache:
264 keys:
265 - ccache-cache-{{ arch }}-<< parameters.product >>-{{ .Branch }}
266 - ccache-cache-{{ arch }}-<< parameters.product >>-
267
268 install-doc-deps:
269 description: Install dependencies needed to build the documentation
270 steps:
271 - run:
272 name: Install dependencies
273 command: |
274 apt-get update && apt-get -qq -y install \
275 autoconf \
276 automake \
277 bison \
278 curl \
279 flex \
280 g++ \
281 git \
282 latexmk \
283 libboost-all-dev \
284 libedit-dev \
285 libluajit-5.1-dev \
286 libssl-dev \
287 make \
288 pkg-config \
289 ragel \
290 virtualenv
291 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
292 apt-get update && apt-get -qq -y install \
293 texlive-full
294 fi
295
296 build-auth-docs:
297 description: Build documentation
298 steps:
299 - run:
300 name: autoconf
301 command: |
302 BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
303 - run:
304 name: configure
305 command: |
306 ./configure \
307 --disable-lua-records \
308 --disable-unit-tests \
309 --without-dynmodules \
310 --without-modules
311 - run:
312 name: build docs
313 command: |
314 make -C docs html-docs
315 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
316 make -C docs all-docs
317 fi
318 - run:
319 name: Upload documents
320 command: |
321 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
322 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' ./doc/html-docs/ doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
323 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./doc/html-docs.tar.bz2 doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
324 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./doc/PowerDNS-Authoritative.pdf doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/authoritative/
325 fi
326
327 build-recursor-docs:
328 description: Build Recursor documentation
329 steps:
330 - run:
331 name: autoconf
332 command: |
333 BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
334 working_directory: ~/project/pdns/recursordist
335 - run:
336 name: configure
337 command: |
338 ./configure \
339 --disable-unit-tests \
340 --disable-protobuf
341 working_directory: ~/project/pdns/recursordist
342 - run:
343 name: build docs
344 command: |
345 make html-docs
346 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
347 make all-docs
348 fi
349 working_directory: ~/project/pdns/recursordist
350 - run:
351 name: Upload documents
352 working_directory: ~/project/pdns/recursordist
353 command: |
354 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
355 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' html-docs/ doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/
356 rsync -crv --no-p --chmod=g=rwX --exclude '*~' html-docs.tar.bz2 doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/
357 rsync -crv --no-p --chmod=g=rwX --exclude '*~' PowerDNS-Recursor.pdf doc_powerdns_com@web1.powerdns.com:/srv/www/doc.powerdns.com/recursor/
358 fi
359
360 build-dnsdist-docs:
361 description: Build dnsdist documentation
362 steps:
363 - run:
364 name: autoconf
365 command: |
366 BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
367 working_directory: ~/project/pdns/dnsdistdist
368 - run:
369 name: configure
370 command: |
371 ./configure \
372 --disable-unit-tests \
373 --disable-protobuf
374 working_directory: ~/project/pdns/dnsdistdist
375 - run:
376 name: build docs
377 command: |
378 make html-docs
379 working_directory: ~/project/pdns/dnsdistdist
380 - run:
381 name: Upload documents
382 working_directory: ~/project/pdns/dnsdistdist
383 command: |
384 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
385 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' html-docs/ dnsdist_org@web1.powerdns.com:/srv/www/dnsdist.org
386 rsync -crv --no-p --chmod=g=rwX --exclude '*~' html-docs.tar.bz2 dnsdist_org@web1.powerdns.com:/srv/www/dnsdist.org
387 rsync -crv --no-p --chmod=g=rwX --exclude '*~' dnsdist.pdf dnsdist_org@web1.powerdns.com:/srv/www/dnsdist.org
388 fi
389
390 jobs:
391 build-auth:
392 docker:
393 - image: debian:stretch
394
395 steps:
396 - checkout-shallow
397 - install-auth-dev-deps
398 - restore-cache-ccache:
399 product: auth
400 - run:
401 name: autoconf
402 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
403 - run:
404 name: configure
405 command: |
406 CFLAGS="-O1 -Werror=vla" \
407 CXXFLAGS="-O1 -Werror=vla" \
408 ./configure \
409 --disable-lua-records \
410 --with-modules='bind lmdb ldap gmysql gsqlite3 gpgsql godbc mydns random tinydns' \
411 --enable-tools \
412 --with-lmdb=/usr \
413 --with-libsodium \
414 --prefix=/opt/pdns-auth
415 - run:
416 name: build
417 command: make -j3 -k
418 - save-ccache-cache:
419 product: auth
420 - run:
421 name: Install the binaries
422 command: make install
423 - persist_to_workspace:
424 root: /opt
425 paths:
426 - pdns-auth
427
428 test-auth-regress-odbc-sqlite3:
429 docker:
430 - image: debian:stretch
431 steps:
432 - auth-regress-setup
433 - run:
434 name: Configure ODBC for sqlite
435 command: |
436 cat >> ~/.odbc.ini \<<- __EOF__
437 [pdns-sqlite3-1]
438 Driver = SQLite3
439 Database = ${PWD}/regression-tests/pdns.sqlite3
440 [pdns-sqlite3-2]
441 Driver = SQLite3
442 Database = ${PWD}/regression-tests/pdns.sqlite32
443 __EOF__
444 - run:
445 name: Install ODBC deps
446 command: |
447 apt-get install -qq -y \
448 unixodbc \
449 libsqliteodbc \
450 sqlite3
451 - run:
452 name: Set up sqlite3 odbc testing
453 command: echo 'export GODBC_SQLITE3_DSN=pdns-sqlite3-1' > ./vars
454 workdir: ~/project/regression-tests
455 - auth-regress:
456 context: godbc_sqlite3-nsec3
457 doroot: false # Broken at the moment
458
459 test-auth-regress-odbc-mssql:
460 docker:
461 - image: debian:stretch
462 - image: mcr.microsoft.com/mssql/server:2019-CTP2.2-ubuntu
463 environment:
464 - ACCEPT_EULA: Y
465 - SA_PASSWORD: 'SAsa12%%'
466 steps:
467 - auth-regress-setup
468 - run:
469 name: Install ODBC deps
470 command: |
471 apt-get install -qq -y \
472 freetds-bin \
473 tdsodbc \
474 unixodbc
475 - run:
476 name: set up mssql odbc
477 command: |
478 cat >> ~/.odbc.ini \<<- __EOF__
479 [pdns-mssql-docker]
480 Driver=FreeTDS
481 Trace=No
482 Server=127.0.0.1
483 Port=1433
484 Database=pdns
485 TDS_Version=7.1
486 [pdns-mssql-docker-nodb]
487 Driver=FreeTDS
488 Trace=No
489 Server=127.0.0.1
490 Port=1433
491 TDS_Version=7.1
492 __EOF__
493 - run:
494 command: cat /usr/share/tdsodbc/odbcinst.ini >> /etc/odbcinst.ini
495 - run:
496 name: create database
497 command: echo 'create database pdns' | isql -v pdns-mssql-docker-nodb sa SAsa12%%
498 - run:
499 name: Set up mssql odbc testing
500 command: echo 'export GODBC_MSSQL_PASSWORD=SAsa12%% GODBC_MSSQL_USERNAME=sa GODBC_MSSQL_DSN=pdns-mssql-docker' > ./vars
501 workdir: ~/project/regression-tests
502 - auth-regress:
503 context: godbc_mssql-nodnssec
504 skip: 8bit-txt-unescaped
505 - auth-regress:
506 context: godbc_mssql
507 skip: 8bit-txt-unescaped
508 - auth-regress:
509 context: godbc_mssql-nsec3
510 skip: 8bit-txt-unescaped
511 - auth-regress:
512 context: godbc_mssql-nsec3-optout
513 skip: 8bit-txt-unescaped
514 - auth-regress:
515 context: godbc_mssql-nsec3-narrow
516 skip: 8bit-txt-unescaped
517
518 test-auth-regress-gsqlite3:
519 docker:
520 - image: debian:stretch
521 steps:
522 - auth-regress-setup
523 - run:
524 command: apt-get install -qq -y sqlite3
525 - auth-regress:
526 context: gsqlite3-nodnssec-both
527 - auth-regress:
528 context: gsqlite3-both
529 - auth-regress:
530 context: gsqlite3-nsec3-both
531 - auth-regress:
532 context: gsqlite3-nsec3-optout-both
533 - auth-regress:
534 context: gsqlite3-nsec3-narrow
535
536 test-auth-regress-bind:
537 docker:
538 - image: debian:stretch
539 - image: circleci/mysql:5 # for the hybrid test
540 steps:
541 - auth-regress-setup
542 - run:
543 command: apt-get install -qq -y sqlite3
544 - auth-regress:
545 context: bind-both
546 - auth-regress:
547 context: bind-dnssec-both
548 - auth-regress:
549 context: bind-dnssec-nsec3-both
550 - auth-regress:
551 context: bind-dnssec-nsec3-optout-both
552 - auth-regress:
553 context: bind-dnssec-nsec3-narrow
554 - run:
555 command: apt-get install -qq -y default-mysql-client
556 - run:
557 command: |
558 cat >> ~/.my.cnf \<<- __EOF__
559 [client]
560 protocol=TCP
561 __EOF__
562 - auth-regress:
563 context: bind-hybrid-nsec3
564
565 test-auth-regress-mydns:
566 docker:
567 - image: debian:stretch
568 - image: circleci/mysql:5
569 steps:
570 - auth-regress-setup
571 - run:
572 command: apt-get install -qq -y default-mysql-client
573 - run:
574 command: |
575 cat >> ~/.my.cnf \<<- __EOF__
576 [client]
577 protocol=TCP
578 __EOF__
579 - auth-regress:
580 context: mydns
581 doroot: false
582
583 test-auth-regress-gmysql:
584 docker:
585 - image: debian:stretch
586 - image: circleci/mysql:5
587 steps:
588 - auth-regress-setup
589 - run:
590 command: apt-get install -qq -y default-mysql-client
591 - run:
592 command: |
593 cat >> ~/.my.cnf \<<- __EOF__
594 [client]
595 protocol=TCP
596 __EOF__
597 - auth-regress:
598 context: gmysql-nodnssec-both
599 - auth-regress:
600 context: gmysql-both
601 - auth-regress:
602 context: gmysql-nsec3-both
603 - auth-regress:
604 context: gmysql-nsec3-optout-both
605 - auth-regress:
606 context: gmysql-nsec3-narrow
607
608 test-auth-regress-gpgsql:
609 docker:
610 - image: debian:stretch
611 - image: circleci/postgres:9
612 environment:
613 POSTGRES_USER: root
614 steps:
615 - auth-regress-setup
616 - run:
617 command: apt-get install -qq -y postgresql-client
618 - run:
619 name: Use TCP for Postgresql connections
620 command: |
621 cat >> ./vars \<<- __EOF__
622 export PGHOST=127.0.0.1
623 export PGPORT=5432
624 __EOF__
625 workdir: ~/project/regression-tests
626 - auth-regress:
627 context: gpgsql-nodnssec-both
628 - auth-regress:
629 context: gpgsql-both
630 - auth-regress:
631 context: gpgsql-nsec3-both
632 - auth-regress:
633 context: gpgsql-nsec3-optout-both
634 - auth-regress:
635 context: gpgsql-nsec3-narrow
636
637 test-auth-regress-ldap:
638 docker:
639 - image: debian:stretch
640 environment:
641 LDAPHOST: ldap://ldapserver/
642 - image: powerdns/ldap-regress:1.2.4-0 # OpenLDAP 2.4.47
643 name: ldapserver
644 command: '--loglevel debug'
645 environment:
646 LDAP_LOG_LEVEL: 0
647 steps:
648 - auth-regress-setup
649 - run: DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ldap-utils
650 - auth-regress:
651 context: ldap-tree
652 doroot: false
653 - auth-regress:
654 context: ldap-simple
655 doroot: false
656 - auth-regress:
657 context: ldap-strict
658 doroot: false
659
660 test-auth-regress-tinydns:
661 docker:
662 - image: debian:stretch
663 steps:
664 - auth-regress-setup
665 - auth-regress:
666 context: tinydns
667 doroot: false
668
669 test-auth-regress-lmdb:
670 docker:
671 - image: debian:stretch
672 steps:
673 - auth-regress-setup
674 - run: apt-get install -y -qq jq curl
675 - auth-regress:
676 context: lmdb-nodnssec-both
677 - auth-regress:
678 context: lmdb-both
679 - auth-regress:
680 context: lmdb-nsec3-both
681 - auth-regress:
682 context: lmdb-nsec3-optout-both
683 - auth-regress:
684 context: lmdb-nsec3-narrow
685
686 test-auth-algorithms:
687 docker:
688 - image: debian:stretch
689 steps:
690 - auth-regress-setup
691 - run:
692 name: Test all algorithms
693 command: /opt/pdns-auth/bin/pdnsutil test-algorithms
694
695 test-auth-api:
696 docker:
697 - image: debian:stretch
698 steps:
699 - auth-regress-setup
700 - run: apt-get -y -qq install virtualenv sqlite3
701 - run:
702 name: Run API tests
703 workdir: ~/project/regression-tests.api
704 command: |
705 PDNSSERVER="/opt/pdns-auth/sbin/pdns_server" \
706 PDNSUTIL="/opt/pdns-auth/bin/pdnsutil" \
707 SDIG="/opt/pdns-auth/bin/sdig" \
708 ZONE2SQL="/opt/pdns-auth/bin/zone2sql" \
709 ./runtests authoritative
710
711 build-recursor:
712 docker:
713 - image: debian:stretch
714 steps:
715 - restore-cache-ccache:
716 product: recursor
717 - run:
718 name: Install dependencies
719 command: |
720 apt-get update && apt-get -qq --no-install-recommends install \
721 autoconf \
722 automake \
723 ca-certificates \
724 curl \
725 bison \
726 flex \
727 g++ \
728 git \
729 libboost-all-dev \
730 libcap-dev \
731 libluajit-5.1-dev \
732 libprotobuf-dev \
733 libsodium-dev \
734 libssl-dev \
735 libsystemd-dev \
736 libtool \
737 make \
738 pkg-config \
739 protobuf-compiler \
740 ragel \
741 virtualenv
742 - checkout-shallow
743 - run:
744 name: autoconf
745 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
746 working_directory: ~/project/pdns/recursordist
747 - run:
748 name: configure
749 command: |
750 CFLAGS="-O1 -Werror=vla" \
751 CXXFLAGS="-O1 -Werror=vla" \
752 ./configure \
753 --enable-unit-tests \
754 --prefix=/opt/pdns-recursor \
755 --with-libsodium \
756 --with-lua=luajit \
757 --with-libcap \
758 --with-protobuf=yes \
759 --without-net-snmp
760 working_directory: ~/project/pdns/recursordist
761 - run:
762 name: build
763 command: make -j3 -k
764 working_directory: ~/project/pdns/recursordist
765 - save-ccache-cache:
766 product: recursor
767 - run:
768 name: Run unit tests
769 command: make check || (cat test-suite.log; false)
770 working_directory: ~/project/pdns/recursordist
771 - run:
772 name: Install resulting binaries
773 command: make install
774 working_directory: ~/project/pdns/recursordist
775 - persist_to_workspace:
776 root: /opt
777 paths:
778 - pdns-recursor
779
780 test-recursor-regression:
781 docker:
782 - image: debian:stretch
783 steps:
784 - add-auth-repo
785 - run: apt-get --no-install-recommends install -qq -y pdns-server pdns-backend-bind pdns-tools daemontools authbind jq libfaketime lua-posix moreutils bc virtualenv protobuf-compiler
786 - install-recursor-deps
787 - run:
788 name: Set up authbind
789 command: |
790 touch /etc/authbind/byport/53
791 chmod 755 /etc/authbind/byport/53
792 - checkout-shallow
793 - attach_workspace:
794 at: /opt
795 - run:
796 name: Run regression tests
797 workdir: ~/project
798 command: |
799 PDNSRECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
800 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
801 ./build-scripts/test-recursor
802
803 test-recursor-bulk:
804 docker:
805 - image: debian:stretch
806 steps:
807 - add-auth-repo
808 - run: apt-get --no-install-recommends install -qq -y pdns-tools moreutils time
809 - install-recursor-deps
810 - checkout-shallow
811 - attach_workspace:
812 at: /opt
813 - run:
814 name: Get the majestic million list
815 workdir: ~/project/regression-tests
816 command: |
817 apt-get install -qq -y unzip && \
818 curl -LO http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip && \
819 unzip top-1m.csv.zip -d .
820 - run:
821 name: Run bulktests
822 command: |
823 DNSBULKTEST=/usr/bin/dnsbulktest \
824 RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
825 THRESHOLD=95 \
826 TRACE=no \
827 ./timestamp ./recursor-test 5300 50000 || \
828 (cat recursor.log; false)
829 workdir: ~/project/regression-tests
830
831 test-recursor-api:
832 docker:
833 - image: debian:stretch
834 steps:
835 - add-auth-repo
836 - run: apt-get --no-install-recommends install -qq -y virtualenv pdns-tools
837 - install-recursor-deps
838 - checkout-shallow
839 - attach_workspace:
840 at: /opt
841 - run:
842 name: Run API tests
843 workdir: ~/project/regression-tests.api
844 command: |
845 PDNSRECURSOR="/opt/pdns-recursor/sbin/pdns_recursor" \
846 ./runtests recursor
847
848 build-auth-docs:
849 docker:
850 - image: debian:stretch
851 steps:
852 - checkout-shallow
853 - install-doc-deps
854 - build-auth-docs
855
856 build-recursor-docs:
857 docker:
858 - image: debian:stretch
859 steps:
860 - checkout-shallow
861 - install-doc-deps
862 - build-recursor-docs
863
864 build-dnsdist-docs:
865 docker:
866 - image: debian:stretch
867 steps:
868 - checkout-shallow
869 - install-doc-deps
870 - build-dnsdist-docs
871
872 workflows:
873 version: 2
874 build-and-test-all:
875 jobs:
876 - build-auth
877 - test-auth-api:
878 requires:
879 - build-auth
880 - test-auth-algorithms:
881 requires:
882 - build-auth
883 - test-auth-regress-odbc-sqlite3:
884 requires:
885 - build-auth
886 - test-auth-regress-odbc-mssql:
887 requires:
888 - build-auth
889 - test-auth-regress-gmysql:
890 requires:
891 - build-auth
892 - test-auth-regress-mydns:
893 requires:
894 - build-auth
895 - test-auth-regress-bind:
896 requires:
897 - build-auth
898 - test-auth-regress-gsqlite3:
899 requires:
900 - build-auth
901 - test-auth-regress-gpgsql:
902 requires:
903 - build-auth
904 - test-auth-regress-lmdb:
905 requires:
906 - build-auth
907 - test-auth-regress-ldap:
908 requires:
909 - build-auth
910 - test-auth-regress-tinydns:
911 requires:
912 - build-auth
913 - build-recursor
914 - test-recursor-regression:
915 requires:
916 - build-recursor
917 - test-recursor-bulk:
918 requires:
919 - build-recursor
920 - test-recursor-api:
921 requires:
922 - build-recursor
923
924 build-docs:
925 jobs:
926 - build-auth-docs
927 - build-recursor-docs
928 - build-dnsdist-docs