.gitlab-ci.yml 33.1 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

18
  CONFIGURE: ./configure
19 20 21
  CLANG: clang-10
  SCAN_BUILD: scan-build-10
  SYMBOLIZER: /usr/lib/llvm-10/bin/llvm-symbolizer
22
  ASAN_SYMBOLIZER_PATH: "$SYMBOLIZER"
23
  CLANG_FORMAT: clang-format-10
Ondřej Surý's avatar
Ondřej Surý committed
24

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

27 28 29
  # 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

30 31 32
  TARBALL_COMPRESSOR: xz
  TARBALL_EXTENSION: xz

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

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

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

.freebsd-amd64: &freebsd_amd64
  tags:
49
    - libvirt
Michał Kępień's avatar
Michał Kępień committed
50 51
    - amd64

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

Ondřej Surý's avatar
Ondřej Surý committed
57 58 59 60 61
.linux-arm64: &linux_arm64
  tags:
    - linux
    - arm64

62
.linux-i386: &linux_i386
Michał Kępień's avatar
Michał Kępień committed
63 64
  tags:
    - linux
65 66
    - i386

Michał Kępień's avatar
Michał Kępień committed
67 68
.openbsd-amd64: &openbsd_amd64
  tags:
69
    - libvirt
Michał Kępień's avatar
Michał Kępień committed
70 71
    - amd64

Michał Kępień's avatar
Michał Kępień committed
72 73
### Docker Image Templates

74 75
# Alpine Linux

76 77
.alpine-3.11-amd64: &alpine_3_11_amd64_image
  image: "$CI_REGISTRY_IMAGE:alpine-3.11-amd64"
78 79
  <<: *linux_amd64

Michał Kępień's avatar
Michał Kępień committed
80 81
# CentOS

82 83 84 85 86 87 88
.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
89

Michał Kępień's avatar
Michał Kępień committed
90 91 92 93
.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
94 95
# Debian

Ondřej Surý's avatar
Ondřej Surý committed
96 97
.debian-stretch-amd64: &debian_stretch_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
98
  <<: *linux_amd64
99

100
.debian-stretch-i386: &debian_stretch_i386_image
Ondřej Surý's avatar
Ondřej Surý committed
101
  image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
102
  <<: *linux_i386
103

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

Ondřej Surý's avatar
Ondřej Surý committed
108 109
.debian-sid-amd64: &debian_sid_amd64_image
  image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
110
  <<: *linux_amd64
111

Ondřej Surý's avatar
Ondřej Surý committed
112 113 114 115
.debian-sid-arm64: &debian_sid_arm64_image
  image: "$CI_REGISTRY_IMAGE:debian-sid-arm64"
  <<: *linux_arm64

Ondřej Surý's avatar
Ondřej Surý committed
116 117
.debian-sid-i386: &debian_sid_i386_image
  image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
118
  <<: *linux_i386
119

120 121 122 123 124 125
# 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
126 127
# Fedora

Michal Nowak's avatar
Michal Nowak committed
128 129
.fedora-31-amd64: &fedora_31_amd64_image
  image: "$CI_REGISTRY_IMAGE:fedora-31-amd64"
Michał Kępień's avatar
Michał Kępień committed
130 131
  <<: *linux_amd64

Michał Kępień's avatar
Michał Kępień committed
132 133
# Ubuntu

134 135
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
136
  <<: *linux_amd64
Ondřej Surý's avatar
Ondřej Surý committed
137

138 139
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
140
  <<: *linux_i386
Ondřej Surý's avatar
Ondřej Surý committed
141

142 143
.ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64"
144
  <<: *linux_amd64
145

146 147
.ubuntu-bionic-i386: &ubuntu_bionic_i386_image
  image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-i386"
148
  <<: *linux_i386
149

150 151 152 153 154 155
# Base image
# This is a meta image that is used as a base for non-specific jobs

.base: &base_image
  <<: *debian_buster_amd64_image

