.gitlab-ci.yml 29.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
21 22
  SYMBOLIZER: /usr/lib/llvm-9/bin/llvm-symbolizer
  ASAN_SYMBOLIZER_PATH: "$SYMBOLIZER"
Ondřej Surý's avatar
Ondřej Surý committed
23

Ondřej Surý's avatar
Ondřej Surý committed
24 25
  CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra 

26 27 28
  # Pass run-time flags to AddressSanitizer to get core dumps on error.
  ASAN_OPTIONS_COMMON: abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1

29 30 31
  TARBALL_COMPRESSOR: xz
  TARBALL_EXTENSION: xz

32
stages:
33
  - precheck
34
  - build
35
  - unit
Ondřej Surý's avatar
Ondřej Surý committed
36
  - system
37
  - docs
38
  - push
Ondřej Surý's avatar
Ondřej Surý committed
39
  - postcheck
40
  - release
41

Michał Kępień's avatar
Michał Kępień committed
42 43
### Runner Tag Templates

Michał Kępień's avatar
Michał Kępień committed
44
# Note: BSD runners extract the operating system version to use from job name
Michał Kępień's avatar
Michał Kępień committed
45 46 47 48 49 50

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

51
.linux-amd64: &linux_amd64
Michał Kępień's avatar
Michał Kępień committed
52 53 54 55
  tags:
    - linux
    - amd64

56
.linux-i386: &linux_i386
Michał Kępień's avatar
Michał Kępień committed
57 58
  tags:
    - linux
59 60
    - i386

Michał Kępień's avatar
Michał Kępień committed
61 62 63 64 65
.openbsd-amd64: &openbsd_amd64
  tags:
    - openbsd
    - amd64

Michał Kępień's avatar
Michał Kępień committed
66 67
### Docker Image Templates

68 69
# Alpine Linux

70 71
.alpine-3.11-amd64: &alpine_3_11_amd64_image
  image: "$CI_REGISTRY_IMAGE:alpine-3.11-amd64"
72 73
  <<: *linux_amd64

Michał Kępień's avatar
Michał Kępień committed
74 75
# CentOS

76 77 78 79 80 81 82
.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
83

Michał Kępień's avatar
Michał Kępień committed
84 85 86 87
.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
88 89
# Debian

90 91
.debian-jessie-amd64: &debian_jessie_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
92
  <<: *linux_amd64
93

94 95
.debian-stretch-amd64: &debian_stretch_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
96
  <<: *linux_amd64
97

98
.debian-stretch-i386: &debian_stretch_i386_image
99
  image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
100
  <<: *linux_i386
101

Michał Kępień's avatar
Michał Kępień committed
102 103
.debian-buster-amd64: &debian_buster_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
104
  <<: *linux_amd64
Michał Kępień's avatar
Michał Kępień committed
105

106 107
.debian-sid-amd64: &debian_sid_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
108
  <<: *linux_amd64
109

110 111
.debian-sid-i386: &debian_sid_i386_image
  image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
112
  <<: *linux_i386
113

114 115 116 117 118 119
# openSUSE Tumbleweed

.tumbleweed-latest-amd64: &tumbleweed_latest_amd64_image
  image: "$CI_REGISTRY_IMAGE:tumbleweed-latest-amd64"
  <<: *linux_amd64

Michał Kępień's avatar
Michał Kępień committed
120 121
# Fedora

Michal Nowak's avatar
Michal Nowak committed
122 123
.fedora-31-amd64: &fedora_31_amd64_image
  image: "$CI_REGISTRY_IMAGE:fedora-31-amd64"
Michał Kępień's avatar
Michał Kępień committed
124 125
  <<: *linux_amd64

Michał Kępień's avatar
Michał Kępień committed
126 127
# Ubuntu

128 129
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
130
  <<: *linux_amd64
Ondřej Surý's avatar
Ondřej Surý committed
131

132 133
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
134
  <<: *linux_i386
Ondřej Surý's avatar
Ondřej Surý committed
135

136 137
.ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64"
138
  <<: *linux_amd64
139

140 141
.ubuntu-bionic-i386: &ubuntu_bionic_i386_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-i386"
142
  <<: *linux_i386
143

Michał Kępień's avatar
Michał Kępień committed
144 145
### Job Templates

146 147 148 149 150
.default-triggering-rules: &default_triggering_rules
  only:
    - merge_requests
    - tags
    - web
