.gitlab-ci.yml 6.85 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:
118
    - ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr --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
166
  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:
    - atf.out
    - 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
167
    - sh util/checklibs.sh > checklibs.out
168
    - perl util/check-changes CHANGES
Ondřej Surý's avatar
Ondřej Surý committed
169
170
171
    - perl -w util/merge_copyrights
    - diff -urNap util/copyrights util/newcopyrights
    - rm util/newcopyrights
172
173
    - 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
174
175
    - 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
176
177
178
  artifacts:
    paths:
    - util/newcopyrights
Evan Hunt's avatar
Evan Hunt committed
179
    - checklibs.out
Ondřej Surý's avatar
Ondřej Surý committed
180
181
182
    expire_in: '1 week'
    when: on_failure

Michał Kępień's avatar
Michał Kępień committed
183
184
185
186
187
188
189
190
191
192
193
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/
194
195
196
197
198
199
200
201
202
203
204
    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
205

Ondřej Surý's avatar
Ondřej Surý committed
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
#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
230
231
232
233
234
235
236
237
238
239
240
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
241
    CFLAGS: "-Wall -Wextra -O2 -g -DDIG_SIGCHASE=1"
Michał Kępień's avatar
Michał Kępień committed
242
243
244
  <<: *centos_centos7_amd64_image
  <<: *build_job

Ondřej Surý's avatar
Ondřej Surý committed
245
build:debian:sid:amd64:
Michał Kępień's avatar
Fix CI    
Michał Kępień committed
246
247
  variables:
    EXTRA_CONFIGURE: "--without-eddsa"
Ondřej Surý's avatar
Ondřej Surý committed
248
249
250
251
  <<: *debian_sid_amd64_image
  <<: *build_job
    
build:debian:sid:i386:
Michał Kępień's avatar
Fix CI    
Michał Kępień committed
252
253
  variables:
    EXTRA_CONFIGURE: "--without-eddsa"
Ondřej Surý's avatar
Ondřej Surý committed
254
255
256
  <<: *debian_sid_i386_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
257
258
259
260
261
262
263
264
265
266
267
268
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
269
270
271
272
273
274
275
276
277
278
279
280
unittest:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  dependencies:
    - build:debian:sid:amd64
    
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
281
282
283
284
285
286
287
288
289
290
291
292
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
293
294
295
296
297
298
299
300
301
302
303
systemtest:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *system_test_job
  dependencies:
    - build:debian:sid:amd64
    
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
304
305
306
307
308
309

install:debian:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *install_test_job
  dependencies:
    - build:debian:sid:amd64