Michał Kępień's avatar
Michał Kępień committed
156 157
### Job Templates

158 159 160 161 162
.default-triggering-rules: &default_triggering_rules
  only:
    - merge_requests
    - tags
    - web
163
    - schedules
164

165 166 167 168 169
.release-branch-triggering-rules: &release_branch_triggering_rules
  only:
    - merge_requests
    - tags
    - web
170
    - schedules
171 172 173
    - master@isc-projects/bind9
    - /^v9_[1-9][0-9]$/@isc-projects/bind9

174
.precheck: &precheck_job
175
  <<: *default_triggering_rules
176
  <<: *base_image
177 178
  stage: precheck

179
.autoconf: &autoconf_job
180
  <<: *release_branch_triggering_rules
181
  <<: *base_image
182 183 184 185
  stage: precheck
  script:
    - autoreconf -fi
  artifacts:
186
    untracked: true
187
    expire_in: "1 day"
188

189
.configure: &configure |
190
    ${CONFIGURE} \
191 192 193 194 195 196 197 198 199 200 201
    --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
202

203
.build: &build_job
204
  <<: *default_triggering_rules
205
  stage: build
206
  before_script:
207
    - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
Michal Nowak's avatar
Michal Nowak committed
208
    - test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}"
209
  script:
210
    - *configure
211
    - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
212
    - test -z "${RUN_MAKE_INSTALL}" || make install
Mark Andrews's avatar
Mark Andrews committed
213
    - test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install
214
  needs:
215
    - job: autoreconf
216
      artifacts: true
217 218
  artifacts:
    untracked: true
219
    expire_in: "1 day"
220

221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
.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'
  needs:
245
    - job: autoreconf
246
      artifacts: false
247 248
  artifacts:
    untracked: true
249
    expire_in: "1 day"
250

251 252
.setup_interfaces: &setup_interfaces |
    if [ "$(id -u)" -eq "0" ]; then
253
      sh -x bin/tests/system/ifconfig.sh up;
254
    else
255
      sudo sh -x bin/tests/system/ifconfig.sh up;
256 257 258
    fi

.setup_softhsm: &setup_softhsm |
Michal Nowak's avatar
Michal Nowak committed
259 260
    export SLOT=$(sh -x bin/tests/prepare-softhsm2.sh)
    test -n "${SLOT}" && test "${SLOT}" -gt 0
261

262
.system_test: &system_test_job
263
  <<: *default_triggering_rules
264
  stage: system
265
  before_script:
266 267
    - *setup_interfaces
    - *setup_softhsm
268
  script:
269
    - ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
270
    - test -s bin/tests/system/systests.output
271 272
  artifacts:
    untracked: true
273
    expire_in: "1 day"
274 275
    when: on_failure

276
.kyua_report: &kyua_report_html |
277
  kyua --logfile /dev/null report-html \
278 279 280 281 282
       --force \
       --results-file "$KYUA_RESULT" \
       --results-filter "" \
       --output kyua_html

283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
.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
300
    expire_in: "1 day"
301 302 303 304 305 306
    when: on_failure
  only:
    - schedules
    - tags
    - web

307
.unit_test: &unit_test_job
308
  <<: *default_triggering_rules
309
  stage: unit
310
  before_script:
311
    - *setup_softhsm
312
  script:
313
    - make unit
314
  after_script:
315
    - *kyua_report_html
316
  artifacts:
Michal Nowak's avatar
Michal Nowak committed
317
    untracked: true
318
    expire_in: "1 day"
319
    when: on_failure
320

Ondřej Surý's avatar
Ondřej Surý committed
321
.cppcheck_args: &run_cppcheck |
322
  cppcheck --enable=warning,performance,portability,information,missingInclude --include=config.h --std=c11 --language=c --project=compile_commands.json --error-exitcode=2 -j ${TEST_PARALLEL_JOBS:-1} --xml --output-file=cppcheck.results --relative-paths="$CI_PROJECT_DIR" --inline-suppr --suppressions-list=util/suppressions.txt