151
    - schedules
152

153 154 155 156 157
.release-branch-triggering-rules: &release_branch_triggering_rules
  only:
    - merge_requests
    - tags
    - web
158
    - schedules
159 160 161
    - master@isc-projects/bind9
    - /^v9_[1-9][0-9]$/@isc-projects/bind9

162
.precheck: &precheck_job
163
  <<: *default_triggering_rules
164 165 166
  <<: *debian_sid_amd64_image
  stage: precheck

167
.autoconf: &autoconf_job
168
  <<: *release_branch_triggering_rules
169 170 171 172 173
  <<: *debian_sid_amd64_image
  stage: precheck
  script:
    - autoreconf -fi
  artifacts:
174 175 176 177 178
    paths:
      - aclocal.m4
      - configure
      - ltmain.sh
      - m4/libtool.m4
179
    expire_in: "1 week"
180

181
.configure: &configure |
182
    ${CONFIGURE} \
183 184 185 186 187 188 189 190 191 192 193
    --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
194

195
.build: &build_job
196
  <<: *default_triggering_rules
197
  stage: build
198
  before_script:
199
    - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
200
    - test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}"
201
  script:
202
    - *configure
Ondřej Surý's avatar
Ondřej Surý committed
203
    - ${MAKE} -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
204
    - test -z "${RUN_MAKE_INSTALL}" || make install
205 206
  dependencies:
    - autoreconf:sid:amd64
207 208
  needs:
    - autoreconf:sid:amd64
209 210
  artifacts:
    untracked: true
211
    expire_in: "1 week"
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
.windows_build: &windows_build_job
  stage: build
  tags:
    - windows
    - amd64
  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"
         "with-libuv=C:/libuv"
         "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'
  dependencies: []
  needs:
    - autoreconf:sid:amd64
  artifacts:
    untracked: true
    expire_in: "1 week"

243 244
.setup_interfaces: &setup_interfaces |
    if [ "$(id -u)" -eq "0" ]; then
245
      sh -x bin/tests/system/ifconfig.sh up;
246
    else
247
      sudo sh -x bin/tests/system/ifconfig.sh up;
248 249 250
    fi

.setup_softhsm: &setup_softhsm |
251
    sh -x bin/tests/prepare-softhsm2.sh
252

253
.system_test: &system_test_job
254
  <<: *default_triggering_rules
255
  stage: system
256
  before_script:
257 258
    - *setup_interfaces
    - *setup_softhsm
259
  script:
260
    - ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
261
    - test -s bin/tests/system/systests.output
262 263
  artifacts:
    untracked: true
264
    expire_in: "1 week"
265 266
    when: on_failure

267
.kyua_report: &kyua_report_html |
268
  kyua --logfile /dev/null report-html \
269 270 271 272 273
       --force \
       --results-file "$KYUA_RESULT" \
       --results-filter "" \
       --output kyua_html

274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
.windows_system_test: &windows_system_test_job
  stage: system
  tags:
    - windows
    - amd64
  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 }'
  artifacts:
    untracked: true
    expire_in: "1 week"
    when: on_failure
  only:
    - schedules
    - tags
    - web

298
.unit_test: &unit_test_job
299
  <<: *default_triggering_rules
300
  stage: unit
301
  before_script:
302
    - *setup_softhsm
303
  script:
304
    - make unit
305
  after_script:
306
    - *kyua_report_html
307
  artifacts:
308
    paths:
309 310 311 312
      - kyua.log
      - kyua.results
      - kyua_html/
    expire_in: "1 week"
313
    when: on_failure
314

Ondřej Surý's avatar
Ondřej Surý committed
315 316 317 318 319 320 321 322 323 324 325
.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 \
326 327 328
           --relative-paths="$CI_PROJECT_DIR" \
           --inline-suppr \
           --suppressions-list=util/suppressions.txt
Ondřej Surý's avatar
Ondřej Surý committed
329 330 331 332 333 334 335 336 337

.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
338 339 340
  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
341 342 343 344 345 346 347 348 349 350 351 352
  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
353 354 355 356
### Job Definitions

# Jobs in the precheck stage

357 358 359
autoreconf:sid:amd64:
  <<: *autoconf_job

360
misc:sid:amd64:
361
  <<: *precheck_job
362
  script:
363
    - sh util/check-ans-prereq.sh
364
    - sh util/checklibs.sh > checklibs.out
