.gitlab-ci.yml 8.12 KB
Newer Older
Ondřej Surý's avatar
Ondřej Surý committed
1
2
3
4
variables:
  DEBIAN_FRONTEND: noninteractive
  LC_ALL: C
  DOCKER_DRIVER: overlay2
Michał Kępień's avatar
Fix CI    
Michał Kępień committed
5
  CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
Ondřej Surý's avatar
Ondřej Surý committed
6
7
8
9
10
11
  CCACHE_DIR: "/ccache"

stages:
  - precheck
  - build
  - test
12
  - push
Ondřej Surý's avatar
Ondřej Surý committed
13

Michał Kępień's avatar
Michał Kępień committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.centos-centos6-amd64: &centos_centos6_amd64_image
  image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
  tags:
    - linux
    - docker
    - amd64

.centos-centos7-amd64: &centos_centos7_amd64_image
  image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
  tags:
    - linux
    - docker
    - amd64

Ondřej Surý's avatar
Ondřej Surý committed
28
29
30
31
32
.debian-jessie-amd64: &debian_jessie_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
  tags:
    - linux
    - docker
33
    - amd64
Ondřej Surý's avatar
Ondřej Surý committed
34
35
36
37
38
39

.debian-jessie-i386: &debian_jessie_i386_image
  image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
  tags:
    - linux
    - docker
40
    - i386
Ondřej Surý's avatar
Ondřej Surý committed
41
42
43
44
45
46

.debian-stretch-amd64: &debian_stretch_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
  tags:
    - linux
    - docker
47
    - amd64
Ondřej Surý's avatar
Ondřej Surý committed
48
49
50
51
52
53

.debian-stretch-i386:: &debian_stretch_i386_image
  image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
  tags:
    - linux
    - docker
54
    - i386
Ondřej Surý's avatar
Ondřej Surý committed
55
56
57
58
59
60

.debian-buster-amd64: &debian_buster_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
  tags:
    - linux
    - docker
61
    - amd64
Ondřej Surý's avatar
Ondřej Surý committed
62
63
64
65
66
67

.debian-buster-i386:: &debian_buster_i386_image
  image: "$CI_REGISTRY_IMAGE:debian-buster-i386"
  tags:
    - linux
    - docker
68
    - i386
Ondřej Surý's avatar
Ondřej Surý committed
69
70
71
72
73
74

.debian-sid-amd64: &debian_sid_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
  tags:
    - linux
    - docker
75
    - amd64
Ondřej Surý's avatar
Ondřej Surý committed
76
77
78
79
80
81

.debian-sid-i386: &debian_sid_i386_image
  image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
  tags:
    - linux
    - docker
82
    - i386
Ondřej Surý's avatar
Ondřej Surý committed
83
84
85
86
87
88

.ubuntu-trusty-amd64: &ubuntu_trusty_amd64_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-amd64"
  tags:
    - linux
    - docker
89
    - amd64
Ondřej Surý's avatar
Ondřej Surý committed
90
91
92
93
94
95

.ubuntu-trusty-i386: &ubuntu_trusty_i386_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-i386"
  tags:
    - linux
    - docker
96
    - i386
Ondřej Surý's avatar
Ondřej Surý committed
97
98
99
100
101
102

.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
  tags:
    - linux
    - docker
103
    - amd64
Ondřej Surý's avatar
Ondřej Surý committed
104
105
106
107
108
109

.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
  tags:
    - linux
    - docker
110
    - i386
Ondřej Surý's avatar
Ondřej Surý committed
111
112
113
114
115
116
117

.build: &build_job
  stage: build
  before_script:
    - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
    - autoreconf -fi
  script:
Evan Hunt's avatar
Evan Hunt committed
118
    - ./configure --enable-developer --with-randomdev=/dev/urandom --with-libtool --disable-static --with-cmocka --with-libidn2 --prefix=$HOME/.local --without-make-clean "${EXTRA_CONFIGURE}" || cat config.log
Ondřej Surý's avatar
Ondřej Surý committed
119
120
    - make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
  artifacts:
Michał Kępień's avatar
Michał Kępień committed
121
122
    paths:
    - doc/
Ondřej Surý's avatar
Ondřej Surý committed
123
124
125
    expire_in: '1 hour'
    untracked: true

Ondřej Surý's avatar
Ondřej Surý committed
126
127
128
129
130
131
132
.install_test: &install_test_job
  stage: test
  before_script:
    - mkdir $HOME/.local
  script:
    - make install

Ondřej Surý's avatar
Ondřej Surý committed
133
134
135
136
137
138
.system_test: &system_test_job
  stage: test
  before_script:
    - rm -rf .ccache
    - bash -x bin/tests/system/ifconfig.sh up
  script:
139
140
    - ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
    - test -s bin/tests/system/systests.output
Ondřej Surý's avatar
Ondřej Surý committed
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
  artifacts:
    untracked: true
    expire_in: '1 week'
    when: on_failure

.unit_test: &unit_test_job
  stage: test
  before_script:
    - export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
  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

precheck:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  stage: precheck
  script:
Evan Hunt's avatar
Evan Hunt committed
166
    - sh util/checklibs.sh > checklibs.out
167
    - perl util/check-changes CHANGES
Ondřej Surý's avatar
Ondřej Surý committed
168
169
170
    - perl -w util/merge_copyrights
    - diff -urNap util/copyrights util/newcopyrights
    - rm util/newcopyrights
171
172
    - 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
173
174
    - xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
    - xmllint --noout --nonet --html `git ls-files '*.html'`
Ondřej Surý's avatar
Ondřej Surý committed
175
176
177
  artifacts:
    paths:
    - util/newcopyrights