Ondřej Surý's avatar
Ondřej Surý committed
323 324

.cppcheck_report: &cppcheck_report_html |
325
  cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" --file=cppcheck.results --report-dir=cppcheck_html/
Ondřej Surý's avatar
Ondřej Surý committed
326 327 328 329

.cppcheck: &cppcheck_job
  <<: *default_triggering_rules
  stage: postcheck
Michał Kępień's avatar
Michał Kępień committed
330
  before_script:
331 332 333 334
    - pip3 install compiledb
  script:
    - *configure
    - (make -nwk all || true) | compiledb
Michał Kępień's avatar
Michał Kępień committed
335 336
    - 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
337 338 339 340 341 342 343
    - *run_cppcheck
    - *cppcheck_report_html
  artifacts:
    paths:
      - compile_commands.json
      - cppcheck.results
      - cppcheck_html/
344
    expire_in: "1 day"
Ondřej Surý's avatar
Ondřej Surý committed
345
    when: on_failure
346 347 348
  needs:
    - job: autoreconf
      artifacts: true
Ondřej Surý's avatar
Ondřej Surý committed
349

Michał Kępień's avatar
Michał Kępień committed
350 351 352 353
### Job Definitions

# Jobs in the precheck stage

354
autoreconf:
355 356
  <<: *autoconf_job

357
misc:
358
  <<: *precheck_job
359
  script:
360
    - sh util/check-ans-prereq.sh
Evan Hunt's avatar
Evan Hunt committed
361
    - sh util/checklibs.sh > checklibs.out
Mark Andrews's avatar
Mark Andrews committed
362 363
    - sh util/tabify-changes < CHANGES > CHANGES.tmp
    - diff -urNap CHANGES CHANGES.tmp
364
    - perl util/check-changes CHANGES
365 366 367 368
    - test ! -f CHANGES.SE || sh util/tabify-changes < CHANGES.SE > CHANGES.tmp
    - test ! -f CHANGES.SE || diff -urNap CHANGES.SE CHANGES.tmp
    - test ! -f CHANGES.SE || perl util/check-changes master=0 CHANGES.SE
    - rm CHANGES.tmp
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
  needs: []
378 379
  artifacts:
    paths:
380 381
      - util/newcopyrights
      - checklibs.out
382
    expire_in: "1 day"
383 384
    when: on_failure

385
clang-format:
386
  <<: *precheck_job
387
  needs: []
388
  script:
389
    - if [ -r .clang-format ]; then "${CLANG_FORMAT}" -i -style=file $(git ls-files '*.c' '*.h'); fi
390 391
    - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi

392
coccinelle:
393
  <<: *precheck_job
394
  needs: []
395 396 397
  script:
    - util/check-cocci
    - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
398

399
tarball-create:
400
  stage: precheck
401
  <<: *base_image
402 403 404 405 406 407 408 409 410 411 412 413 414 415
  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
416 417
# Jobs for doc builds on Debian Sid (amd64)

418
docs:
419
  <<: *release_branch_triggering_rules
420
  <<: *base_image
421
  stage: docs
Michał Kępień's avatar
Michał Kępień committed
422
  script:
423
    - ./configure || cat config.log
Michał Kępień's avatar
Michał Kępień committed
424 425
    - make -C doc/misc docbook
    - make -C doc/arm Bv9ARM.html
426
  needs:
427
    - job: autoreconf
428
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
429 430
  artifacts:
    paths:
431
      - doc/arm/
432
    expire_in: "1 month"
433

434 435
push:docs:
  <<: *base_image
436
  stage: push
437
  needs:
438
    - job: docs
439
      artifacts: false
440 441 442
  script:
    - curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
  only:
443 444
    - master@isc-projects/bind9
    - /^v9_[1-9][0-9]$/@isc-projects/bind9
Michał Kępień's avatar
Michał Kępień committed
445