Mark Andrews's avatar
Mark Andrews committed
365 366 367
    - sh util/tabify-changes < CHANGES > CHANGES.tmp
    - diff -urNap CHANGES CHANGES.tmp
    - rm CHANGES.tmp
368
    - perl util/check-changes CHANGES
369 370 371
    - perl -w util/merge_copyrights
    - diff -urNap util/copyrights util/newcopyrights
    - rm util/newcopyrights
372 373
    - 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
374 375
    - xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
    - xmllint --noout --nonet --html `git ls-files '*.html'`
376
    - sh util/check-win32util-configure
377 378
  artifacts:
    paths:
379 380 381
      - util/newcopyrights
      - checklibs.out
    expire_in: "1 week"
382 383
    when: on_failure

384
🐞:sid:amd64:
385
  <<: *precheck_job
386
  <<: *debian_buster_amd64_image
387 388 389
  script:
    - util/check-cocci
    - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
390

391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407
tarball-create:sid:amd64:
  <<: *debian_sid_amd64_image
  stage: precheck
  script:
    - source version
    - export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
    - git archive --prefix="${BIND_DIRECTORY}/" --output="${BIND_DIRECTORY}.tar" HEAD
    - mkdir "${BIND_DIRECTORY}"
    - echo "SRCID=$(git rev-list --max-count=1 HEAD | cut -b1-7)" > "${BIND_DIRECTORY}/srcid"
    - tar --append --file="${BIND_DIRECTORY}.tar" "${BIND_DIRECTORY}/srcid"
    - ${TARBALL_COMPRESSOR} "${BIND_DIRECTORY}.tar"
  artifacts:
    paths:
      - bind-*.tar.${TARBALL_EXTENSION}
  only:
    - tags

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

410
docs:sid:amd64:
411
  <<: *release_branch_triggering_rules
412
  <<: *debian_sid_amd64_image
413
  stage: docs
414
  script:
415
    - ./configure || cat config.log
416 417
    - make -C doc/misc docbook
    - make -C doc/arm Bv9ARM.html
418 419
  dependencies:
    - autoreconf:sid:amd64
420 421
  needs:
    - autoreconf:sid:amd64
422 423
  artifacts:
    paths:
424 425
      - doc/arm/
    expire_in: "1 month"
426

427
push:docs:sid:amd64:
428 429 430 431 432 433
  <<: *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:
434 435
    - master@isc-projects/bind9
    - /^v9_[1-9][0-9]$/@isc-projects/bind9
436

437
# Jobs for regular GCC builds on Alpine Linux 3.11 (amd64)
438

439
gcc:alpine3.11:amd64:
440 441
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
442
    CFLAGS: "${CFLAGS_COMMON}"
443
    EXTRA_CONFIGURE: "--enable-dnstap"
444
  <<: *alpine_3_11_amd64_image
445 446
  <<: *build_job

447 448
system:gcc:alpine3.11:amd64:
  <<: *alpine_3_11_amd64_image
449 450
  <<: *system_test_job
  dependencies:
451 452
    - gcc:alpine3.11:amd64
  needs: ["gcc:alpine3.11:amd64"]
453

454 455
unit:gcc:alpine3.11:amd64:
  <<: *alpine_3_11_amd64_image
456 457
  <<: *unit_test_job
  dependencies:
458 459
    - gcc:alpine3.11:amd64
  needs: ["gcc:alpine3.11:amd64"]
460

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

463
gcc:centos6:amd64:
Michał Kępień's avatar
Michał Kępień committed
464 465
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
466
    CFLAGS: "${CFLAGS_COMMON}"
Ondřej Surý's avatar
Ondřej Surý committed
467
    EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
Michał Kępień's avatar
Michał Kępień committed
468 469 470
  <<: *centos_centos6_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
471 472 473 474 475
system:gcc:centos6:amd64:
  <<: *centos_centos6_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:centos6:amd64
476
  needs: ["gcc:centos6:amd64"]
Michał Kępień's avatar
Michał Kępień committed
477 478 479 480 481 482

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

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

487
gcc:centos7:amd64:
Michał Kępień's avatar
Michał Kępień committed
488 489
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
490
    CFLAGS: "${CFLAGS_COMMON}"
Michał Kępień's avatar
Michał Kępień committed
491
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
Michał Kępień's avatar
Michał Kępień committed
492 493 494
  <<: *centos_centos7_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
