.gitlab-ci.yml 22.3 KB
Newer Older
1
variables:
Michał Kępień's avatar
Michał Kępień committed
2
  # Not normally needed, but may be if some script uses `apt-get install`.
3
  DEBIAN_FRONTEND: noninteractive
Michał Kępień's avatar
Michał Kępień committed
4
  # Locale settings do not affect the build, but might affect tests.
5
  LC_ALL: C
Michał Kępień's avatar
Michał Kępień committed
6

7
  CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
8
  CCACHE_DIR: "/ccache"
9
  SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
10

11 12 13
  # VirtualBox driver needs to set build_dir to "/builds" in gitlab-runner.toml
  KYUA_RESULT: "$CI_PROJECT_DIR/kyua.results"

Michał Kępień's avatar
Michał Kępień committed
14
  GIT_DEPTH: 1
15 16 17
  BUILD_PARALLEL_JOBS: 6
  TEST_PARALLEL_JOBS: 6

Ondřej Surý's avatar
Ondřej Surý committed
18
  MAKE: make
19 20
  CONFIGURE: ./configure
  SCAN_BUILD: scan-build-9
Ondřej Surý's avatar
Ondřej Surý committed
21

22
stages:
23
  - precheck
24
  - build
25
  - unit
Ondřej Surý's avatar
Ondřej Surý committed
26
  - system
27
  - docs
28
  - push
Ondřej Surý's avatar
Ondřej Surý committed
29
  - postcheck
30

Michał Kępień's avatar
Michał Kępień committed
31 32
### Runner Tag Templates

Michał Kępień's avatar
Michał Kępień committed
33
# Note: BSD runners extract the operating system version to use from job name
Michał Kępień's avatar
Michał Kępień committed
34 35 36 37 38 39

.freebsd-amd64: &freebsd_amd64
  tags:
    - freebsd
    - amd64

40
.linux-amd64: &linux_amd64
Michał Kępień's avatar
Michał Kępień committed
41 42 43 44
  tags:
    - linux
    - amd64

45
.linux-i386: &linux_i386
Michał Kępień's avatar
Michał Kępień committed
46 47
  tags:
    - linux
48 49
    - i386

Michał Kępień's avatar
Michał Kępień committed
50 51 52 53 54
.openbsd-amd64: &openbsd_amd64
  tags:
    - openbsd
    - amd64

Michał Kępień's avatar
Michał Kępień committed
55 56
### Docker Image Templates

57 58 59 60 61 62
# Alpine Linux

.alpine-3.10-amd64: &alpine_3_10_amd64_image
  image: "$CI_REGISTRY_IMAGE:alpine-3.10-amd64"
  <<: *linux_amd64

Michał Kępień's avatar
Michał Kępień committed
63 64
# CentOS

65 66 67 68 69 70 71
.centos-centos6-amd64: &centos_centos6_amd64_image
  image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
  <<: *linux_amd64

.centos-centos7-amd64: &centos_centos7_amd64_image
  image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
  <<: *linux_amd64
Michał Kępień's avatar
Michał Kępień committed
72

Michał Kępień's avatar
Michał Kępień committed
73 74 75 76
.centos-centos8-amd64: &centos_centos8_amd64_image
  image: "$CI_REGISTRY_IMAGE:centos-centos8-amd64"
  <<: *linux_amd64

Michał Kępień's avatar
Michał Kępień committed
77 78
# Debian

79 80
.debian-jessie-amd64: &debian_jessie_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
81
  <<: *linux_amd64
82

83 84
.debian-stretch-amd64: &debian_stretch_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
85
  <<: *linux_amd64
86

87
.debian-stretch-i386: &debian_stretch_i386_image
88
  image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
89
  <<: *linux_i386
90

Michał Kępień's avatar
Michał Kępień committed
91 92
.debian-buster-amd64: &debian_buster_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
93
  <<: *linux_amd64
Michał Kępień's avatar
Michał Kępień committed
94

95 96
.debian-sid-amd64: &debian_sid_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
97
  <<: *linux_amd64
98

99 100
.debian-sid-i386: &debian_sid_i386_image
  image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
101
  <<: *linux_i386
102

Michał Kępień's avatar
Michał Kępień committed
103 104
# Fedora