446
# Jobs for regular GCC builds on Alpine Linux 3.11 (amd64)
447

448
gcc:alpine3.11:amd64:
449 450
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
451
    CFLAGS: "${CFLAGS_COMMON}"
452
    EXTRA_CONFIGURE: "--enable-dnstap"
453
  <<: *alpine_3_11_amd64_image
454 455
  <<: *build_job

456 457
system:gcc:alpine3.11:amd64:
  <<: *alpine_3_11_amd64_image
458
  <<: *system_test_job
459 460 461
  needs:
    - job: gcc:alpine3.11:amd64
      artifacts: true
462

463 464
unit:gcc:alpine3.11:amd64:
  <<: *alpine_3_11_amd64_image
465
  <<: *unit_test_job
466 467 468
  needs:
    - job: gcc:alpine3.11:amd64
      artifacts: true
469

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

472
gcc:centos6:amd64:
Michał Kępień's avatar
Michał Kępień committed
473 474
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
475
    CFLAGS: "${CFLAGS_COMMON}"
Ondřej Surý's avatar
Ondřej Surý committed
476
    EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
Michał Kępień's avatar
Michał Kępień committed
477 478 479
  <<: *centos_centos6_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
480 481 482
system:gcc:centos6:amd64:
  <<: *centos_centos6_amd64_image
  <<: *system_test_job
483 484 485
  needs:
    - job: gcc:centos6:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
486 487 488 489

unit:gcc:centos6:amd64:
  <<: *centos_centos6_amd64_image
  <<: *unit_test_job
490 491 492
  needs:
    - job: gcc:centos6:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
493

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

496
gcc:centos7:amd64:
Michał Kępień's avatar
Michał Kępień committed
497 498
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
499
    CFLAGS: "${CFLAGS_COMMON}"
Michał Kępień's avatar
Michał Kępień committed
500
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
Michał Kępień's avatar
Michał Kępień committed
501 502 503
  <<: *centos_centos7_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
504 505 506
system:gcc:centos7:amd64:
  <<: *centos_centos7_amd64_image
  <<: *system_test_job
507 508 509
  needs:
    - job: gcc:centos7:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
510 511 512 513

unit:gcc:centos7:amd64:
  <<: *centos_centos7_amd64_image
  <<: *unit_test_job
514 515 516
  needs:
    - job: gcc:centos7:amd64
      artifacts: true
517

Michał Kępień's avatar
Michał Kępień committed
518 519 520 521 522
# Jobs for regular GCC builds on CentOS 8 (amd64)

gcc:centos8:amd64:
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
523
    CFLAGS: "${CFLAGS_COMMON}"
Michał Kępień's avatar
Michał Kępień committed
524 525 526 527 528 529 530
    EXTRA_CONFIGURE: "--with-libidn2"
  <<: *centos_centos8_amd64_image
  <<: *build_job

system:gcc:centos8:amd64:
  <<: *centos_centos8_amd64_image
  <<: *system_test_job
531 532 533
  needs:
    - job: gcc:centos8:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
534 535 536 537

unit:gcc:centos8:amd64:
  <<: *centos_centos8_amd64_image
  <<: *unit_test_job
538 539 540
  needs:
    - job: gcc:centos8:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
541

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

544
gcc:stretch:amd64:
545 546
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
547
    CFLAGS: "${CFLAGS_COMMON} -O2"
548 549 550
  <<: *debian_stretch_amd64_image
  <<: *build_job

Michał Kępień's avatar
Michał Kępień committed
551 552 553
system:gcc:stretch:amd64:
  <<: *debian_stretch_amd64_image
  <<: *system_test_job
554 555 556
  needs:
    - job: gcc:stretch:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
557 558 559 560

unit:gcc:stretch:amd64:
  <<: *debian_stretch_amd64_image
  <<: *unit_test_job
561 562 563
  needs:
    - job: gcc:stretch:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
564