495 496 497 498 499
system:gcc:centos7:amd64:
  <<: *centos_centos7_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:centos7:amd64
500
  needs: ["gcc:centos7:amd64"]
Michał Kępień's avatar
Michał Kępień committed
501 502 503 504 505 506

unit:gcc:centos7:amd64:
  <<: *centos_centos7_amd64_image
  <<: *unit_test_job
  dependencies:
    - gcc:centos7:amd64
507
  needs: ["gcc:centos7:amd64"]
508

Michał Kępień's avatar
Michał Kępień committed
509 510 511 512 513
# Jobs for regular GCC builds on CentOS 8 (amd64)

gcc:centos8:amd64:
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
514
    CFLAGS: "${CFLAGS_COMMON}"
Michał Kępień's avatar
Michał Kępień committed
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532
    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
533 534
# Jobs for regular GCC builds on Debian 8 Jessie (amd64)

535
gcc:jessie:amd64:
536 537
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
538
    CFLAGS: "${CFLAGS_COMMON} -O2"
539
    EXTRA_CONFIGURE: "--without-cmocka --with-python --disable-geoip"
540 541 542
  <<: *debian_jessie_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
543 544 545 546 547
system:gcc:jessie:amd64:
  <<: *debian_jessie_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:jessie:amd64
548
  needs: ["gcc:jessie:amd64"]
Michał Kępień's avatar
Michał Kępień committed
549 550 551 552 553 554

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

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

559
gcc:stretch:amd64:
560 561
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
562
    CFLAGS: "${CFLAGS_COMMON} -O2"
563 564 565
  <<: *debian_stretch_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
566 567 568 569 570
system:gcc:stretch:amd64:
  <<: *debian_stretch_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:stretch:amd64
571
  needs: ["gcc:stretch:amd64"]
Michał Kępień's avatar
Michał Kępień committed
572 573 574 575 576 577

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

Michał Kępień's avatar
Michał Kępień committed
580 581 582 583 584
# Jobs for regular GCC builds on Debian 10 Buster (amd64)

gcc:buster:amd64:
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
585
    CFLAGS: "${CFLAGS_COMMON}"
Michał Kępień's avatar
Michał Kępień committed
586 587 588 589 590 591 592 593
  <<: *debian_buster_amd64_image
  <<: *build_job

system:gcc:buster:amd64:
  <<: *debian_buster_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:buster:amd64
594
  needs: ["gcc:buster:amd64"]
Michał Kępień's avatar
Michał Kępień committed
595 596 597 598 599 600

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

603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618
# 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
Ondřej Surý's avatar
Ondřej Surý committed
619
    CFLAGS: "${CFLAGS_COMMON}"
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634
    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
635 636
# Jobs for regular GCC builds on Debian Sid (amd64)

637
gcc:sid:amd64:
638 639
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
640
    CFLAGS: "${CFLAGS_COMMON} -O3"
Michał Kępień's avatar
Michał Kępień committed
641
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
642
    RUN_MAKE_INSTALL: 1
Ondřej Surý's avatar
Ondřej Surý committed
643
    MAKE: bear make
644
  <<: *debian_sid_amd64_image
645
  <<: *build_job
646

Michał Kępień's avatar
Michał Kępień committed
647 648 649
system:gcc:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *system_test_job
650
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
651
    - gcc:sid:amd64
652
  needs: ["gcc:sid:amd64"]
653

654
unit:gcc:sid:amd64:
655 656 657
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  dependencies:
658
    - gcc:sid:amd64
659
  needs: ["gcc:sid:amd64"]
660

Ondřej Surý's avatar
Ondřej Surý committed
661 662 663 664 665 666 667
cppcheck:gcc:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *cppcheck_job
  dependencies:
    - gcc:sid:amd64
  needs: ["gcc:sid:amd64"]

668 669 670 671 672 673 674 675 676 677 678 679 680
# Job for out-of-tree GCC build on Debian Sid (amd64)

oot:sid:amd64:
  variables:
    CC: gcc
    CFLAGS: "${CFLAGS_COMMON} -O3"
    CONFIGURE: ../configure
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
    RUN_MAKE_INSTALL: 1
    OOT_BUILD_WORKSPACE: workspace
  <<: *debian_sid_amd64_image
  <<: *build_job

681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722
# Jobs for tarball GCC builds on Debian Sid (amd64)