105 106
.fedora-30-amd64: &fedora_30_amd64_image
  image: "$CI_REGISTRY_IMAGE:fedora-30-amd64"
Michał Kępień's avatar
Michał Kępień committed
107 108
  <<: *linux_amd64

Michał Kępień's avatar
Michał Kępień committed
109 110
# Ubuntu

111 112
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
113
  <<: *linux_amd64
Ondřej Surý's avatar
Ondřej Surý committed
114

115 116
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
117
  <<: *linux_i386
Ondřej Surý's avatar
Ondřej Surý committed
118

119 120
.ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64"
121
  <<: *linux_amd64
122

123 124
.ubuntu-bionic-i386: &ubuntu_bionic_i386_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-i386"
125
  <<: *linux_i386
126

Michał Kępień's avatar
Michał Kępień committed
127 128
### Job Templates

129 130 131 132 133 134
.default-triggering-rules: &default_triggering_rules
  only:
    - merge_requests
    - tags
    - web

135 136 137 138 139 140 141 142
.release-branch-triggering-rules: &release_branch_triggering_rules
  only:
    - merge_requests
    - tags
    - web
    - master@isc-projects/bind9
    - /^v9_[1-9][0-9]$/@isc-projects/bind9

143
.precheck: &precheck_job
144
  <<: *default_triggering_rules
145 146 147
  <<: *debian_sid_amd64_image
  stage: precheck

148
.autoconf: &autoconf_job
149
  <<: *release_branch_triggering_rules
150 151 152 153 154
  <<: *debian_sid_amd64_image
  stage: precheck
  script:
    - autoreconf -fi
  artifacts:
155 156 157 158 159
    paths:
      - aclocal.m4
      - configure
      - ltmain.sh
      - m4/libtool.m4
160
    expire_in: "1 week"
161

162
.configure: &configure |
163
    ${CONFIGURE} \
164 165 166 167 168 169 170 171 172 173 174 175
    --disable-maintainer-mode \
    --enable-developer \
    --with-libtool \
    --disable-static \
    --with-cmocka \
    --with-libxml2 \
    --with-json-c \
    --prefix=$HOME/.local \
    --without-make-clean \
    $EXTRA_CONFIGURE \
    || cat config.log
    
176
.build: &build_job
177
  <<: *default_triggering_rules
178
  stage: build
179
  before_script:
180
    - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
181
  script:
182
    - *configure
Ondřej Surý's avatar
Ondřej Surý committed
183
    - ${MAKE} -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
184
    - test -z "${RUN_MAKE_INSTALL}" || make install
185 186
  dependencies:
    - autoreconf:sid:amd64
187 188
  needs:
    - autoreconf:sid:amd64
189 190
  artifacts:
    untracked: true
191
    expire_in: "1 week"
192

193 194
.setup_interfaces: &setup_interfaces |
    if [ "$(id -u)" -eq "0" ]; then
195
      sh -x bin/tests/system/ifconfig.sh up;
196
    else
197
      sudo sh -x bin/tests/system/ifconfig.sh up;
198 199 200
    fi

.setup_softhsm: &setup_softhsm |
201
    sh -x util/prepare-softhsm2.sh
202

203
.system_test: &system_test_job
204
  <<: *default_triggering_rules
205
  stage: system
206
  retry: 2
207
  before_script:
208 209
    - *setup_interfaces
    - *setup_softhsm
210
  script:
211
    - ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
212
    - test -s bin/tests/system/systests.output
213 214
  artifacts:
    untracked: true
215
    expire_in: "1 week"
216 217
    when: on_failure

218
.kyua_report: &kyua_report_html |
219
  kyua --logfile /dev/null report-html \
220 221 222 223 224
       --force \
       --results-file "$KYUA_RESULT" \
       --results-filter "" \
       --output kyua_html

225
.unit_test: &unit_test_job
226
  <<: *default_triggering_rules
227
  stage: unit
228
  before_script:
229
    - *setup_softhsm
230
  script:
231
    - make unit
232
  after_script:
233
    - *kyua_report_html
234
  artifacts:
235
    paths:
236 237 238 239
      - kyua.log
      - kyua.results
      - kyua_html/
    expire_in: "1 week"
240
    when: on_failure
241