Michał Kępień's avatar
Michał Kępień committed
565 566 567 568 569
# 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
570
    CFLAGS: "${CFLAGS_COMMON}"
Michał Kępień's avatar
Michał Kępień committed
571 572 573 574 575 576
  <<: *debian_buster_amd64_image
  <<: *build_job

system:gcc:buster:amd64:
  <<: *debian_buster_amd64_image
  <<: *system_test_job
577 578 579
  needs:
    - job: gcc:buster:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
580 581 582 583

unit:gcc:buster:amd64:
  <<: *debian_buster_amd64_image
  <<: *unit_test_job
584 585 586
  needs:
    - job: gcc:buster:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
587

588 589 590 591 592 593 594 595 596 597
# 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

598
scan-build:
599
  <<: *default_triggering_rules
600
  <<: *base_image
601 602
  stage: postcheck
  variables:
603
    CC: "${CLANG}"
Ondřej Surý's avatar
Ondřej Surý committed
604
    CFLAGS: "${CFLAGS_COMMON}"
605 606 607 608 609 610
    CONFIGURE: "${SCAN_BUILD} ./configure"
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
  script:
    - *configure
    - *scan_build
  needs:
611
    - job: autoreconf
612
      artifacts: true
613 614 615
  artifacts:
    paths:
      - scan-build.reports/
616
    expire_in: "1 day"
617 618
    when: on_failure

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

621
gcc:sid:amd64:
622 623
  variables:
    CC: gcc
Ondřej Surý's avatar
Ondřej Surý committed
624
    CFLAGS: "${CFLAGS_COMMON} -O3"
Michał Kępień's avatar
Michał Kępień committed
625
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
626
    RUN_MAKE_INSTALL: 1
Ondřej Surý's avatar
Ondřej Surý committed
627
  <<: *debian_sid_amd64_image
628
  <<: *build_job
629

Michał Kępień's avatar
Michał Kępień committed
630 631 632
system:gcc:sid:amd64:
  <<: *debian_sid_amd64_image
  <<: *system_test_job
633 634 635
  needs:
    - job: gcc:sid:amd64
      artifacts: true
636

637
unit:gcc:sid:amd64:
638 639
  <<: *debian_sid_amd64_image
  <<: *unit_test_job
640 641 642
  needs:
    - job: gcc:sid:amd64
      artifacts: true
643

644 645
cppcheck:
  <<: *base_image
Ondřej Surý's avatar
Ondřej Surý committed
646 647
  <<: *cppcheck_job

Michal Nowak's avatar
Michal Nowak committed
648 649
# Job for out-of-tree GCC build on Debian Sid (amd64)

650
out-of-tree:
Michal Nowak's avatar
Michal Nowak committed
651 652
  variables:
    CC: gcc
653
    CFLAGS: "${CFLAGS_COMMON} -Og"
Michal Nowak's avatar
Michal Nowak committed
654 655 656 657
    CONFIGURE: ../configure
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
    RUN_MAKE_INSTALL: 1
    OOT_BUILD_WORKSPACE: workspace
658
  <<: *base_image
Michal Nowak's avatar
Michal Nowak committed
659 660
  <<: *build_job

661 662
# Jobs for tarball GCC builds on Debian Sid (amd64)

663
tarball:
664 665 666 667
  variables:
    CC: gcc
    EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
    RUN_MAKE_INSTALL: 1
668
  <<: *base_image
669 670 671 672 673
  <<: *build_job
  before_script:
    - tar --extract --file bind-*.tar.${TARBALL_EXTENSION}
    - rm -f bind-*.tar.${TARBALL_EXTENSION}
    - cd bind-*
674
  needs:
675
    - job: tarball-create
676
      artifacts: true
677 678 679
  only:
    - tags

680 681
system:tarball:
  <<: *base_image
682 683 684 685
  <<: *system_test_job
  before_script:
    - cd bind-*
    - *setup_interfaces
686
  needs:
