]> git.ipfire.org Git - thirdparty/pdns.git/blob - .travis.yml
Merge pull request #3658 from rgacogne/dnsdist-maxqpsiprule-crash
[thirdparty/pdns.git] / .travis.yml
1 sudo: required
2 dist: trusty
3 language: cpp
4 compiler:
5 - gcc
6 - clang
7
8 before_script:
9 - git describe --always --dirty=+
10
11 ### setup travis environment ###
12 - sudo sysctl net.ipv6.conf.lo.disable_ipv6=0
13 - export POSIXLY_CORRECT=1
14 - export CFLAGS=-O0
15 - export CXXFLAGS=-O0
16 - export OPTFLAGS=-O0
17 - sudo apt-get -qq update
18
19
20 ### build requirements ###
21
22 # global build requirements
23 - sudo apt-get -qq --no-install-recommends install
24 libboost-all-dev
25 liblua5.1-dev
26 libedit-dev
27 - cd ..
28 - wget http://ppa.launchpad.net/kalon33/gamesgiroll/ubuntu/pool/main/libs/libsodium/libsodium-dev_1.0.3-1~ppa14.04+1_amd64.deb
29 - wget http://ppa.launchpad.net/kalon33/gamesgiroll/ubuntu/pool/main/libs/libsodium/libsodium13_1.0.3-1~ppa14.04+1_amd64.deb
30 - sudo dpkg -i libsodium-dev_1.0.3-1~ppa14.04+1_amd64.deb libsodium13_1.0.3-1~ppa14.04+1_amd64.deb
31 - cd pdns
32
33 # pkcs11 build requirements
34 - sudo apt-get -qq --no-install-recommends install
35 libp11-kit-dev
36
37 # geoip-backend
38 - sudo apt-get -qq --no-install-recommends install
39 libgeoip-dev
40 libyaml-cpp-dev
41
42 # ldap-backend
43 - sudo apt-get -qq --no-install-recommends install
44 libldap-dev
45
46 # opendbx-backend
47 - sudo apt-get -qq --no-install-recommends install
48 libopendbx1-dev
49 libopendbx1-sqlite3
50
51 # remote-backend build requirements
52 - sudo apt-get -qq --no-install-recommends install
53 libzmq3-dev
54
55
56 ### documentation requirements
57 - sudo apt-get -qq --no-install-recommends install
58 pandoc
59 xmlto
60
61
62 ### test requirements ###
63
64 # authoritative test requirements / setup
65 - sudo apt-get -qq --no-install-recommends install
66 bind9utils
67 ldnsutils
68 libnet-dns-perl
69 moreutils
70 unbound-host
71 validns
72 default-jre
73 jq
74 - cd ..
75 - wget http://www.verisignlabs.com/dnssec-tools/packages/jdnssec-tools-0.12.tar.gz
76 - sudo tar xfz jdnssec-tools-0.12.tar.gz --strip-components=1 -C /
77 - cd pdns
78
79 # pkcs11 test requirements / setup
80 - sudo apt-get -qq --no-install-recommends install
81 p11-kit
82 softhsm
83 - sudo mkdir -p /etc/pkcs11/modules/
84 - sudo cp -f regression-tests/softhsm.mod /etc/pkcs11/modules/softhsm.module
85 - sudo cp -f regression-tests/softhsm.conf /etc/softhsm/softhsm.conf
86 - sudo chmod 0755 /etc/softhsm/
87 - sudo chmod 0644 /etc/softhsm/softhsm.conf
88 - sudo chmod 0777 /var/lib/softhsm
89 - p11-kit -l # ensure it's ok
90
91 # bind-backend tests requirements
92 - sudo apt-get -qq --no-install-recommends install
93 alien
94 - cd ..
95 - wget ftp://ftp.nominum.com/pub/nominum/dnsperf/2.0.0.0/dnsperf-2.0.0.0-1-rhel-6-x86_64.tar.gz
96 - tar xzvf dnsperf-2.0.0.0-1-rhel-6-x86_64.tar.gz
97 - fakeroot alien --to-deb dnsperf-2.0.0.0-1/dnsperf-2.0.0.0-1.el6.x86_64.rpm
98 - sudo dpkg -i dnsperf_2.0.0.0-2_amd64.deb
99 - cd pdns
100
101 # geoip-backend test requirements / setup
102 - sudo apt-get -qq --no-install-recommends install
103 geoip-database
104 - export geoipregion=oc geoipregionip=1.2.3.4
105
106 # gmysql-backend test requirements
107 - sudo apt-get -qq --no-install-recommends install
108 mysql-server
109
110 # godbc-backend test setup
111 - echo -e "[pdns-sqlite3-1]\nDriver = SQLite3\nDatabase = ${PWD}/regression-tests/pdns.sqlite3\n\n[pdns-sqlite3-2]\nDriver = SQLite3\nDatabase = ${PWD}/regression-tests/pdns.sqlite32\n" > ${HOME}/.odbc.ini
112 - export GODBC_SQLITE3_DSN=pdns-sqlite3-1
113
114 # ldap-backend test setup
115 - sudo apt-get -qq --no-install-recommends install
116 slapd
117 ldap-utils
118 - mkdir /tmp/ldap-dns
119 - pushd /tmp/ldap-dns
120 - for schema in /etc/ldap/schema/{core,cosine}.schema ${TRAVIS_BUILD_DIR}/modules/ldapbackend/{dnsdomain2,pdns-domaininfo}.schema ; do echo include $schema ; done > ldap.conf
121 - mkdir slapd.d
122 - slaptest -f ldap.conf -F slapd.d
123 - sudo cp slapd.d/cn=config/cn=schema/cn={*dns*.ldif /etc/ldap/slapd.d/cn=config/cn=schema/
124 - sudo chown -R openldap:openldap /etc/ldap/slapd.d/
125 - sudo service slapd restart
126 - popd
127 - sudo -u openldap mkdir -p /var/lib/ldap/powerdns
128 - sudo ldapadd -Y EXTERNAL -H ldapi:/// -f ./modules/ldapbackend/testfiles/add.ldif
129
130 # remote-backend tests requirements
131 - sudo apt-get -qq --no-install-recommends install
132 ruby-json
133 rubygems-integration
134 socat
135 - gem install bundler --no-rdoc --no-ri
136 - cd modules/remotebackend
137 - ruby -S bundle install
138 - cd ../..
139
140 # tinydns
141 - sudo apt-get -qq --no-install-recommends install
142 libcdb-dev
143
144 # documentation test requirements
145 - virtualenv $HOME/.venv
146 - source $HOME/.venv/bin/activate
147 - pip install -q pandocfilters==1.2.3 mkdocs==0.14 linkchecker==9.3 click==5.1
148
149 # recursor test requirements / setup
150 - sudo apt-get -qq --no-install-recommends install
151 authbind
152 daemontools
153 - cd ..
154 - wget http://s3.amazonaws.com/alexa-static/top-1m.csv.zip
155 - unzip top-1m.csv.zip -d ./pdns/regression-tests
156 - cd pdns
157 - 'for suffix in {1..40}; do sudo /sbin/ip addr add 10.0.3.$suffix/32 dev lo; done'
158 - sudo touch /etc/authbind/byport/53
159 - sudo chmod 755 /etc/authbind/byport/53
160
161 # no-backend tests
162 - sudo apt-get -qq --no-install-recommends install
163 faketime
164
165
166 script:
167 - ./bootstrap
168 # Build without --enable-botan1.10 option, Botan/SoftHSM conflict #2496
169 - source $HOME/.venv/bin/activate
170 - CFLAGS='-O1' CXXFLAGS='-O1' ./configure
171 --with-dynmodules='bind gmysql geoip gpgsql gsqlite3 ldap lua mydns opendbx pipe random remote tinydns'
172 --with-modules=''
173 --with-sqlite3
174 --enable-libsodium
175 --enable-experimental-pkcs11
176 --enable-remotebackend-zeromq
177 --enable-tools
178 --enable-unit-tests
179 --enable-backend-unit-tests
180 --disable-dependency-tracking
181 - deactivate
182
183 - make -k dist
184
185 - make -k -j3
186
187 - cd docs
188 - source $HOME/.venv/bin/activate
189 - make check-links
190 - deactivate
191 - cd ..
192
193 - make -k install DESTDIR=/tmp/pdns-install-dir
194 - find /tmp/pdns-install-dir -ls
195
196 - make -j3 check
197 - test -f pdns/test-suite.log && cat pdns/test-suite.log || true
198 - test -f modules/remotebackend/test-suite.log && cat modules/remotebackend/test-suite.log || true
199
200 #DNSName - make -k -j3 -C pdns $(grep '(EXEEXT):' pdns/Makefile | cut -f1 -d\$ | grep -E -v 'dnsdist|calidns')
201 - make -k -j3 -C pdns $(grep '(EXEEXT):' pdns/Makefile | cut -f1 -d\$ | grep -E -v 'dnspcap2protobuf|dnsdist|calidns|speedtest')
202
203 - cd pdns
204 - ./pdnsutil test-algorithms
205 - cd ..
206
207 - cd regression-tests
208
209 - ./timestamp ./start-test-stop 5300 ldap-tree
210 - ./timestamp ./start-test-stop 5300 ldap-simple
211 - ./timestamp ./start-test-stop 5300 ldap-strict
212
213 - ./timestamp ./start-test-stop 5300 bind-both
214 - ./timestamp ./start-test-stop 5300 bind-dnssec-both
215 - ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-both
216 - ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-optout-both
217 - ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-narrow
218 - ./timestamp ./start-test-stop 5300 bind-hybrid-nsec3
219 #ecdsa - ./timestamp ./start-test-stop 5300 bind-dnssec-pkcs11
220
221 - ./timestamp ./start-test-stop 5300 geoip
222 - ./timestamp ./start-test-stop 5300 geoip-nsec3-narrow
223
224 - ./timestamp ./start-test-stop 5300 gmysql-nodnssec-both
225 - ./timestamp ./start-test-stop 5300 gmysql-both
226 - ./timestamp ./start-test-stop 5300 gmysql-nsec3-both
227 - ./timestamp ./start-test-stop 5300 gmysql-nsec3-optout-both
228 - ./timestamp ./start-test-stop 5300 gmysql-nsec3-narrow
229
230 # - ./timestamp ./start-test-stop 5300 godbc_sqlite3-nsec3
231
232 - ./timestamp ./start-test-stop 5300 gpgsql-nodnssec-both
233 - ./timestamp ./start-test-stop 5300 gpgsql-both
234 - ./timestamp ./start-test-stop 5300 gpgsql-nsec3-both
235 - ./timestamp ./start-test-stop 5300 gpgsql-nsec3-optout-both
236 - ./timestamp ./start-test-stop 5300 gpgsql-nsec3-narrow
237
238 - ./timestamp ./start-test-stop 5300 gsqlite3-nodnssec-both
239 - ./timestamp ./start-test-stop 5300 gsqlite3-both
240 - ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-both
241 - ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-optout-both
242 - ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-narrow
243
244 - ./timestamp ./start-test-stop 5300 mydns
245
246 - ./timestamp ./start-test-stop 5300 opendbx-sqlite3
247
248 - ./timestamp ./start-test-stop 5300 remotebackend-pipe
249 - ./timestamp ./start-test-stop 5300 remotebackend-pipe-dnssec
250 - ./timestamp ./start-test-stop 5300 remotebackend-unix
251 - ./timestamp ./start-test-stop 5300 remotebackend-unix-dnssec
252 - ./timestamp ./start-test-stop 5300 remotebackend-http
253 - ./timestamp ./start-test-stop 5300 remotebackend-http-dnssec
254 - ./timestamp ./start-test-stop 5300 remotebackend-zeromq
255 - ./timestamp ./start-test-stop 5300 remotebackend-zeromq-dnssec
256
257 - ./timestamp ./start-test-stop 5300 tinydns
258 - cd ..
259
260 - cd regression-tests.rootzone
261 - ./timestamp ./start-test-stop 5300 bind-both
262 - ./timestamp ./start-test-stop 5300 bind-dnssec-both
263 - ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-both
264 - ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-optout-both
265 - ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-narrow
266 - ./timestamp ./start-test-stop 5300 bind-hybrid-nsec3
267
268 - ./timestamp ./start-test-stop 5300 gmysql-nodnssec-both
269 - ./timestamp ./start-test-stop 5300 gmysql-both
270 - ./timestamp ./start-test-stop 5300 gmysql-nsec3-both
271 - ./timestamp ./start-test-stop 5300 gmysql-nsec3-optout-both
272 - ./timestamp ./start-test-stop 5300 gmysql-nsec3-narrow
273
274 - ./timestamp ./start-test-stop 5300 gpgsql-nodnssec-both
275 - ./timestamp ./start-test-stop 5300 gpgsql-both
276 - ./timestamp ./start-test-stop 5300 gpgsql-nsec3-both
277 - ./timestamp ./start-test-stop 5300 gpgsql-nsec3-optout-both
278 - ./timestamp ./start-test-stop 5300 gpgsql-nsec3-narrow
279
280 - ./timestamp ./start-test-stop 5300 gsqlite3-nodnssec-both
281 - ./timestamp ./start-test-stop 5300 gsqlite3-both
282 - ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-both
283 - ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-optout-both
284 - ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-narrow
285
286 - cd ..
287
288 ### recursor ###
289
290 # distribution build
291 - ./build-scripts/dist-recursor
292 - cd pdns/recursordist
293 - tar xf pdns-recursor-*.tar.bz2
294 - rm -f pdns-recursor-*.tar.bz2
295 - cd pdns-recursor-*
296 - ./configure
297 - make -k -j3
298 - cd ../
299 - ln -s pdns-recursor*/pdns_recursor .
300 - cd ../..
301
302 # regression-tests
303 - cd regression-tests.recursor
304 - cp vars.sample vars
305 - ./config.sh
306 - ./start.sh
307 - sleep 3
308 - svstat configs/*
309 - ./runtests
310 - test ! -s ./failed_tests
311 - ./stop.sh
312 - sleep 3
313 - ./clean.sh
314 - cd ..
315
316 # bulktest
317 - cd regression-tests
318 - THRESHOLD=90 TRACE=no ./timestamp ./recursor-test 5300 25000
319 - cd ..
320
321
322 ### dnsdist ###
323
324 # distribution build
325 - ./build-scripts/dist-dnsdist
326 - cd pdns/dnsdistdist
327 - tar xf dnsdist*.tar.bz2
328 - cd dnsdist-*
329 - ./configure --enable-unit-tests --enable-libsodium --enable-dnscrypt
330 - make -k -j3
331 - ./testrunner
332 - cp ./dnsdist ../../../regression-tests.dnsdist/
333 - cd ../../../regression-tests.dnsdist
334 - DNSDISTBIN=./dnsdist ./runtests -v
335 - rm -f ./dnsdist
336 - rm -f ./DNSCryptResolver.cert ./DNSCryptResolver.key
337 - cd ..
338 - rm -rf pdns/dnsdistdist/dnsdist-*/
339
340
341 ### api ###
342 - cd regression-tests.api
343 - ./runtests authoritative
344 - ./runtests recursor
345 - cd ..
346
347
348 ### no backend tests ###
349 - cd regression-tests.nobackend/
350 - ./runtests
351 - test ! -s ./failed_tests
352 - cd ..
353
354 - rm -f regression-tests/zones/*-slave.* #FIXME
355
356 - git status
357 - git status | grep -q clean
358
359
360 notifications:
361 irc:
362 channels:
363 - "irc.oftc.net#powerdns-dev"
364 template:
365 - "%{author} @ %{repository} / %{branch} - Build:#%{build_number} : %{message} - Changes: %{compare_url} - Build details: %{build_url}"
366 use_notice: true
367 skip_join: true