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