687
    - job: tarball
688
      artifacts: true
689 690 691
  only:
    - tags

692 693
unit:tarball:
  <<: *base_image
694 695 696
  <<: *unit_test_job
  before_script:
    - cd bind-*
697
  needs:
698
    - job: tarball
699
      artifacts: true
700 701 702
  only:
    - tags

Ondřej Surý's avatar
Ondřej Surý committed
703 704 705 706 707
# Jobs for regular GCC builds on Debian Sid (arm64)

gcc:sid:arm64:
  variables:
    CC: gcc
708 709
    CFLAGS: "${CFLAGS_COMMON} -Og"
    EXTRA_CONFIGURE: "--with-libidn2"
Ondřej Surý's avatar
Ondřej Surý committed
710 711 712 713 714 715
  <<: *debian_sid_arm64_image
  <<: *build_job

system:gcc:sid:arm64:
  <<: *debian_sid_arm64_image
  <<: *system_test_job
716 717 718
  needs:
    - job: gcc:sid:arm64
      artifacts: true
Ondřej Surý's avatar
Ondřej Surý committed
719 720 721 722

unit:gcc:sid:arm64:
  <<: *debian_sid_arm64_image
  <<: *unit_test_job
723 724 725
  needs:
    - job: gcc:sid:arm64
      artifacts: true
Ondřej Surý's avatar
Ondřej Surý committed
726

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

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

Michał Kępień's avatar
Michał Kępień committed
737 738 739
system:gcc:sid:i386:
  <<: *debian_sid_i386_image
  <<: *system_test_job
740 741 742
  needs:
    - job: gcc:sid:i386
      artifacts: true
743

744
unit:gcc:sid:i386:
745 746
  <<: *debian_sid_i386_image
  <<: *unit_test_job
747 748 749
  needs:
    - job: gcc:sid:i386
      artifacts: true
750

751 752 753 754 755 756 757 758 759 760 761 762 763
# 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
764 765 766
  needs:
    - job: gcc:tumbleweed:amd64
      artifacts: true
767 768 769 770

unit:gcc:tumbleweed:amd64:
  <<: *tumbleweed_latest_amd64_image
  <<: *unit_test_job
771 772 773
  needs:
    - job: gcc:tumbleweed:amd64
      artifacts: true
774

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

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

Michal Nowak's avatar
Michal Nowak committed
785 786
system:gcc:fedora31:amd64:
  <<: *fedora_31_amd64_image
Michał Kępień's avatar
Michał Kępień committed
787
  <<: *system_test_job
788 789 790
  needs:
    - job: gcc:fedora31:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
791

Michal Nowak's avatar
Michal Nowak committed
792 793
unit:gcc:fedora31:amd64:
  <<: *fedora_31_amd64_image
Michał Kępień's avatar
Michał Kępień committed
794
  <<: *unit_test_job
795 796 797
  needs:
    - job: gcc:fedora31:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
798

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

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

system:gcc:xenial:amd64:
  <<: *ubuntu_xenial_amd64_image
Michał Kępień's avatar
Michał Kępień committed
811
  <<: *system_test_job
812 813 814
  needs:
    - job: gcc:xenial:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
815

Michał Kępień's avatar
Michał Kępień committed
816 817 818
unit:gcc:xenial:amd64:
  <<: *ubuntu_xenial_amd64_image
  <<: *unit_test_job
819 820 821
  needs:
    - job: gcc:xenial:amd64
      artifacts: true
Michał Kępień's avatar
Michał Kępień committed
822

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

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

system:gcc:bionic:amd64:
  <<: *ubuntu_bionic_amd64_image
835
  <<: *system_test_job
836 837 838
  needs:
    - job: gcc:bionic:amd64
      artifacts: true
839

Michał Kępień's avatar
Michał Kępień committed
840 841 842
unit:gcc:bionic:amd64:
  <<: *ubuntu_bionic_amd64_image
  <<: *unit_test_job