Ondřej Surý's avatar
Ondřej Surý committed
242 243 244 245 246 247 248 249 250 251 252
.cppcheck_args: &run_cppcheck |
  cppcheck --enable=warning,performance,portability,information,missingInclude \
           --include=config.h \
           --quiet \
           --std=c11 \
           --language=c \
           --project=compile_commands.json \
           --error-exitcode=2 \
           -j ${TEST_PARALLEL_JOBS:-1} \
           --xml \
           --output-file=cppcheck.results \
253 254 255
           --relative-paths="$CI_PROJECT_DIR" \
           --inline-suppr \
           --suppressions-list=util/suppressions.txt
Ondřej Surý's avatar
Ondřej Surý committed
256 257 258 259 260 261 262 263 264

.cppcheck_report: &cppcheck_report_html |
  cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" \
                      --file=cppcheck.results \
                      --report-dir=cppcheck_html/

.cppcheck: &cppcheck_job
  <<: *default_triggering_rules
  stage: postcheck
265 266 267
  before_script:
    - export GCC_VERSION=$(gcc --version | sed -n 's/.*\([0-9]\+\)\.[0-9]\+\.[0-9]\+.*/\1/p')
    - sed -i "/gcc\",/a\"-DCPPCHECK\", \"-D__STDC__\", \"-D__GNUC__=${GCC_VERSION}\"," compile_commands.json
Ondřej Surý's avatar
Ondřej Surý committed
268 269 270 271 272 273 274 275 276 277 278 279
  script:
    - *run_cppcheck
  after_script:
    - *cppcheck_report_html
  artifacts:
    paths:
      - compile_commands.json
      - cppcheck.results
      - cppcheck_html/
    expire_in: "1 week"
    when: on_failure

Michał Kępień's avatar
Michał Kępień committed
280 281 282 283
### Job Definitions

# Jobs in the precheck stage

284 285 286
autoreconf:sid:amd64:
  <<: *autoconf_job

287
misc:sid:amd64:
288
  <<: *precheck_job
289
  script:
290
    - sh util/check-ans-prereq.sh
291
    - sh util/checklibs.sh > checklibs.out
Mark Andrews's avatar
Mark Andrews committed
292 293 294
    - sh util/tabify-changes < CHANGES > CHANGES.tmp
    - diff -urNap CHANGES CHANGES.tmp
    - rm CHANGES.tmp
295
    - perl util/check-changes CHANGES
296 297 298
    - perl -w util/merge_copyrights
    - diff -urNap util/copyrights util/newcopyrights
    - rm util/newcopyrights
299 300
    - 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
301 302
    - xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
    - xmllint --noout --nonet --html `git ls-files '*.html'`
303
    - sh util/check-win32util-configure
304 305
  artifacts:
    paths:
306 307 308
      - util/newcopyrights
      - checklibs.out
    expire_in: "1 week"
309 310
    when: on_failure

311
🐞:sid:amd64:
312
  <<: *precheck_job
313 314 315
  script:
    - util/check-cocci
    - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
316

Michał Kępień's avatar
Michał Kępień committed
317 318
# Jobs for doc builds on Debian Sid (amd64)

319
docs:sid:amd64:
320
  <<: *release_branch_triggering_rules
321
  <<: *debian_sid_amd64_image
322
  stage: docs
323
  script:
324
    - ./configure || cat config.log
325 326
    - make -C doc/misc docbook
    - make -C doc/arm Bv9ARM.html
327 328
  dependencies:
    - autoreconf:sid:amd64
329 330
  needs:
    - autoreconf:sid:amd64
331 332
  artifacts:
    paths:
333 334
      - doc/arm/
    expire_in: "1 month"
335

336
push:docs:sid:amd64:
337 338 339 340 341 342
  <<: *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:
343 344
    - master@isc-projects/bind9
    - /^v9_[1-9][0-9]$/@isc-projects/bind9
345

346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
# Jobs for regular GCC builds on Alpine Linux 3.10 (amd64)

gcc:alpine3.10:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
    EXTRA_CONFIGURE: "--enable-dnstap"
  <<: *alpine_3_10_amd64_image
  <<: *build_job

system:gcc:alpine3.10:amd64:
  <<: *alpine_3_10_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:alpine3.10:amd64
361
  needs: ["gcc:alpine3.10:amd64"]
362 363 364 365 366 367