tarball:sid:amd64:
  variables:
    CC: gcc
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
    RUN_MAKE_INSTALL: 1
  <<: *debian_sid_amd64_image
  <<: *build_job
  before_script:
    - tar --extract --file bind-*.tar.${TARBALL_EXTENSION}
    - rm -f bind-*.tar.${TARBALL_EXTENSION}
    - cd bind-*
  dependencies:
    - tarball-create:sid:amd64
  needs: ["tarball-create:sid:amd64"]
  only:
    - tags

system:tarball:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *system_test_job
  before_script:
    - cd bind-*
    - *setup_interfaces
  dependencies:
    - tarball:sid:amd64
  needs: ["tarball:sid:amd64"]
  only:
    - tags

unit:tarball:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  before_script:
    - cd bind-*
  dependencies:
    - tarball:sid:amd64
  needs: ["tarball:sid:amd64"]
  only:
    - tags

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

Michał Kępień's avatar
Michał Kępień committed
725 726 727
gcc:sid:i386:
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
728
    CFLAGS: "${CFLAGS_COMMON}"
Michał Kępień's avatar
Michał Kępień committed
729
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --without-python"
Michał Kępień's avatar
Michał Kępień committed
730 731
  <<: *debian_sid_i386_image
  <<: *build_job
732

Michał Kępień's avatar
Michał Kępień committed
733 734 735
system:gcc:sid:i386:
  <<: *debian_sid_i386_image
  <<: *system_test_job
736
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
737
    - gcc:sid:i386
738
  needs: ["gcc:sid:i386"]
739

740
unit:gcc:sid:i386:
741 742 743
  <<: *debian_sid_i386_image
  <<: *unit_test_job
  dependencies:
744
    - gcc:sid:i386
745
  needs: ["gcc:sid:i386"]
746

747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770
# Jobs for regular GCC builds on openSUSE Tumbleweed (amd64)

gcc:tumbleweed:amd64:
  variables:
    CC: gcc
    CFLAGS: "${CFLAGS_COMMON}"
    EXTRA_CONFIGURE: "--with-libidn2"
  <<: *tumbleweed_latest_amd64_image
  <<: *build_job

system:gcc:tumbleweed:amd64:
  <<: *tumbleweed_latest_amd64_image
  <<: *system_test_job
  dependencies:
    - gcc:tumbleweed:amd64
  needs: ["gcc:tumbleweed:amd64"]

unit:gcc:tumbleweed:amd64:
  <<: *tumbleweed_latest_amd64_image
  <<: *unit_test_job
  dependencies:
    - gcc:tumbleweed:amd64
  needs: ["gcc:tumbleweed:amd64"]

Michal Nowak's avatar
Michal Nowak committed
771
# Jobs for regular GCC builds on Fedora 31 (amd64)
Michał Kępień's avatar
Michał Kępień committed
772

Michal Nowak's avatar
Michal Nowak committed
773
gcc:fedora31:amd64:
Michał Kępień's avatar
Michał Kępień committed
774 775
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
776
    CFLAGS: "${CFLAGS_COMMON} -O1"
Michał Kępień's avatar
Michał Kępień committed
777
    EXTRA_CONFIGURE: "--with-libidn2"
Michal Nowak's avatar
Michal Nowak committed
778
  <<: *fedora_31_amd64_image
Michał Kępień's avatar
Michał Kępień committed
779 780
  <<: *build_job

Michal Nowak's avatar
Michal Nowak committed
781 782
system:gcc:fedora31:amd64:
  <<: *fedora_31_amd64_image
Michał Kępień's avatar
Michał Kępień committed
783 784
  <<: *system_test_job
  dependencies:
Michal Nowak's avatar
Michal Nowak committed
785 786
    - gcc:fedora31:amd64
  needs: ["gcc:fedora31:amd64"]
Michał Kępień's avatar
Michał Kępień committed
787

Michal Nowak's avatar
Michal Nowak committed
788 789
unit:gcc:fedora31:amd64:
  <<: *fedora_31_amd64_image
Michał Kępień's avatar
Michał Kępień committed
790 791
  <<: *unit_test_job
  dependencies:
Michal Nowak's avatar
Michal Nowak committed
792 793
    - gcc:fedora31:amd64
  needs: ["gcc:fedora31:amd64"]
Michał Kępień's avatar
Michał Kępień committed
794

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

Michał Kępień's avatar
Michał Kępień committed
797 798 799
gcc:xenial:amd64:
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
800
    CFLAGS: "${CFLAGS_COMMON} -O2"
