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