unit:gcc:alpine3.10:amd64:
  <<: *alpine_3_10_amd64_image
  <<: *unit_test_job
  dependencies:
    - gcc:alpine3.10:amd64
368
  needs: ["gcc:alpine3.10:amd64"]
369

Michał Kępień's avatar
Michał Kępień committed
370 371
# Jobs for regular GCC builds on CentOS 6 (amd64)

372
gcc:centos6:amd64:
Michał Kępień's avatar
Michał Kępień committed
373 374 375
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
Ondřej Surý's avatar
Ondřej Surý committed
376
    EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
Michał Kępień's avatar
Michał Kępień committed
377 378 379
  <<: *centos_centos6_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
380 381 382 383 384
system:gcc:centos6:amd64:
  <<: *centos_centos6_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:centos6:amd64
385
  needs: ["gcc:centos6:amd64"]
Michał Kępień's avatar
Michał Kępień committed
386 387 388 389 390 391

unit:gcc:centos6:amd64:
  <<: *centos_centos6_amd64_image
  <<: *unit_test_job
  dependencies:
    - gcc:centos6:amd64
392
  needs: ["gcc:centos6:amd64"]
Michał Kępień's avatar
Michał Kępień committed
393

Michał Kępień's avatar
Michał Kępień committed
394 395
# Jobs for regular GCC builds on CentOS 7 (amd64)

396
gcc:centos7:amd64:
Michał Kępień's avatar
Michał Kępień committed
397 398 399
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
Michał Kępień's avatar
Michał Kępień committed
400
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
Michał Kępień's avatar
Michał Kępień committed
401 402 403
  <<: *centos_centos7_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
404 405 406 407 408
system:gcc:centos7:amd64:
  <<: *centos_centos7_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:centos7:amd64
409
  needs: ["gcc:centos7:amd64"]
Michał Kępień's avatar
Michał Kępień committed
410 411 412 413 414 415

unit:gcc:centos7:amd64:
  <<: *centos_centos7_amd64_image
  <<: *unit_test_job
  dependencies:
    - gcc:centos7:amd64
416
  needs: ["gcc:centos7:amd64"]
417

Michał Kępień's avatar
Michał Kępień committed
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441
# Jobs for regular GCC builds on CentOS 8 (amd64)

gcc:centos8:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
    EXTRA_CONFIGURE: "--with-libidn2"
  <<: *centos_centos8_amd64_image
  <<: *build_job

system:gcc:centos8:amd64:
  <<: *centos_centos8_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:centos8:amd64
  needs: ["gcc:centos8:amd64"]

unit:gcc:centos8:amd64:
  <<: *centos_centos8_amd64_image
  <<: *unit_test_job
  dependencies:
    - gcc:centos8:amd64
  needs: ["gcc:centos8:amd64"]

Michał Kępień's avatar
Michał Kępień committed
442 443
# Jobs for regular GCC builds on Debian 8 Jessie (amd64)

444
gcc:jessie:amd64:
445 446 447
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
448
    EXTRA_CONFIGURE: "--without-cmocka --with-python --disable-geoip"
449 450 451
  <<: *debian_jessie_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
452 453 454 455 456
system:gcc:jessie:amd64:
  <<: *debian_jessie_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:jessie:amd64
457
  needs: ["gcc:jessie:amd64"]
Michał Kępień's avatar
Michał Kępień committed
458 459 460 461 462 463

unit:gcc:jessie:amd64:
  <<: *debian_jessie_amd64_image
  <<: *unit_test_job
  dependencies:
    - gcc:jessie:amd64
464
  needs: ["gcc:jessie:amd64"]
Michał Kępień's avatar
Michał Kępień committed
465

Michał Kępień's avatar
Michał Kępień committed
466 467
# Jobs for regular GCC builds on Debian 9 Stretch (amd64)

468
gcc:stretch:amd64:
469 470 471 472 473 474
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
  <<: *debian_stretch_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
475 476 477 478 479
system:gcc:stretch:amd64:
  <<: *debian_stretch_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:stretch:amd64
480
  needs: ["gcc:stretch:amd64"]
Michał Kępień's avatar
Michał Kępień committed
481 482 483 484 485 486

unit:gcc:stretch:amd64:
  <<: *debian_stretch_amd64_image
  <<: *unit_test_job
  dependencies:
    - gcc:stretch:amd64
