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