]> git.ipfire.org Git - thirdparty/pdns.git/blob - .travis.yml
Merge pull request #3135 from paddg/patch-1
[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 # remote-backend tests requirements
115 - sudo apt-get -qq --no-install-recommends install
116 ruby-json
117 rubygems-integration
118 socat
119 - gem install bundler --no-rdoc --no-ri
120 - cd modules/remotebackend
121 - ruby -S bundle install
122 - cd ../..
123
124 # tinydns
125 - sudo apt-get -qq --no-install-recommends install
126 libcdb-dev
127
128 # documentation test requirements
129 - virtualenv $HOME/.venv
130 - source $HOME/.venv/bin/activate
131 - pip install -q pandocfilters==1.2.3 mkdocs==0.14 linkchecker==9.3 click==5.1
132
133 # recursor test requirements / setup
134 - sudo apt-get -qq --no-install-recommends install
135 authbind
136 daemontools
137 - cd ..
138 - wget http://s3.amazonaws.com/alexa-static/top-1m.csv.zip
139 - unzip top-1m.csv.zip -d ./pdns/regression-tests
140 - cd pdns
141 - 'for suffix in {1..40}; do sudo /sbin/ip addr add 10.0.3.$suffix/32 dev lo; done'
142 - sudo touch /etc/authbind/byport/53
143 - sudo chmod 755 /etc/authbind/byport/53
144
145 # no-backend tests
146 - sudo apt-get -qq --no-install-recommends install
147 faketime
148
149
150 script:
151 - ./bootstrap
152 # Build without --enable-botan1.10 option, Botan/SoftHSM conflict #2496
153 - source $HOME/.venv/bin/activate
154 - CFLAGS='-O1' CXXFLAGS='-O1' ./configure
155 --with-dynmodules='bind gmysql geoip gpgsql gsqlite3 ldap lua mydns opendbx pipe random remote tinydns'
156 --with-modules=''
157 --without-mbedtls
158 --with-sqlite3
159 --enable-libsodium
160 --enable-experimental-pkcs11
161 --enable-remotebackend-zeromq
162 --enable-tools
163 --enable-unit-tests
164 --enable-backend-unit-tests
165 --disable-dependency-tracking
166 - deactivate
167
168 - make -k dist
169
170 - make -k -j3
171
172 - cd docs
173 - source $HOME/.venv/bin/activate
174 - make check-links
175 - deactivate
176 - cd ..
177
178 - make -k install DESTDIR=/tmp/pdns-install-dir
179 - find /tmp/pdns-install-dir -ls
180
181 - make -j3 check
182 - test -f pdns/test-suite.log && cat pdns/test-suite.log || true
183 - test -f modules/remotebackend/test-suite.log && cat modules/remotebackend/test-suite.log || true
184
185 #DNSName - make -k -j3 -C pdns $(grep '(EXEEXT):' pdns/Makefile | cut -f1 -d\$ | grep -E -v 'dnsdist|calidns')
186 - make -k -j3 -C pdns $(grep '(EXEEXT):' pdns/Makefile | cut -f1 -d\$ | grep -E -v 'dnsdist|calidns|speedtest')
187
188 - cd pdns
189 - ./pdnsutil test-algorithms
190 - cd ..
191
192 - cd regression-tests
193 - ./timestamp ./start-test-stop 5300 bind-both
194 - ./timestamp ./start-test-stop 5300 bind-dnssec-both
195 - ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-both
196 - ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-optout-both
197 - ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-narrow
198 - ./timestamp ./start-test-stop 5300 bind-hybrid-nsec3
199 #ecdsa - ./timestamp ./start-test-stop 5300 bind-dnssec-pkcs11
200
201 - ./timestamp ./start-test-stop 5300 geoip
202 - ./timestamp ./start-test-stop 5300 geoip-nsec3-narrow
203
204 - ./timestamp ./start-test-stop 5300 gmysql-nodnssec-both
205 - ./timestamp ./start-test-stop 5300 gmysql-both
206 - ./timestamp ./start-test-stop 5300 gmysql-nsec3-both
207 - ./timestamp ./start-test-stop 5300 gmysql-nsec3-optout-both
208 - ./timestamp ./start-test-stop 5300 gmysql-nsec3-narrow
209
210 # - ./timestamp ./start-test-stop 5300 godbc_sqlite3-nsec3
211
212 - ./timestamp ./start-test-stop 5300 gpgsql-nodnssec-both
213 - ./timestamp ./start-test-stop 5300 gpgsql-both
214 - ./timestamp ./start-test-stop 5300 gpgsql-nsec3-both
215 - ./timestamp ./start-test-stop 5300 gpgsql-nsec3-optout-both
216 - ./timestamp ./start-test-stop 5300 gpgsql-nsec3-narrow
217
218 - ./timestamp ./start-test-stop 5300 gsqlite3-nodnssec-both
219 - ./timestamp ./start-test-stop 5300 gsqlite3-both
220 - ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-both
221 - ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-optout-both
222 - ./timestamp ./start-test-stop 5300 gsqlite3-nsec3-narrow
223
224 - ./timestamp ./start-test-stop 5300 mydns
225
226 - ./timestamp ./start-test-stop 5300 opendbx-sqlite3
227
228 - ./timestamp ./start-test-stop 5300 remotebackend-pipe
229 - ./timestamp ./start-test-stop 5300 remotebackend-pipe-dnssec
230 - ./timestamp ./start-test-stop 5300 remotebackend-unix
231 - ./timestamp ./start-test-stop 5300 remotebackend-unix-dnssec
232 - ./timestamp ./start-test-stop 5300 remotebackend-http
233 - ./timestamp ./start-test-stop 5300 remotebackend-http-dnssec
234 - ./timestamp ./start-test-stop 5300 remotebackend-zeromq
235 - ./timestamp ./start-test-stop 5300 remotebackend-zeromq-dnssec
236
237 - ./timestamp ./start-test-stop 5300 tinydns
238 - cd ..
239
240
241 ### recursor ###
242
243 # in-tree build
244 - cd pdns
245 - make -k -j3 pdns_recursor
246 - rm -f pdns_recursor
247 - cd ..
248
249 # distribution build
250 - ./build-scripts/dist-recursor
251 - cd pdns/recursordist
252 - tar xf pdns-recursor-*.tar.bz2
253 - rm -f pdns-recursor-*.tar.bz2
254 - cd pdns-recursor-*
255 - ./configure
256 - make -k -j3
257 - cd ../..
258 - ln -s recursordist/pdns-recursor*/pdns_recursor .
259 - cd ..
260
261 # regression-tests
262 - cd regression-tests.recursor
263 - cp vars.sample vars
264 - ./config.sh
265 - ./start.sh
266 - sleep 3
267 - svstat configs/*
268 - ./runtests
269 #DNSName: - test ! -s ./failed_tests
270 - ./stop.sh
271 - sleep 3
272 - ./clean.sh
273 - cd ..
274
275 # bulktest
276 - cd regression-tests
277 - THRESHOLD=90 TRACE=no ./timestamp ./recursor-test 5300 25000
278 - cd ..
279
280
281 ### dnsdist ###
282
283 # distribution build
284 - ./build-scripts/dist-dnsdist
285 - cd pdns/dnsdistdist
286 - tar xf dnsdist*.tar.bz2
287 - cd dnsdist-*
288 - ./configure --enable-unit-tests --enable-libsodium --enable-dnscrypt
289 - make -k -j3
290 - ./testrunner
291 - cp ./dnsdist ../../../regression-tests.dnsdist/
292 - cd ../../../regression-tests.dnsdist
293 - DNSDISTBIN=./dnsdist ./runtests -v
294 - rm -f ./dnsdist
295 - rm -f ./DNSCryptResolver.cert ./DNSCryptResolver.key
296 - cd ..
297 - rm -rf pdns/dnsdistdist/dnsdist-*/
298
299
300 ### api ###
301 - cd regression-tests.api
302 - ./runtests authoritative
303 - ./runtests recursor
304 - cd ..
305
306
307 ### no backend tests ###
308 - cd regression-tests.nobackend/
309 - ./runtests
310 - test ! -s ./failed_tests
311 - cd ..
312
313 - rm -f regression-tests/zones/*-slave.* #FIXME
314
315 - git status
316 - git status | grep -q clean
317
318
319 notifications:
320 irc:
321 channels:
322 - "irc.oftc.net#powerdns-dev"
323 template:
324 - "%{author} @ %{repository} / %{branch} - Build:#%{build_number} : %{message} - Changes: %{compare_url} - Build details: %{build_url}"
325 use_notice: true
326 skip_join: true