487
  needs: ["gcc:stretch:amd64"]
Michał Kępień's avatar
Michał Kępień committed
488

Michał Kępień's avatar
Michał Kępień committed
489 490 491 492 493 494 495 496 497 498 499 500 501 502
# Jobs for regular GCC builds on Debian 10 Buster (amd64)

gcc:buster:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
  <<: *debian_buster_amd64_image
  <<: *build_job

system:gcc:buster:amd64:
  <<: *debian_buster_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:buster:amd64
503
  needs: ["gcc:buster:amd64"]
Michał Kępień's avatar
Michał Kępień committed
504 505 506 507 508 509

unit:gcc:buster:amd64:
  <<: *debian_buster_amd64_image
  <<: *unit_test_job
  dependencies:
    - gcc:buster:amd64
510
  needs: ["gcc:buster:amd64"]
Michał Kępień's avatar
Michał Kępień committed
511

512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
# Jobs for scan-build builds on Debian Buster (amd64)

.scan_build: &scan_build |
  ${SCAN_BUILD} --html-title="BIND 9 ($CI_COMMIT_SHORT_SHA)" \
                --keep-cc \
                --status-bugs \
                --keep-going \
                -o scan-build.reports \
                make -j${BUILD_PARALLEL_JOBS:-1} all V=1

scan-build:buster:amd64:
  <<: *default_triggering_rules
  <<: *debian_buster_amd64_image
  stage: postcheck
  variables:
    CC: clang-9
    CFLAGS: "-Wall -Wextra -O2 -g"
    CONFIGURE: "${SCAN_BUILD} ./configure"
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
  script:
    - *configure
    - *scan_build
  dependencies:
    - autoreconf:sid:amd64
  needs:
    - autoreconf:sid:amd64
  artifacts:
    paths:
      - scan-build.reports/
    expire_in: "1 week"
    when: on_failure

Michał Kępień's avatar
Michał Kępień committed
544 545
# Jobs for regular GCC builds on Debian Sid (amd64)

546
gcc:sid:amd64:
547 548
  variables:
    CC: gcc
549
    CFLAGS: "-Wall -Wextra -O3 -g"
Michał Kępień's avatar
Michał Kępień committed
550
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
551
    RUN_MAKE_INSTALL: 1
Ondřej Surý's avatar
Ondřej Surý committed
552
    MAKE: bear make
553
  <<: *debian_sid_amd64_image
554
  <<: *build_job
555

Michał Kępień's avatar
Michał Kępień committed
556 557 558
system:gcc:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *system_test_job
559
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
560
    - gcc:sid:amd64
561
  needs: ["gcc:sid:amd64"]
562

563
unit:gcc:sid:amd64:
564 565 566
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  dependencies:
567
    - gcc:sid:amd64
568
  needs: ["gcc:sid:amd64"]
569

Ondřej Surý's avatar
Ondřej Surý committed
570 571 572 573 574 575 576
cppcheck:gcc:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *cppcheck_job
  dependencies:
    - gcc:sid:amd64
  needs: ["gcc:sid:amd64"]

Michał Kępień's avatar
Michał Kępień committed
577 578
# Jobs for regular GCC builds on Debian Sid (i386)

Michał Kępień's avatar
Michał Kępień committed
579 580 581
gcc:sid:i386:
  variables:
    CC: gcc
582
    CFLAGS: "-Wall -Wextra -O3 -g"
Michał Kępień's avatar
Michał Kępień committed
583
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --without-python"
Michał Kępień's avatar
Michał Kępień committed
584 585
  <<: *debian_sid_i386_image
  <<: *build_job
586

Michał Kępień's avatar
Michał Kępień committed
587 588 589
system:gcc:sid:i386:
  <<: *debian_sid_i386_image
  <<: *system_test_job
590
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
591
    - gcc:sid:i386
592
  needs: ["gcc:sid:i386"]
593

594
unit:gcc:sid:i386:
595 596 597
  <<: *debian_sid_i386_image
  <<: *unit_test_job
  dependencies:
598
    - gcc:sid:i386
599
  needs: ["gcc:sid:i386"]
600

601
# Jobs for regular GCC builds on Fedora 30 (amd64)
Michał Kępień's avatar
Michał Kępień committed
602