801
    EXTRA_CONFIGURE: "--disable-geoip"
Michał Kępień's avatar
Michał Kępień committed
802 803 804 805 806
  <<: *ubuntu_xenial_amd64_image
  <<: *build_job

system:gcc:xenial:amd64:
  <<: *ubuntu_xenial_amd64_image
Michał Kępień's avatar
Michał Kępień committed
807 808
  <<: *system_test_job
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
809
    - gcc:xenial:amd64
810
  needs: ["gcc:xenial:amd64"]
Michał Kępień's avatar
Michał Kępień committed
811

Michał Kępień's avatar
Michał Kępień committed
812 813 814
unit:gcc:xenial:amd64:
  <<: *ubuntu_xenial_amd64_image
  <<: *unit_test_job
Michał Kępień's avatar
Michał Kępień committed
815
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
816
    - gcc:xenial:amd64
817
  needs: ["gcc:xenial:amd64"]
Michał Kępień's avatar
Michał Kępień committed
818

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

Michał Kępień's avatar
Michał Kępień committed
821 822 823
gcc:bionic:amd64:
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
824
    CFLAGS: "${CFLAGS_COMMON} -Og"
Michał Kępień's avatar
Michał Kępień committed
825 826 827 828 829 830
    EXTRA_CONFIGURE: "--with-libidn2"
  <<: *ubuntu_bionic_amd64_image
  <<: *build_job

system:gcc:bionic:amd64:
  <<: *ubuntu_bionic_amd64_image
831 832
  <<: *system_test_job
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
833
    - gcc:bionic:amd64
834
  needs: ["gcc:bionic:amd64"]
835

Michał Kępień's avatar
Michał Kępień committed
836 837 838
unit:gcc:bionic:amd64:
  <<: *ubuntu_bionic_amd64_image
  <<: *unit_test_job
839
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
840
    - gcc:bionic:amd64
841
  needs: ["gcc:bionic:amd64"]
842

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

Michał Kępień's avatar
Michał Kępień committed
845 846 847
asan:sid:amd64:
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
848
    CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
Michał Kępień's avatar
Michał Kępień committed
849 850
    LDFLAGS: "-fsanitize=address,undefined"
    EXTRA_CONFIGURE: "--with-libidn2"
851
  <<: *debian_sid_amd64_image
Michał Kępień's avatar
Michał Kępień committed
852
  <<: *build_job
853

854
system:asan:sid:amd64:
855 856
  variables:
    ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
857 858 859
  <<: *debian_sid_amd64_image
  <<: *system_test_job
  dependencies:
860
    - asan:sid:amd64
861
  needs: ["asan:sid:amd64"]
862

Michał Kępień's avatar
Michał Kępień committed
863
unit:asan:sid:amd64:
864 865
  variables:
    ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
Michał Kępień's avatar
Michał Kępień committed
866 867
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
868
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
869
    - asan:sid:amd64
870
  needs: ["asan:sid:amd64"]
871

872 873 874 875 876 877 878 879 880 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 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
# Jobs for GCC builds with TSAN enabled on Debian Sid (amd64)

tsan:buster:amd64:
  <<: *debian_buster_amd64_image
  <<: *build_job
  variables:
    CC: clang-9
    CFLAGS: "${CFLAGS_COMMON} -fsanitize=thread -DISC_MEM_USE_INTERNAL_MALLOC=0"
    LDFLAGS: "-fsanitize=thread"
    EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock"

system:tsan:buster:amd64:
  variables:
    TSAN_OPTIONS: "second_deadlock_stack=1 history_size=7 log_exe_name=true log_path=tsan external_symbolizer_path=$SYMBOLIZER exitcode=0"
  before_script:
    - *setup_interfaces
    - echo $TSAN_OPTIONS
  <<: *debian_buster_amd64_image
  <<: *system_test_job
  dependencies:
    - tsan:buster:amd64
  needs: ["tsan:buster:amd64"]
  allow_failure: true
  after_script:
    - find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
  artifacts:
    expire_in: "1 week"
    paths:
      - bin/tests/system/*/tsan.*
      - bin/tests/system/*/*/tsan.*
      - tsan/
    when: on_failure