Evan Hunt's avatar
Evan Hunt committed
178
    - checklibs.out
Ondřej Surý's avatar
Ondřej Surý committed
179
180
181
    expire_in: '1 week'
    when: on_failure

Michał Kępień's avatar
Michał Kępień committed
182
183
184
185
186
187
188
189
190
191
192
docs:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  stage: test
  dependencies:
    - build:debian:sid:amd64
  script:
    - make -C doc/misc docbook
    - make -C doc/arm Bv9ARM.html
  artifacts:
    paths:
    - doc/arm/
193
194
195
196
197
198
199
200
201
202
203
    expire_in: '1 month'

push:docs:
  <<: *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_.*$/@isc-projects/bind9
Michał Kępień's avatar
Michał Kępień committed
204

Ondřej Surý's avatar
Ondřej Surý committed
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#build:debian:jessie:amd64:
#  <<: *debian_jessie_amd64_image
#  <<: *build_job
#
#build:debian:jessie:i386:
#  <<: *debian_jessie_i386_image
#  <<: *build_job
#
#build:debian:stretch:amd64:
#  <<: *debian_stretch_amd64_image
#  <<: *build_job
#
#build:debian:buster:i386:
#  <<: *debian_buster_i386_image
#  <<: *build_job
#
#build:ubuntu:trusty:amd64:
#  <<: *ubuntu_trusty_amd64_image
#  <<: *build_job
#
#build:ubuntu:xenial:i386:
#  <<: *ubuntu_xenial_i386_image
#  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
build:centos:centos6:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
    EXTRA_CONFIGURE: "--disable-warn-error"
  <<: *centos_centos6_amd64_image
  <<: *build_job

build:centos:centos7:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
  <<: *centos_centos7_amd64_image
  <<: *build_job

Ondřej Surý's avatar
Ondřej Surý committed
244
build:debian:sid:amd64:
Michał Kępień's avatar
Fix CI    
Michał Kępień committed
245
246
  variables:
    EXTRA_CONFIGURE: "--without-eddsa"
Ondřej Surý's avatar
Ondřej Surý committed
247
248
  <<: *debian_sid_amd64_image
  <<: *build_job
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265

build:asan:debian:sid:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g -fsanitize=address,undefined"
    LDFLAGS: "-fsanitize=address,undefined"
    EXTRA_CONFIGURE: "--with-libidn2"
  <<: *debian_sid_amd64_image
  <<: *build_job

build:clang:debian:stretch:i386:
  variables:
    CC: clang
    CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
  <<: *debian_stretch_i386_image
  <<: *build_job

Ondřej Surý's avatar
Ondřej Surý committed
266
build:debian:sid:i386:
Michał Kępień's avatar
Fix CI    
Michał Kępień committed
267
268
  variables:
    EXTRA_CONFIGURE: "--without-eddsa"
Ondřej Surý's avatar
Ondřej Surý committed
269
270
271
  <<: *debian_sid_i386_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
272
273
274
275
276
277
278
279
280
281
282
283
unittest:centos:centos6:amd64:
  <<: *centos_centos6_amd64_image
  <<: *unit_test_job
  dependencies:
    - build:centos:centos6:amd64

unittest:centos:centos7:amd64:
  <<: *centos_centos7_amd64_image
  <<: *unit_test_job
  dependencies:
    - build:centos:centos7:amd64

Ondřej Surý's avatar
Ondřej Surý committed
284
285
286
287
288
unittest:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  dependencies:
    - build:debian:sid:amd64
289
290
291
292
293
294
295
296
297
298
299
300
301

unittest:asan:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  dependencies:
    - build:asan:debian:sid:amd64

unittest:clang:debian:stretch:amd64:
  <<: *debian_stretch_amd64_image
  <<: *unit_test_job
  dependencies:
    - build:clang:debian:stretch:amd64

Ondřej Surý's avatar
Ondřej Surý committed
302
303
304
305
306
307
unittest:debian:sid:i386:
  <<: *debian_sid_i386_image
  <<: *unit_test_job
  dependencies:
    - build:debian:sid:i386

Michał Kępień's avatar
Michał Kępień committed
308
309
310
311
312
313
314
315
316
317
318
319
systemtest:centos:centos6:amd64:
  <<: *centos_centos6_amd64_image
  <<: *system_test_job
  dependencies:
    - build:centos:centos6:amd64

systemtest:centos:centos7:amd64:
  <<: *centos_centos7_amd64_image
  <<: *system_test_job
  dependencies:
    - build:centos:centos7:amd64

Ondřej Surý's avatar
Ondřej Surý committed
320
321
322
323
324
systemtest:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *system_test_job
  dependencies:
    - build:debian:sid:amd64
325
326
327
328
329
330
331

systemtest:asan:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *system_test_job
  dependencies:
    - build:asan:debian:sid:amd64

Ondřej Surý's avatar
Ondřej Surý committed
332
333
334
335
336
systemtest:debian:sid:i386:
  <<: *debian_sid_i386_image
  <<: *system_test_job
  dependencies:
    - build:debian:sid:i386
Ondřej Surý's avatar
Ondřej Surý committed
337
338
339
340
341
342

install:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *install_test_job
  dependencies:
    - build:debian:sid:amd64
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362

noassert:build:debian:sid:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g -DISC_CHECK_NONE=1"
    EXTRA_CONFIGURE: "--with-libidn2"
  <<: *debian_sid_amd64_image
  <<: *build_job

noassert:unittest:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  dependencies:
    - noassert:build:debian:sid:amd64

noassert:systemtest:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *system_test_job
  dependencies:
    - noassert:build:debian:sid:amd64