603
gcc:fedora30:amd64:
Michał Kępień's avatar
Michał Kępień committed
604 605 606 607
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
    EXTRA_CONFIGURE: "--with-libidn2"
608
  <<: *fedora_30_amd64_image
Michał Kępień's avatar
Michał Kępień committed
609 610
  <<: *build_job

611 612
system:gcc:fedora30:amd64:
  <<: *fedora_30_amd64_image
Michał Kępień's avatar
Michał Kępień committed
613 614
  <<: *system_test_job
  dependencies:
615
    - gcc:fedora30:amd64
616
  needs: ["gcc:fedora30:amd64"]
Michał Kępień's avatar
Michał Kępień committed
617

618 619
unit:gcc:fedora30:amd64:
  <<: *fedora_30_amd64_image
Michał Kępień's avatar
Michał Kępień committed
620 621
  <<: *unit_test_job
  dependencies:
622
    - gcc:fedora30:amd64
623
  needs: ["gcc:fedora30:amd64"]
Michał Kępień's avatar
Michał Kępień committed
624

Michał Kępień's avatar
Michał Kępień committed
625 626
# Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)

Michał Kępień's avatar
Michał Kępień committed
627 628 629 630
gcc:xenial:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g"
631
    EXTRA_CONFIGURE: "--disable-geoip"
Michał Kępień's avatar
Michał Kępień committed
632 633 634 635 636
  <<: *ubuntu_xenial_amd64_image
  <<: *build_job

system:gcc:xenial:amd64:
  <<: *ubuntu_xenial_amd64_image
Michał Kępień's avatar
Michał Kępień committed
637 638
  <<: *system_test_job
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
639
    - gcc:xenial:amd64
640
  needs: ["gcc:xenial:amd64"]
Michał Kępień's avatar
Michał Kępień committed
641

Michał Kępień's avatar
Michał Kępień committed
642 643 644
unit:gcc:xenial:amd64:
  <<: *ubuntu_xenial_amd64_image
  <<: *unit_test_job
Michał Kępień's avatar
Michał Kępień committed
645
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
646
    - gcc:xenial:amd64
647
  needs: ["gcc:xenial:amd64"]
Michał Kępień's avatar
Michał Kępień committed
648

Michał Kępień's avatar
Michał Kępień committed
649 650
# Jobs for regular GCC builds on Ubuntu 18.04 Bionic Beaver (amd64)

Michał Kępień's avatar
Michał Kępień committed
651 652 653 654 655 656 657 658 659 660
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
661 662
  <<: *system_test_job
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
663
    - gcc:bionic:amd64
664
  needs: ["gcc:bionic:amd64"]
665

Michał Kępień's avatar
Michał Kępień committed
666 667 668
unit:gcc:bionic:amd64:
  <<: *ubuntu_bionic_amd64_image
  <<: *unit_test_job
669
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
670
    - gcc:bionic:amd64
671
  needs: ["gcc:bionic:amd64"]
672

Michał Kępień's avatar
Michał Kępień committed
673 674
# Jobs for GCC builds with ASAN enabled on Debian Sid (amd64)

Michał Kępień's avatar
Michał Kępień committed
675 676 677 678 679 680
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"
681
  <<: *debian_sid_amd64_image
Michał Kępień's avatar
Michał Kępień committed
682
  <<: *build_job
683

684
system:asan:sid:amd64:
685 686 687
  <<: *debian_sid_amd64_image
  <<: *system_test_job
  dependencies:
688
    - asan:sid:amd64
689
  needs: ["asan:sid:amd64"]
690

Michał Kępień's avatar
Michał Kępień committed
691 692 693
unit:asan:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
694
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
695
    - asan:sid:amd64
696
  needs: ["asan:sid:amd64"]
697

698 699 700 701 702 703 704 705 706 707 708 709 710
rwlock:sid:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
    EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock"
  <<: *debian_sid_amd64_image
  <<: *build_job

system:rwlock:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *system_test_job
  dependencies:
    - rwlock:sid:amd64
711
  needs: ["rwlock:sid:amd64"]
712 713 714 715 716 717

unit:rwlock:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  dependencies:
    - rwlock:sid:amd64
718
  needs: ["rwlock:sid:amd64"]
719

