forked from isc-projects/bind9
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
478 lines (393 loc) · 10.9 KB
/
.gitlab-ci.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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
variables:
# Not normally needed, but may be if some script uses `apt-get install`.
DEBIAN_FRONTEND: noninteractive
# Locale settings do not affect the build, but might affect tests.
LC_ALL: C
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
CCACHE_DIR: "/ccache"
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
stages:
- precheck
- build
- test
- push
### Runner Tag Templates
.linux-amd64: &linux_amd64
tags:
- linux
- amd64
.linux-i386: &linux_i386
tags:
- linux
- i386
### Docker Image Templates
# CentOS
.centos-centos6-amd64: ¢os_centos6_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
<<: *linux_amd64
.centos-centos7-amd64: ¢os_centos7_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
<<: *linux_amd64
# Debian
.debian-jessie-amd64: &debian_jessie_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
<<: *linux_amd64
.debian-jessie-i386: &debian_jessie_i386_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
<<: *linux_i386
.debian-stretch-amd64: &debian_stretch_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
<<: *linux_amd64
.debian-stretch-i386: &debian_stretch_i386_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
<<: *linux_i386
.debian-sid-amd64: &debian_sid_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
<<: *linux_amd64
.debian-sid-i386: &debian_sid_i386_image
image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
<<: *linux_i386
# Fedora
.fedora-29-amd64: &fedora_29_amd64_image
image: "$CI_REGISTRY_IMAGE:fedora-29-amd64"
<<: *linux_amd64
# Ubuntu
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
<<: *linux_amd64
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
<<: *linux_i386
.ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64"
<<: *linux_amd64
.ubuntu-bionic-i386: &ubuntu_bionic_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-i386"
<<: *linux_i386
### Job Templates
.default-triggering-rules: &default_triggering_rules
only:
- merge_requests
- tags
- web
.precheck: &precheck_job
<<: *default_triggering_rules
<<: *debian_sid_amd64_image
stage: precheck
.build: &build_job
<<: *default_triggering_rules
stage: build
before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
script:
- ./configure --enable-developer --with-libtool --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- test -z "${RUN_MAKE_INSTALL}" || make install
artifacts:
untracked: true
expire_in: "1 hour"
.system_test: &system_test_job
<<: *default_triggering_rules
stage: test
retry: 2
before_script:
- bash -x bin/tests/system/ifconfig.sh up
- bash -x util/prepare-softhsm2.sh
script:
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
- test -s bin/tests/system/systests.output
artifacts:
untracked: true
expire_in: "1 week"
when: on_failure
.unit_test: &unit_test_job
<<: *default_triggering_rules
stage: test
before_script:
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
- bash -x util/prepare-softhsm2.sh
script:
- make unit
after_script:
- kyua report-html --force --results-file kyua.results --results-filter "" --output kyua_html
artifacts:
paths:
- kyua.log
- kyua.results
- kyua_html/
expire_in: "1 week"
when: on_failure
### Job Definitions
# Jobs in the precheck stage
misc:sid:amd64:
<<: *precheck_job
script:
- sh util/check-ans-prereq.sh
- sh util/checklibs.sh > checklibs.out
- sh util/tabify-changes < CHANGES > CHANGES.tmp
- diff -urNap CHANGES CHANGES.tmp
- rm CHANGES.tmp
- perl util/check-changes CHANGES
- perl -w util/merge_copyrights
- diff -urNap util/copyrights util/newcopyrights
- rm util/newcopyrights
- perl -w util/update_copyrights < util/copyrights
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
- xmllint --noout --nonet --html `git ls-files '*.html'`
- sh util/check-win32util-configure
artifacts:
paths:
- util/newcopyrights
- checklibs.out
expire_in: "1 week"
when: on_failure
🐞:sid:amd64:
<<: *precheck_job
script: util/check-cocci
# Jobs for doc builds on Debian Sid (amd64)
docs:sid:amd64:
<<: *debian_sid_amd64_image
stage: build
script:
- ./configure || cat config.log
- make -C doc/misc docbook
- make -C doc/arm Bv9ARM.html
artifacts:
paths:
- doc/arm/
expire_in: "1 month"
only:
- merge_requests
- tags
- web
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
push:docs:sid:amd64:
<<: *debian_sid_amd64_image
stage: push
dependencies: []
script:
- curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
only:
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
# Jobs for regular GCC builds on CentOS 6 (amd64)
gcc:centos6:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
<<: *centos_centos6_amd64_image
<<: *build_job
system:gcc:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *system_test_job
dependencies:
- gcc:centos6:amd64
unit:gcc:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *unit_test_job
dependencies:
- gcc:centos6:amd64
# Jobs for regular GCC builds on CentOS 7 (amd64)
gcc:centos7:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *centos_centos7_amd64_image
<<: *build_job
system:gcc:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *system_test_job
dependencies:
- gcc:centos7:amd64
unit:gcc:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *unit_test_job
dependencies:
- gcc:centos7:amd64
# Jobs for regular GCC builds on Debian 8 Jessie (amd64)
gcc:jessie:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--without-cmocka --with-python"
<<: *debian_jessie_amd64_image
<<: *build_job
system:gcc:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *system_test_job
dependencies:
- gcc:jessie:amd64
unit:gcc:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *unit_test_job
dependencies:
- gcc:jessie:amd64
# Jobs for regular GCC builds on Debian 9 Stretch (amd64)
gcc:stretch:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_stretch_amd64_image
<<: *build_job
system:gcc:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *system_test_job
dependencies:
- gcc:stretch:amd64
unit:gcc:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- gcc:stretch:amd64
# Jobs for regular GCC builds on Debian Sid (amd64)
gcc:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
RUN_MAKE_INSTALL: 1
<<: *debian_sid_amd64_image
<<: *build_job
system:gcc:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- gcc:sid:amd64
unit:gcc:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- gcc:sid:amd64
# Jobs for regular GCC builds on Debian Sid (i386)
gcc:sid:i386:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2 --without-python"
<<: *debian_sid_i386_image
<<: *build_job
system:gcc:sid:i386:
<<: *debian_sid_i386_image
<<: *system_test_job
dependencies:
- gcc:sid:i386
unit:gcc:sid:i386:
<<: *debian_sid_i386_image
<<: *unit_test_job
dependencies:
- gcc:sid:i386
# Jobs for regular GCC builds on Fedora 29 (amd64)
gcc:fedora29:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *fedora_29_amd64_image
<<: *build_job
system:gcc:fedora29:amd64:
<<: *fedora_29_amd64_image
<<: *system_test_job
dependencies:
- gcc:fedora29:amd64
unit:gcc:fedora29:amd64:
<<: *fedora_29_amd64_image
<<: *unit_test_job
dependencies:
- gcc:fedora29:amd64
# Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
gcc:xenial:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *ubuntu_xenial_amd64_image
<<: *build_job
system:gcc:xenial:amd64:
<<: *ubuntu_xenial_amd64_image
<<: *system_test_job
dependencies:
- gcc:xenial:amd64
unit:gcc:xenial:amd64:
<<: *ubuntu_xenial_amd64_image
<<: *unit_test_job
dependencies:
- gcc:xenial:amd64
# Jobs for regular GCC builds on Ubuntu 18.04 Bionic Beaver (amd64)
gcc:bionic:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *ubuntu_bionic_amd64_image
<<: *build_job
system:gcc:bionic:amd64:
<<: *ubuntu_bionic_amd64_image
<<: *system_test_job
dependencies:
- gcc:bionic:amd64
unit:gcc:bionic:amd64:
<<: *ubuntu_bionic_amd64_image
<<: *unit_test_job
dependencies:
- gcc:bionic:amd64
# Jobs for GCC builds with ASAN enabled on Debian Sid (amd64)
asan:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
LDFLAGS: "-fsanitize=address,undefined"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image
<<: *build_job
system:asan:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- asan:sid:amd64
unit:asan:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- asan:sid:amd64
# Jobs for Clang builds on Debian Stretch (amd64)
clang:stretch:amd64:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
EXTRA_CONFIGURE: "--with-python=python3"
<<: *debian_stretch_amd64_image
<<: *build_job
unit:clang:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- clang:stretch:amd64
# Jobs for Clang builds on Debian Stretch (i386)
clang:stretch:i386:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
EXTRA_CONFIGURE: "--with-python=python2"
<<: *debian_stretch_i386_image
<<: *build_job
# Jobs for PKCS#11-enabled GCC builds on Debian Sid (amd64)
pkcs11:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so"
<<: *debian_sid_amd64_image
<<: *build_job
system:pkcs11:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- pkcs11:sid:amd64
unit:pkcs11:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- pkcs11:sid:amd64