unit:tsan:buster:amd64:
  variables:
    TSAN_OPTIONS: "second_deadlock_stack=1 history_size=7 log_exe_name=true log_path=tsan external_symbolizer_path=$SYMBOLIZER"
  before_script:
    - echo $TSAN_OPTIONS
    - lib/isc/tests/result_test
  <<: *debian_buster_amd64_image
  <<: *unit_test_job
  dependencies:
    - tsan:buster:amd64
  needs: ["tsan:buster:amd64"]
  allow_failure: true
  after_script:
    - find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
  artifacts:
    expire_in: "1 week"
    paths:
      - lib/*/tests/tsan.*
      - tsan/
      - kyua.log
      - kyua.results
      - kyua_html/
    when: on_failure

929 930 931
rwlock:sid:amd64:
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
932
    CFLAGS: "${CFLAGS_COMMON} -Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
933 934 935 936 937 938 939 940 941
    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
942
  needs: ["rwlock:sid:amd64"]
943 944 945 946 947 948

unit:rwlock:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  dependencies:
    - rwlock:sid:amd64
949
  needs: ["rwlock:sid:amd64"]
950

951 952 953 954
# Jobs for mutex-based atomics on Debian SID (amd64)
mutexatomics:sid:amd64:
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
955
    CFLAGS: "${CFLAGS_COMMON} -DISC_MEM_USE_INTERNAL_MALLOC=0"
956 957 958 959
    EXTRA_CONFIGURE: "--with-libidn2 --enable-mutex-atomics"
  <<: *debian_sid_amd64_image
  <<: *build_job

960 961 962 963 964
#system:mutexatomics:sid:amd64:
#  <<: *debian_sid_amd64_image
#  <<: *system_test_job
#  dependencies:
#    - mutexatomics:sid:amd64
965
#    - mutexatomics:sid:amd64
966 967 968 969 970 971 972 973
#  allow_failure: true

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

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

Michał Kępień's avatar
Michał Kępień committed
977 978 979
clang:stretch:amd64:
  variables:
    CC: clang
Ondřej Surý's avatar
Ondřej Surý committed
980
    CFLAGS: "${CFLAGS_COMMON} -Wenum-conversion"
Michał Kępień's avatar
Michał Kępień committed
981 982 983 984 985 986 987
    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
988
  dependencies:
Michał Kępień's avatar
Michał Kępień committed
989
    - clang:stretch:amd64
990
  needs: ["clang:stretch:amd64"]
Michał Kępień's avatar
Michał Kępień committed
991

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

Michał Kępień's avatar
Michał Kępień committed
994 995 996
clang:stretch:i386:
  variables:
    CC: clang
Ondřej Surý's avatar
Ondřej Surý committed
997
    CFLAGS: "${CFLAGS_COMMON} -Wenum-conversion"
Michał Kępień's avatar
Michał Kępień committed
998 999 1000
    EXTRA_CONFIGURE: "--with-python=python2"
  <<: *debian_stretch_i386_image
  <<: *build_job
Ondřej Surý's avatar
Ondřej Surý committed
1001

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

1004
pkcs11:sid:amd64:
1005 1006
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
1007
    CFLAGS: "${CFLAGS_COMMON}"
1008 1009 1010 1011
    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
1012
system:pkcs11:sid:amd64:
1013
  <<: *debian_sid_amd64_image
Michał Kępień's avatar
Michał Kępień committed
1014
  <<: *system_test_job
1015
  dependencies:
1016
    - pkcs11:sid:amd64
1017
  needs: ["pkcs11:sid:amd64"]
1018

Michał Kępień's avatar
Michał Kępień committed
1019
unit:pkcs11:sid:amd64:
1020
  <<: *debian_sid_amd64_image
Michał Kępień's avatar
Michał Kępień committed
1021
  <<: *unit_test_job
1022
  dependencies:
1023
    - pkcs11:sid:amd64
1024
  needs: ["pkcs11:sid:amd64"]
Ondřej Surý's avatar
Ondřej Surý committed
1025

Michał Kępień's avatar
Michał Kępień committed
1026 1027 1028 1029
# Jobs for Clang builds on FreeBSD 11.3 (amd64)

clang:freebsd11.3:amd64:
  variables:
Ondřej Surý's avatar
Ondřej Surý committed
1030
    CFLAGS: "${CFLAGS_COMMON}"
Michał Kępień's avatar
Michał Kępień committed
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051
  <<: *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:
Ondřej Surý's avatar
Ondřej Surý committed
1052
    CFLAGS: "${CFLAGS_COMMON}"
Michał Kępień's avatar
Michał Kępień committed
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070
    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
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084
# 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"]
1085
  only:
1086
    - schedules
1087 1088
    - tags
    - web
Michał Kępień's avatar
Michał Kępień committed
1089

Ondřej Surý's avatar
Ondřej Surý committed
1090 1091 1092 1093 1094
# Jobs with libtool disabled

nolibtool:sid:amd64:
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
1095
    CFLAGS: "${CFLAGS_COMMON}"
Ondřej Surý's avatar
Ondřej Surý committed
1096 1097 1098 1099 1100 1101 1102 1103 1104
    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
1105
  needs: ["nolibtool:sid:amd64"]
Ondřej Surý's avatar
Ondřej Surý committed
1106 1107 1108 1109 1110 1111

unit:nolibtool:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
  dependencies:
    - nolibtool:sid:amd64
1112
  needs: ["nolibtool:sid:amd64"]
Michał Kępień's avatar
Michał Kępień committed
1113 1114 1115 1116

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

msvc:windows:amd64:
1117
  <<: *windows_build_job
Michał Kępień's avatar
Michał Kępień committed
1118 1119 1120 1121 1122
  <<: *default_triggering_rules
  variables:
    VSCONF: Release

system:msvc:windows:amd64:
1123
  <<: *windows_system_test_job
Michał Kępień's avatar
Michał Kępień committed
1124 1125 1126 1127 1128
  variables:
    VSCONF: Release
  dependencies:
    - msvc:windows:amd64
  needs: ["msvc:windows:amd64"]
1129 1130 1131 1132 1133 1134 1135 1136 1137

msvc-debug:windows:amd64:
  <<: *windows_build_job
  variables:
    VSCONF: Debug
  only:
    - schedules
    - tags
    - web
1138 1139 1140 1141 1142 1143 1144 1145

system:msvc-debug:windows:amd64:
  <<: *windows_system_test_job
  variables:
    VSCONF: Debug
  dependencies:
    - msvc-debug:windows:amd64
  needs: ["msvc-debug:windows:amd64"]
1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187

# Job producing a release tarball

release:sid:amd64:
  <<: *debian_sid_amd64_image
  stage: release
  script:
    # Determine BIND version
    - source version
    - export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
    # Remove redundant files and system test utilities from Windows build artifacts
    - find Build/Release/ -name "*.pdb" -print -delete
    - find Build/Debug/ \( -name "*.bsc" -o -name "*.idb" \) -print -delete
    - find Build/ -regextype posix-extended -regex "Build/.*/($(find bin/tests/ -type f | sed -nE "s|^bin/tests(/system)?/win32/(.*)\.vcxproj$|\2|p" | paste -d"|" -s))\..*" -print -delete
    # Create Windows zips
    - openssl dgst -sha256 "${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" | tee Build/Release/SHA256 Build/Debug/SHA256
    - ( cd Build/Release; zip "../../BIND${BIND_DIRECTORY#bind-}.x64.zip" * )
    - ( cd Build/Debug; zip "../../BIND${BIND_DIRECTORY#bind-}.debug.x64.zip" * )
    # Prepare release tarball contents (tarballs + zips + documentation)
    - mkdir -p release/doc/arm
    - pushd release
    - mv "../${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" ../BIND*.zip .
    - tar --extract --file="${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}"
    - mv "${BIND_DIRECTORY}"/{CHANGES*,COPYRIGHT,LICENSE,README,srcid} .
    - mv "${BIND_DIRECTORY}"/doc/arm/{Bv9ARM{*.html,.pdf},man.*,notes.{html,pdf,txt}} doc/arm/
    - rm -rf "${BIND_DIRECTORY}"
    - cp doc/arm/notes.html "RELEASE-NOTES-${BIND_DIRECTORY}.html"
    - cp doc/arm/notes.pdf "RELEASE-NOTES-${BIND_DIRECTORY}.pdf"
    - cp doc/arm/notes.txt "RELEASE-NOTES-${BIND_DIRECTORY}.txt"
    - popd
    # Create release tarball
    - tar --create --file="${CI_COMMIT_TAG}.tar.gz" --gzip release/
  dependencies:
    - tarball-create:sid:amd64
    - msvc:windows:amd64
    - msvc-debug:windows:amd64
  only:
    - tags
  artifacts:
    paths:
      - "*.tar.gz"
    expire_in: "1 week"