720 721 722 723 724 725 726 727 728
# Jobs for mutex-based atomics on Debian SID (amd64)
mutexatomics:sid:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
    EXTRA_CONFIGURE: "--with-libidn2 --enable-mutex-atomics"
  <<: *debian_sid_amd64_image
  <<: *build_job

729 730 731 732 733
#system:mutexatomics:sid:amd64:
#  <<: *debian_sid_amd64_image
#  <<: *system_test_job
#  dependencies:
#    - mutexatomics:sid:amd64
734
#    - mutexatomics:sid:amd64
735 736 737 738 739 740 741 742
#  allow_failure: true

#unit:mutexatomics:sid:amd64:
#  <<: *debian_sid_amd64_image
#  <<: *unit_test_job
#  dependencies:
#    - mutexatomics:sid:amd64
#  allow_failure: true
743

Michał Kępień's avatar
Michał Kępień committed
744 745
# Jobs for Clang builds on Debian Stretch (amd64)

Michał Kępień's avatar
Michał Kępień committed
746 747 748 749 750 751 752 753 754 755 756
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
Ondřej Surý's avatar
Ondřej Surý committed
757
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
758
    - clang:stretch:amd64
759
  needs: ["clang:stretch:amd64"]
Michał Kępień's avatar
Michał Kępień committed
760

Michał Kępień's avatar
Michał Kępień committed
761 762
# Jobs for Clang builds on Debian Stretch (i386)

Michał Kępień's avatar
Michał Kępień committed
763 764 765 766 767 768 769
clang:stretch:i386:
  variables:
    CC: clang
    CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
    EXTRA_CONFIGURE: "--with-python=python2"
  <<: *debian_stretch_i386_image
  <<: *build_job
Ondřej Surý's avatar
Ondřej Surý committed
770

Michał Kępień's avatar
Michał Kępień committed
771 772
# Jobs for PKCS#11-enabled GCC builds on Debian Sid (amd64)

773
pkcs11:sid:amd64:
774 775 776 777 778 779 780
  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

Michał Kępień's avatar
Michał Kępień committed
781
system:pkcs11:sid:amd64:
782
  <<: *debian_sid_amd64_image
Michał Kępień's avatar
Michał Kępień committed
783
  <<: *system_test_job
784
  dependencies:
785
    - pkcs11:sid:amd64
786
  needs: ["pkcs11:sid:amd64"]
787

Michał Kępień's avatar
Michał Kępień committed
788
unit:pkcs11:sid:amd64:
789
  <<: *debian_sid_amd64_image
Michał Kępień's avatar
Michał Kępień committed
790
  <<: *unit_test_job
791
  dependencies:
792
    - pkcs11:sid:amd64
793
  needs: ["pkcs11:sid:amd64"]
Ondřej Surý's avatar
Ondřej Surý committed
794

Michał Kępień's avatar
Michał Kępień committed
795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839
# Jobs for Clang builds on FreeBSD 11.3 (amd64)

clang:freebsd11.3:amd64:
  variables:
    CFLAGS: "-Wall -Wextra -O2 -g"
  <<: *freebsd_amd64
  <<: *build_job

system:clang:freebsd11.3:amd64:
  <<: *freebsd_amd64
  <<: *system_test_job
  dependencies:
    - clang:freebsd11.3:amd64
  needs: ["clang:freebsd11.3:amd64"]

unit:clang:freebsd11.3:amd64:
  <<: *freebsd_amd64
  <<: *unit_test_job
  dependencies:
    - clang:freebsd11.3:amd64
  needs: ["clang:freebsd11.3:amd64"]

# Jobs for Clang builds on FreeBSD 12.0 (amd64)

clang:freebsd12.0:amd64:
  variables:
    CFLAGS: "-Wall -Wextra -O2 -g"
    EXTRA_CONFIGURE: "--enable-dnstap"
  <<: *freebsd_amd64
  <<: *build_job

system:clang:freebsd12.0:amd64:
  <<: *freebsd_amd64
  <<: *system_test_job
  dependencies:
    - clang:freebsd12.0:amd64
  needs: ["clang:freebsd12.0:amd64"]

unit:clang:freebsd12.0:amd64:
  <<: *freebsd_amd64
  <<: *unit_test_job
  dependencies:
    - clang:freebsd12.0:amd64
  needs: ["clang:freebsd12.0:amd64"]

Michał Kępień's avatar
Michał Kępień committed
840 841 842 843 844 845 846 847 848 849 850 851 852 853
# Jobs for Clang builds on OpenBSD 6.5 (amd64)

clang:openbsd6.5:amd64:
  variables:
    CC: clang
  <<: *openbsd_amd64
  <<: *build_job

system:clang:openbsd6.5:amd64:
  <<: *openbsd_amd64
  <<: *system_test_job
  dependencies:
    - clang:openbsd6.5:amd64
  needs: ["clang:openbsd6.5:amd64"]
854 855 856
  only:
    - tags
    - web
Michał Kępień's avatar
Michał Kępień committed
857

Ondřej Surý's avatar
Ondřej Surý committed
858 859 860 861 862 863 864 865 866 867 868 869 870 871 872
# Jobs with libtool disabled

nolibtool:sid:amd64:
  variables:
    CC: gcc
    CFLAGS: "-Wall -Wextra -Og -g"
    EXTRA_CONFIGURE: "--with-libidn2 --without-libtool --with-dlopen"
  <<: *debian_sid_amd64_image
  <<: *build_job

system:nolibtool:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *system_test_job
  dependencies:
    - nolibtool:sid:amd64
873
  needs: ["nolibtool:sid:amd64"]
Ondřej Surý's avatar
Ondřej Surý committed
874 875 876 877 878 879

unit:nolibtool:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  dependencies:
    - nolibtool:sid:amd64
880
  needs: ["nolibtool:sid:amd64"]
Michał Kępień's avatar
Michał Kępień committed
881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908

# Jobs for Visual Studio 2017 builds on Windows (amd64)

msvc:windows:amd64:
  <<: *default_triggering_rules
  stage: build
  tags:
    - windows
    - amd64
  variables:
    VSCONF: Release
  script:
    - 'Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"'
    - '& cmd.exe /C "vcvarsall.bat x64 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
    - 'Pop-Location'
    - 'Set-Location win32utils'
    - '& "C:/Strawberry/perl/bin/perl.exe" Configure
         "with-tools-version=15.0"
         "with-platform-toolset=v141"
         "with-platform-version=10.0.17763.0"
         "with-vcredist=C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Redist/MSVC/14.16.27012/vcredist_x64.exe"
         "with-openssl=C:/OpenSSL"
         "with-libxml2=C:/libxml2"
         "without-python"
         "with-system-tests"
         x64'
    - 'Set-Item -path "Env:CL" -value "/MP$([Math]::Truncate($BUILD_PARALLEL_JOBS/2))"'
    - '& msbuild.exe /maxCpuCount:2 /t:Build /p:Configuration=$VSCONF bind9.sln'
909 910 911
  dependencies: []
  needs:
    - autoreconf:sid:amd64
Michał Kępień's avatar
Michał Kępień committed
912 913
  artifacts:
    untracked: true
914
    expire_in: "1 week"
Michał Kępień's avatar
Michał Kępień committed
915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942

system:msvc:windows:amd64:
  stage: system
  tags:
    - windows
    - amd64
  variables:
    VSCONF: Release
  script:
    - 'Push-Location bin/tests/system'
    - '$ifIndex = Get-NetIPInterface -AddressFamily IPv4 -InterfaceMetric 75 | Select-Object -ExpandProperty ifIndex'
    - '& C:/tools/cygwin/bin/sed.exe -i "s/^exit.*/netsh interface ipv4 set dnsservers $ifIndex dhcp/; s/\(name\|interface\)=Loopback/$ifIndex/;" ifconfig.bat'
    - '& C:/tools/cygwin/bin/sed.exe -i "s/kill -f/kill -W/;" conf.sh stop.pl'
    - '& cmd.exe /C ifconfig.bat up; ""'
    - 'Start-Sleep 2'
    - '$Env:Path = "C:/tools/cygwin/bin;$Env:Path"'
    - '& sh.exe runall.sh $TEST_PARALLEL_JOBS'
    - 'If (Test-Path C:/CrashDumps/*) { dir C:/CrashDumps; Throw }'
  dependencies:
    - msvc:windows:amd64
  needs: ["msvc:windows:amd64"]
  artifacts:
    untracked: true
    expire_in: "1 week"
    when: on_failure
  only:
    - tags
    - web