"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.11.23/.gitlab-ci.yml" (7 Sep 2020, 36552 Bytes) of package /linux/misc/dns/bind9/9.11.23/bind-9.11.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for ".gitlab-ci.yml": 9.11.22_vs_9.11.23.

    1 variables:
    2   # Not normally needed, but may be if some script uses `apt-get install`.
    3   DEBIAN_FRONTEND: noninteractive
    4   # Locale settings do not affect the build, but might affect tests.
    5   LC_ALL: C
    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   # VirtualBox driver needs to set build_dir to "/builds" in gitlab-runner.toml
   12   KYUA_RESULT: "$CI_PROJECT_DIR/kyua.results"
   13 
   14   GIT_DEPTH: 1
   15   BUILD_PARALLEL_JOBS: 6
   16   TEST_PARALLEL_JOBS: 6
   17 
   18   CONFIGURE: ./configure
   19   CLANG: clang-10
   20   SCAN_BUILD: scan-build-10
   21   ASAN_SYMBOLIZER_PATH: /usr/lib/llvm-10/bin/llvm-symbolizer
   22   CLANG_FORMAT: clang-format-10
   23 
   24   CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra 
   25 
   26   # Pass run-time flags to AddressSanitizer to get core dumps on error.
   27   ASAN_OPTIONS_COMMON: abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1
   28   TSAN_OPTIONS_COMMON: "second_deadlock_stack=1 history_size=7 log_exe_name=true log_path=tsan external_symbolizer_path=/usr/lib/llvm-10/bin/llvm-symbolizer"
   29 
   30   TARBALL_COMPRESSOR: gzip
   31   TARBALL_EXTENSION: gz
   32 
   33 stages:
   34   - precheck
   35   - build
   36   - unit
   37   - system
   38   - docs
   39   - push
   40   - postcheck
   41   - release
   42 
   43 ### Runner Tag Templates
   44 
   45 .libvirt-amd64: &libvirt_amd64
   46   tags:
   47     - libvirt
   48     - amd64
   49 
   50 .linux-amd64: &linux_amd64
   51   tags:
   52     - linux
   53     - amd64
   54 
   55 .linux-i386: &linux_i386
   56   tags:
   57     - linux
   58     - i386
   59 
   60 ### Docker Image Templates
   61 
   62 # Alpine Linux
   63 
   64 .alpine-3.12-amd64: &alpine_3_12_amd64_image
   65   image: "$CI_REGISTRY_IMAGE:alpine-3.12-amd64"
   66   <<: *linux_amd64
   67 
   68 # CentOS
   69 
   70 .centos-centos6-amd64: &centos_centos6_amd64_image
   71   image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
   72   <<: *linux_amd64
   73 
   74 .centos-centos7-amd64: &centos_centos7_amd64_image
   75   image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
   76   <<: *linux_amd64
   77 
   78 .centos-centos8-amd64: &centos_centos8_amd64_image
   79   image: "$CI_REGISTRY_IMAGE:centos-centos8-amd64"
   80   <<: *linux_amd64
   81 
   82 # Debian
   83 
   84 .debian-stretch-amd64: &debian_stretch_amd64_image
   85   image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
   86   <<: *linux_amd64
   87 
   88 .debian-buster-amd64: &debian_buster_amd64_image
   89   image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
   90   <<: *linux_amd64
   91 
   92 .debian-sid-amd64: &debian_sid_amd64_image
   93   image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
   94   <<: *linux_amd64
   95 
   96 .debian-sid-i386: &debian_sid_i386_image
   97   image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
   98   <<: *linux_i386
   99 
  100 # openSUSE Tumbleweed
  101 
  102 .tumbleweed-latest-amd64: &tumbleweed_latest_amd64_image
  103   image: "$CI_REGISTRY_IMAGE:tumbleweed-latest-amd64"
  104   <<: *linux_amd64
  105 
  106 # Fedora
  107 
  108 .fedora-32-amd64: &fedora_32_amd64_image
  109   image: "$CI_REGISTRY_IMAGE:fedora-32-amd64"
  110   <<: *linux_amd64
  111 
  112 # Ubuntu
  113 
  114 .ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
  115   image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
  116   <<: *linux_amd64
  117 
  118 .ubuntu-focal-amd64: &ubuntu_focal_amd64_image
  119   image: "$CI_REGISTRY_IMAGE:ubuntu-focal-amd64"
  120   <<: *linux_amd64
  121 
  122 # Base image
  123 # This is a meta image that is used as a base for non-specific jobs
  124 
  125 .base: &base_image
  126   <<: *debian_buster_amd64_image
  127 
  128 ### QCOW2 Image Templates
  129 
  130 .freebsd-11-amd64: &freebsd_11_amd64_image
  131   image: "freebsd-11.4-x86_64"
  132   <<: *libvirt_amd64
  133 
  134 .freebsd-12-amd64: &freebsd_12_amd64_image
  135   image: "freebsd-12.1-x86_64"
  136   <<: *libvirt_amd64
  137 
  138 .openbsd-amd64: &openbsd_amd64_image
  139   image: "openbsd-6.7-x86_64"
  140   <<: *libvirt_amd64
  141 
  142 ### Job Templates
  143 
  144 .default-triggering-rules: &default_triggering_rules
  145   only:
  146     - merge_requests
  147     - tags
  148     - web
  149     - schedules
  150 
  151 .release-branch-triggering-rules: &release_branch_triggering_rules
  152   only:
  153     - merge_requests
  154     - tags
  155     - web
  156     - schedules
  157     - main@isc-projects/bind9
  158     - /^v9_[1-9][0-9]$/@isc-projects/bind9
  159 
  160 .precheck: &precheck_job
  161   <<: *default_triggering_rules
  162   <<: *base_image
  163   stage: precheck
  164 
  165 .autoconf: &autoconf_job
  166   <<: *release_branch_triggering_rules
  167   <<: *base_image
  168   stage: precheck
  169   script:
  170     - autoreconf -fi
  171   artifacts:
  172     untracked: true
  173     expire_in: "1 day"
  174 
  175 .configure: &configure |
  176     ${CONFIGURE} \
  177     --enable-developer \
  178     --with-randomdev=/dev/urandom \
  179     --with-libtool \
  180     --with-geoip2=auto \
  181     --disable-static \
  182     --with-cmocka \
  183     --with-libxml2 \
  184     --with-libjson \
  185     --prefix=$HOME/.local \
  186     --without-make-clean \
  187     $EXTRA_CONFIGURE \
  188     || cat config.log
  189 
  190 .build: &build_job
  191   <<: *default_triggering_rules
  192   stage: build
  193   before_script:
  194     - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
  195     - test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}"
  196   script:
  197     - *configure
  198     - make depend | grep "error:" && exit 1
  199     - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
  200     - test -z "${RUN_MAKE_INSTALL}" || make install
  201     - test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install
  202   needs:
  203     - job: autoreconf
  204       artifacts: true
  205   artifacts:
  206     untracked: true
  207     expire_in: "1 day"
  208 
  209 .windows_build: &windows_build_job
  210   stage: build
  211   tags:
  212     - windows
  213     - amd64
  214   script:
  215     - 'Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"'
  216     - '& cmd.exe /C "vcvarsall.bat x64 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
  217     - 'Pop-Location'
  218     - 'Set-Location win32utils'
  219     - '& "C:/Strawberry/perl/bin/perl.exe" Configure
  220          "with-tools-version=15.0"
  221          "with-platform-toolset=v141"
  222          "with-platform-version=10.0.17763.0"
  223          "with-vcredist=C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Redist/MSVC/14.16.27012/vcredist_x64.exe"
  224          "with-openssl=C:/OpenSSL"
  225          "with-libxml2=C:/libxml2"
  226          "without-python"
  227          "with-system-tests"
  228          x64'
  229     - 'Set-Item -path "Env:CL" -value "/MP$([Math]::Truncate($BUILD_PARALLEL_JOBS/2))"'
  230     - '& msbuild.exe /maxCpuCount:2 /t:Build /p:Configuration=$VSCONF bind9.sln'
  231   needs: []
  232   artifacts:
  233     untracked: true
  234     expire_in: "1 day"
  235 
  236 .setup_interfaces: &setup_interfaces |
  237     if [ "$(id -u)" -eq "0" ]; then
  238       sh -x bin/tests/system/ifconfig.sh up;
  239     else
  240       sudo sh -x bin/tests/system/ifconfig.sh up;
  241     fi
  242 
  243 .setup_softhsm: &setup_softhsm |
  244     export SLOT=$(sh -x bin/tests/prepare-softhsm2.sh)
  245     test -n "${SLOT}" && test "${SLOT}" -gt 0
  246 
  247 .system_test_common: &system_test_common
  248   <<: *default_triggering_rules
  249   stage: system
  250   before_script:
  251     - *setup_interfaces
  252     - *setup_softhsm
  253   script:
  254     - ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
  255     - test -s bin/tests/system/systests.output
  256 
  257 .system_test: &system_test_job
  258   <<: *system_test_common
  259   artifacts:
  260     untracked: true
  261     expire_in: "1 day"
  262     when: on_failure
  263 
  264 .system_test_tsan: &system_test_tsan_job
  265   <<: *system_test_common
  266   allow_failure: true
  267   after_script:
  268     - find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
  269   artifacts:
  270     expire_in: "1 day"
  271     paths:
  272       - bin/tests/system/*/tsan.*
  273       - bin/tests/system/*/*/tsan.*
  274       - tsan/
  275     when: on_failure
  276 
  277 .kyua_report: &kyua_report_html |
  278   kyua --logfile /dev/null report-html \
  279        --force \
  280        --results-file "$KYUA_RESULT" \
  281        --results-filter "" \
  282        --output kyua_html
  283 
  284 .windows_system_test: &windows_system_test_job
  285   stage: system
  286   tags:
  287     - windows
  288     - amd64
  289   script:
  290     - 'Push-Location bin/tests/system'
  291     - '$ifIndex = Get-NetIPInterface -AddressFamily IPv4 -InterfaceMetric 75 | Select-Object -ExpandProperty ifIndex'
  292     - '& C:/tools/cygwin/bin/sed.exe -i "s/^exit.*/netsh interface ipv4 set dnsservers $ifIndex dhcp/; s/\(name\|interface\)=Loopback/$ifIndex/;" ifconfig.bat'
  293     - '& C:/tools/cygwin/bin/sed.exe -i "s/kill -f/kill -W/;" conf.sh stop.pl'
  294     - '& cmd.exe /C ifconfig.bat up; ""'
  295     - 'Start-Sleep 2'
  296     - '$Env:Path = "C:/tools/cygwin/bin;$Env:Path"'
  297     - '& sh.exe runall.sh $TEST_PARALLEL_JOBS'
  298     - 'If (Test-Path C:/CrashDumps/*) { dir C:/CrashDumps; Throw }'
  299   artifacts:
  300     untracked: true
  301     expire_in: "1 day"
  302     when: on_failure
  303   only:
  304     - schedules
  305     - tags
  306     - web
  307 
  308 .unit_test_common: &unit_test_common
  309   <<: *default_triggering_rules
  310   stage: unit
  311   before_script:
  312     - *setup_softhsm
  313   script:
  314     - make unit
  315   after_script:
  316     - *kyua_report_html
  317 
  318 .unit_test: &unit_test_job
  319   <<: *unit_test_common
  320   artifacts:
  321     untracked: true
  322     expire_in: "1 day"
  323     when: on_failure
  324 
  325 .unit_test_tsan: &unit_test_tsan_job
  326   <<: *unit_test_common
  327   allow_failure: true
  328   after_script:
  329     - *kyua_report_html
  330     - find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
  331   artifacts:
  332     expire_in: "1 day"
  333     paths:
  334       - lib/*/tests/tsan.*
  335       - tsan/
  336       - kyua.log
  337       - kyua.results
  338       - kyua_html/
  339     when: on_failure
  340 
  341 .cppcheck_args: &run_cppcheck |
  342   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
  343 
  344 .cppcheck_report: &cppcheck_report_html |
  345   cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" --file=cppcheck.results --report-dir=cppcheck_html/
  346 
  347 .cppcheck: &cppcheck_job
  348   <<: *default_triggering_rules
  349   stage: postcheck
  350   script:
  351     # Workaround for cppcheck 2.0 uninitvar false positives triggered by (&var)->field syntax
  352     # (see: https://sourceforge.net/p/cppcheck/discussion/general/thread/122153e3c1/)
  353     - sed -i '/^#define ISC__BUFFER.*\\$/{s|_b|__b|;N;s|do {|\0 isc_buffer_t *_b = (isc_buffer_t *)__b;|}; /^#define ISC__BUFFER.*REGION.*\\$/{s|_r|__r|;N;s|do {|\0 isc_region_t *_r = (isc_region_t *)__r;|; /USEDREGION/{s|isc_buffer_t|const \0|g}}' lib/isc/include/isc/buffer.h
  354     - *configure
  355     - (make -nwk all || true) | compiledb
  356     - export GCC_VERSION=$(gcc --version | sed -n 's/.* \([0-9]\+\)\.[0-9]\+\.[0-9]\+.*/\1/p')
  357     - sed -i "/gcc\",/a\"-DCPPCHECK\", \"-D__STDC__\", \"-D__GNUC__=${GCC_VERSION}\"," compile_commands.json
  358     - *run_cppcheck
  359   after_script:
  360     - *cppcheck_report_html
  361   artifacts:
  362     paths:
  363       - compile_commands.json
  364       - cppcheck.results
  365       - cppcheck_html/
  366     expire_in: "1 day"
  367     when: on_failure
  368   needs:
  369     - job: autoreconf
  370       artifacts: true
  371 
  372 ### Job Definitions
  373 
  374 # Jobs in the precheck stage
  375 
  376 autoreconf:
  377   <<: *autoconf_job
  378 
  379 misc:
  380   <<: *precheck_job
  381   script:
  382     - sh util/check-ans-prereq.sh
  383     - sh util/checklibs.sh > checklibs.out
  384     - sh util/tabify-changes < CHANGES > CHANGES.tmp
  385     - diff -urNap CHANGES CHANGES.tmp
  386     - perl util/check-changes CHANGES
  387     - test ! -f CHANGES.SE || sh util/tabify-changes < CHANGES.SE > CHANGES.tmp
  388     - test ! -f CHANGES.SE || diff -urNap CHANGES.SE CHANGES.tmp
  389     - test ! -f CHANGES.SE || perl util/check-changes master=0 CHANGES.SE
  390     - rm CHANGES.tmp
  391     - perl -w util/merge_copyrights
  392     - diff -urNap util/copyrights util/newcopyrights
  393     - rm util/newcopyrights
  394     - perl -w util/update_copyrights < util/copyrights
  395     - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
  396     - xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
  397     - xmllint --noout --nonet --html `git ls-files '*.html'`
  398     - sh util/check-win32util-configure
  399     - sh util/check-categories.sh
  400   needs: []
  401   artifacts:
  402     paths:
  403       - util/newcopyrights
  404       - checklibs.out
  405     expire_in: "1 day"
  406     when: on_failure
  407 
  408 clang-format:
  409   <<: *precheck_job
  410   needs: []
  411   script:
  412     - if [ -r .clang-format ]; then "${CLANG_FORMAT}" -i -style=file $(git ls-files '*.c' '*.h'); fi
  413     - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
  414 
  415 coccinelle:
  416   <<: *precheck_job
  417   needs: []
  418   script:
  419     - util/check-cocci
  420     - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
  421 
  422 danger:
  423   <<: *precheck_job
  424   needs: []
  425   script:
  426     - danger-python ci -f
  427   only:
  428     refs:
  429       - merge_requests
  430     variables:
  431       - $DANGER_GITLAB_API_TOKEN
  432 
  433 flake8:
  434   <<: *default_triggering_rules
  435   <<: *base_image
  436   stage: postcheck
  437   needs:
  438     - job: autoreconf
  439       artifacts: true
  440   script:
  441     - *configure
  442     - flake8 --max-line-length=80 $(git ls-files '*.py' | grep -vE '(ans\.py|dangerfile\.py)')
  443   only:
  444     - merge_requests
  445 
  446 pylint:
  447   <<: *default_triggering_rules
  448   <<: *base_image
  449   stage: postcheck
  450   needs:
  451     - job: autoreconf
  452       artifacts: true
  453   before_script:
  454   script:
  455     - *configure
  456     - PYTHONPATH="$PYTHONPATH:$CI_PROJECT_DIR/bin/python"
  457     - pylint --rcfile $CI_PROJECT_DIR/.pylintrc $(git ls-files '*.py' | grep -vE '(ans\.py|dangerfile\.py|contrib/queryperf/)')
  458   only:
  459     - merge_requests
  460 
  461 tarball-create:
  462   stage: precheck
  463   <<: *base_image
  464   script:
  465     - source version
  466     - export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
  467     - git archive --prefix="${BIND_DIRECTORY}/" --output="${BIND_DIRECTORY}.tar" HEAD
  468     - mkdir "${BIND_DIRECTORY}"
  469     - echo "SRCID=$(git rev-list --max-count=1 HEAD | cut -b1-7)" > "${BIND_DIRECTORY}/srcid"
  470     - tar --append --file="${BIND_DIRECTORY}.tar" "${BIND_DIRECTORY}/srcid"
  471     - ${TARBALL_COMPRESSOR} "${BIND_DIRECTORY}.tar"
  472   artifacts:
  473     paths:
  474       - bind-*.tar.${TARBALL_EXTENSION}
  475   only:
  476     - schedules
  477     - tags
  478 
  479 # Jobs for doc builds on Debian Sid (amd64)
  480 
  481 docs:
  482   <<: *release_branch_triggering_rules
  483   <<: *base_image
  484   stage: docs
  485   script:
  486     - ./configure || cat config.log
  487     - make -C doc/misc docbook
  488     - make -C doc/arm Bv9ARM.html
  489   needs:
  490     - job: autoreconf
  491       artifacts: true
  492   artifacts:
  493     paths:
  494       - doc/arm/
  495     expire_in: "1 month"
  496 
  497 push:docs:
  498   <<: *base_image
  499   stage: push
  500   needs:
  501     - job: docs
  502       artifacts: false
  503   script:
  504     - curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=main $GITLAB_PAGES_DOCS_TRIGGER_URL
  505   only:
  506     - main@isc-projects/bind9
  507     - /^v9_[1-9][0-9]$/@isc-projects/bind9
  508 
  509 # Jobs for regular GCC builds on Alpine Linux 3.12 (amd64)
  510 
  511 gcc:alpine3.12:amd64:
  512   variables:
  513     CC: gcc
  514     CFLAGS: "${CFLAGS_COMMON}"
  515     EXTRA_CONFIGURE: "--enable-dnstap"
  516   <<: *alpine_3_12_amd64_image
  517   <<: *build_job
  518 
  519 system:gcc:alpine3.12:amd64:
  520   <<: *alpine_3_12_amd64_image
  521   <<: *system_test_job
  522   needs:
  523     - job: gcc:alpine3.12:amd64
  524       artifacts: true
  525 
  526 unit:gcc:alpine3.12:amd64:
  527   <<: *alpine_3_12_amd64_image
  528   <<: *unit_test_job
  529   needs:
  530     - job: gcc:alpine3.12:amd64
  531       artifacts: true
  532 
  533 # Jobs for regular GCC builds on CentOS 6 (amd64)
  534 
  535 gcc:centos6:amd64:
  536   variables:
  537     CC: gcc
  538     CFLAGS: "${CFLAGS_COMMON}"
  539     EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
  540   <<: *centos_centos6_amd64_image
  541   <<: *build_job
  542 
  543 system:gcc:centos6:amd64:
  544   <<: *centos_centos6_amd64_image
  545   <<: *system_test_job
  546   needs:
  547     - job: gcc:centos6:amd64
  548       artifacts: true
  549 
  550 unit:gcc:centos6:amd64:
  551   <<: *centos_centos6_amd64_image
  552   <<: *unit_test_job
  553   needs:
  554     - job: gcc:centos6:amd64
  555       artifacts: true
  556 
  557 # Jobs for regular GCC builds on CentOS 7 (amd64)
  558 
  559 gcc:centos7:amd64:
  560   variables:
  561     CC: gcc
  562     CFLAGS: "${CFLAGS_COMMON}"
  563     EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
  564   <<: *centos_centos7_amd64_image
  565   <<: *build_job
  566 
  567 system:gcc:centos7:amd64:
  568   <<: *centos_centos7_amd64_image
  569   <<: *system_test_job
  570   needs:
  571     - job: gcc:centos7:amd64
  572       artifacts: true
  573 
  574 unit:gcc:centos7:amd64:
  575   <<: *centos_centos7_amd64_image
  576   <<: *unit_test_job
  577   needs:
  578     - job: gcc:centos7:amd64
  579       artifacts: true
  580 
  581 # Jobs for regular GCC builds on CentOS 8 (amd64)
  582 
  583 gcc:centos8:amd64:
  584   variables:
  585     CC: gcc
  586     CFLAGS: "${CFLAGS_COMMON}"
  587     EXTRA_CONFIGURE: "--enable-buffer-useinline --with-libidn2"
  588   <<: *centos_centos8_amd64_image
  589   <<: *build_job
  590 
  591 system:gcc:centos8:amd64:
  592   <<: *centos_centos8_amd64_image
  593   <<: *system_test_job
  594   needs:
  595     - job: gcc:centos8:amd64
  596       artifacts: true
  597 
  598 unit:gcc:centos8:amd64:
  599   <<: *centos_centos8_amd64_image
  600   <<: *unit_test_job
  601   needs:
  602     - job: gcc:centos8:amd64
  603       artifacts: true
  604 
  605 # Jobs for regular GCC builds on Debian 9 Stretch (amd64)
  606 
  607 gcc:stretch:amd64:
  608   variables:
  609     CC: gcc
  610     CFLAGS: "${CFLAGS_COMMON} -O2"
  611   <<: *debian_stretch_amd64_image
  612   <<: *build_job
  613 
  614 system:gcc:stretch:amd64:
  615   <<: *debian_stretch_amd64_image
  616   <<: *system_test_job
  617   needs:
  618     - job: gcc:stretch:amd64
  619       artifacts: true
  620 
  621 unit:gcc:stretch:amd64:
  622   <<: *debian_stretch_amd64_image
  623   <<: *unit_test_job
  624   needs:
  625     - job: gcc:stretch:amd64
  626       artifacts: true
  627 
  628 # Jobs for regular GCC builds on Debian 10 Buster (amd64)
  629 
  630 gcc:buster:amd64:
  631   variables:
  632     CC: gcc
  633     CFLAGS: "${CFLAGS_COMMON}"
  634   <<: *debian_buster_amd64_image
  635   <<: *build_job
  636 
  637 system:gcc:buster:amd64:
  638   <<: *debian_buster_amd64_image
  639   <<: *system_test_job
  640   needs:
  641     - job: gcc:buster:amd64
  642       artifacts: true
  643 
  644 unit:gcc:buster:amd64:
  645   <<: *debian_buster_amd64_image
  646   <<: *unit_test_job
  647   needs:
  648     - job: gcc:buster:amd64
  649       artifacts: true
  650 
  651 # Jobs for scan-build builds on Debian Buster (amd64)
  652 
  653 .scan_build: &scan_build |
  654   ${SCAN_BUILD} --html-title="BIND 9 ($CI_COMMIT_SHORT_SHA)" \
  655                 --keep-cc \
  656                 --status-bugs \
  657                 --keep-going \
  658                 -o scan-build.reports \
  659                 make -j${BUILD_PARALLEL_JOBS:-1} all V=1
  660 
  661 scan-build:
  662   <<: *default_triggering_rules
  663   <<: *base_image
  664   stage: postcheck
  665   variables:
  666     CC: "${CLANG}"
  667     CFLAGS: "${CFLAGS_COMMON}"
  668     CONFIGURE: "${SCAN_BUILD} ./configure"
  669     EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
  670   script:
  671     - *configure
  672     - *scan_build
  673   needs:
  674     - job: autoreconf
  675       artifacts: true
  676   artifacts:
  677     paths:
  678       - scan-build.reports/
  679     expire_in: "1 day"
  680     when: on_failure
  681 
  682 # Jobs for regular GCC builds on Debian Sid (amd64)
  683 # Also tests configration option: --without-lmdb.
  684 
  685 gcc:sid:amd64:
  686   variables:
  687     CC: gcc
  688     CFLAGS: "${CFLAGS_COMMON} -O3"
  689     EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --without-lmdb"
  690     RUN_MAKE_INSTALL: 1
  691   <<: *debian_sid_amd64_image
  692   <<: *build_job
  693 
  694 system:gcc:sid:amd64:
  695   <<: *debian_sid_amd64_image
  696   <<: *system_test_job
  697   needs:
  698     - job: gcc:sid:amd64
  699       artifacts: true
  700 
  701 unit:gcc:sid:amd64:
  702   <<: *debian_sid_amd64_image
  703   <<: *unit_test_job
  704   needs:
  705     - job: gcc:sid:amd64
  706       artifacts: true
  707 
  708 cppcheck:
  709   <<: *base_image
  710   <<: *cppcheck_job
  711 
  712 # Job for out-of-tree GCC build on Debian Sid (amd64)
  713 # Also tests configration option: --with-lmdb.
  714 
  715 gcc:out-of-tree:
  716   variables:
  717     CC: gcc
  718     CFLAGS: "${CFLAGS_COMMON} -Og"
  719     CONFIGURE: ../configure
  720     EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --with-lmdb"
  721     RUN_MAKE_INSTALL: 1
  722     OOT_BUILD_WORKSPACE: workspace
  723   <<: *base_image
  724   <<: *build_job
  725 
  726 # Jobs for tarball GCC builds on Debian Sid (amd64)
  727 
  728 gcc:tarball:
  729   variables:
  730     CC: gcc
  731     EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
  732     RUN_MAKE_INSTALL: 1
  733   <<: *base_image
  734   <<: *build_job
  735   before_script:
  736     - tar --extract --file bind-*.tar.${TARBALL_EXTENSION}
  737     - rm -f bind-*.tar.${TARBALL_EXTENSION}
  738     - cd bind-*
  739   needs:
  740     - job: tarball-create
  741       artifacts: true
  742   only:
  743     - schedules
  744     - tags
  745 
  746 system:gcc:tarball:
  747   <<: *base_image
  748   <<: *system_test_job
  749   before_script:
  750     - cd bind-*
  751     - *setup_interfaces
  752   needs:
  753     - job: gcc:tarball
  754       artifacts: true
  755   only:
  756     - schedules
  757     - tags
  758 
  759 unit:gcc:tarball:
  760   <<: *base_image
  761   <<: *unit_test_job
  762   before_script:
  763     - cd bind-*
  764   needs:
  765     - job: gcc:tarball
  766       artifacts: true
  767   only:
  768     - schedules
  769     - tags
  770 
  771 # Jobs for regular GCC builds on Debian Sid (i386)
  772 
  773 gcc:sid:i386:
  774   variables:
  775     CC: gcc
  776     CFLAGS: "${CFLAGS_COMMON}"
  777     EXTRA_CONFIGURE: "--with-libidn2 --without-python"
  778   <<: *debian_sid_i386_image
  779   <<: *build_job
  780 
  781 system:gcc:sid:i386:
  782   <<: *debian_sid_i386_image
  783   <<: *system_test_job
  784   needs:
  785     - job: gcc:sid:i386
  786       artifacts: true
  787 
  788 unit:gcc:sid:i386:
  789   <<: *debian_sid_i386_image
  790   <<: *unit_test_job
  791   needs:
  792     - job: gcc:sid:i386
  793       artifacts: true
  794 
  795 # Jobs for regular GCC builds on openSUSE Tumbleweed (amd64)
  796 
  797 gcc:tumbleweed:amd64:
  798   variables:
  799     CC: gcc
  800     CFLAGS: "${CFLAGS_COMMON}"
  801     EXTRA_CONFIGURE: "--with-libidn2"
  802   <<: *tumbleweed_latest_amd64_image
  803   <<: *build_job
  804 
  805 system:gcc:tumbleweed:amd64:
  806   <<: *tumbleweed_latest_amd64_image
  807   <<: *system_test_job
  808   needs:
  809     - job: gcc:tumbleweed:amd64
  810       artifacts: true
  811 
  812 unit:gcc:tumbleweed:amd64:
  813   <<: *tumbleweed_latest_amd64_image
  814   <<: *unit_test_job
  815   needs:
  816     - job: gcc:tumbleweed:amd64
  817       artifacts: true
  818 
  819 # Jobs for regular GCC builds on Fedora 32 (amd64)
  820 
  821 gcc:fedora32:amd64:
  822   variables:
  823     CC: gcc
  824     CFLAGS: "${CFLAGS_COMMON} -O1"
  825     EXTRA_CONFIGURE: "--with-libidn2"
  826   <<: *fedora_32_amd64_image
  827   <<: *build_job
  828 
  829 system:gcc:fedora32:amd64:
  830   <<: *fedora_32_amd64_image
  831   <<: *system_test_job
  832   needs:
  833     - job: gcc:fedora32:amd64
  834       artifacts: true
  835 
  836 unit:gcc:fedora32:amd64:
  837   <<: *fedora_32_amd64_image
  838   <<: *unit_test_job
  839   needs:
  840     - job: gcc:fedora32:amd64
  841       artifacts: true
  842 
  843 # Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
  844 
  845 gcc:xenial:amd64:
  846   variables:
  847     CC: gcc
  848     CFLAGS: "${CFLAGS_COMMON} -O2"
  849     EXTRA_CONFIGURE: "--disable-geoip"
  850   <<: *ubuntu_xenial_amd64_image
  851   <<: *build_job
  852 
  853 system:gcc:xenial:amd64:
  854   <<: *ubuntu_xenial_amd64_image
  855   <<: *system_test_job
  856   needs:
  857     - job: gcc:xenial:amd64
  858       artifacts: true
  859 
  860 unit:gcc:xenial:amd64:
  861   <<: *ubuntu_xenial_amd64_image
  862   <<: *unit_test_job
  863   needs:
  864     - job: gcc:xenial:amd64
  865       artifacts: true
  866 
  867 # Jobs for regular GCC builds on Ubuntu 20.04 Focal Fossa (amd64)
  868 
  869 gcc:focal:amd64:
  870   variables:
  871     CC: gcc
  872     CFLAGS: "${CFLAGS_COMMON} -Og"
  873     EXTRA_CONFIGURE: "--with-libidn2"
  874   <<: *ubuntu_focal_amd64_image
  875   <<: *build_job
  876 
  877 system:gcc:focal:amd64:
  878   <<: *ubuntu_focal_amd64_image
  879   <<: *system_test_job
  880   needs:
  881     - job: gcc:focal:amd64
  882       artifacts: true
  883 
  884 unit:gcc:focal:amd64:
  885   <<: *ubuntu_focal_amd64_image
  886   <<: *unit_test_job
  887   needs:
  888     - job: gcc:focal:amd64
  889       artifacts: true
  890 
  891 # Jobs for builds with ASAN enabled
  892 
  893 gcc:asan:
  894   variables:
  895     CC: gcc
  896     CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
  897     LDFLAGS: "-fsanitize=address,undefined"
  898     EXTRA_CONFIGURE: "--with-libidn2"
  899   <<: *base_image
  900   <<: *build_job
  901 
  902 system:gcc:asan:
  903   variables:
  904     ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
  905   <<: *base_image
  906   <<: *system_test_job
  907   needs:
  908     - job: gcc:asan
  909       artifacts: true
  910 
  911 unit:gcc:asan:
  912   variables:
  913     ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
  914   <<: *base_image
  915   <<: *unit_test_job
  916   needs:
  917     - job: gcc:asan
  918       artifacts: true
  919 
  920 clang:asan:
  921   variables:
  922     CC: ${CLANG}
  923     CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
  924     LDFLAGS: "-fsanitize=address,undefined"
  925     EXTRA_CONFIGURE: "--with-libidn2"
  926   <<: *base_image
  927   <<: *build_job
  928 
  929 system:clang:asan:
  930   variables:
  931     ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
  932   <<: *base_image
  933   <<: *system_test_job
  934   needs:
  935     - job: clang:asan
  936       artifacts: true
  937 
  938 unit:clang:asan:
  939   variables:
  940     ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
  941   <<: *base_image
  942   <<: *unit_test_job
  943   needs:
  944     - job: clang:asan
  945       artifacts: true
  946 
  947 # Jobs for builds with TSAN enabled
  948 
  949 gcc:tsan:
  950   <<: *base_image
  951   <<: *build_job
  952   variables:
  953     CC: gcc
  954     CFLAGS: "${CFLAGS_COMMON} -fsanitize=thread -DISC_MEM_USE_INTERNAL_MALLOC=0"
  955     LDFLAGS: "-fsanitize=thread"
  956     EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock"
  957 
  958 system:gcc:tsan:
  959   variables:
  960     TSAN_OPTIONS: ${TSAN_OPTIONS_COMMON}
  961   <<: *base_image
  962   <<: *system_test_tsan_job
  963   needs:
  964     - job: gcc:tsan
  965       artifacts: true
  966 
  967 unit:gcc:tsan:
  968   variables:
  969     TSAN_OPTIONS: ${TSAN_OPTIONS_COMMON}
  970   <<: *base_image
  971   <<: *unit_test_tsan_job
  972   needs:
  973     - job: gcc:tsan
  974       artifacts: true
  975 
  976 clang:tsan:
  977   <<: *base_image
  978   <<: *build_job
  979   variables:
  980     CC: "${CLANG}"
  981     CFLAGS: "${CFLAGS_COMMON} -fsanitize=thread -DISC_MEM_USE_INTERNAL_MALLOC=0"
  982     LDFLAGS: "-fsanitize=thread"
  983     EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock"
  984 
  985 system:clang:tsan:
  986   variables:
  987     TSAN_OPTIONS: ${TSAN_OPTIONS_COMMON}
  988   <<: *base_image
  989   <<: *system_test_tsan_job
  990   needs:
  991     - job: clang:tsan
  992       artifacts: true
  993 
  994 unit:clang:tsan:
  995   variables:
  996     TSAN_OPTIONS: ${TSAN_OPTIONS_COMMON}
  997   <<: *base_image
  998   <<: *unit_test_tsan_job
  999   needs:
 1000     - job: clang:tsan
 1001       artifacts: true
 1002 
 1003 # Jobs for mutex-based atomics on Debian SID (amd64)
 1004 gcc:mutexatomics:
 1005   variables:
 1006     CC: gcc
 1007     CFLAGS: "${CFLAGS_COMMON} -DISC_MEM_USE_INTERNAL_MALLOC=0"
 1008     EXTRA_CONFIGURE: "--with-libidn2 --enable-mutex-atomics"
 1009   <<: *base_image
 1010   <<: *build_job
 1011 
 1012 system:gcc:mutexatomics:
 1013   <<: *base_image
 1014   <<: *system_test_job
 1015   needs:
 1016     - job: gcc:mutexatomics
 1017       artifacts: true
 1018 
 1019 unit:gcc:mutexatomics:
 1020   <<: *base_image
 1021   <<: *unit_test_job
 1022   needs:
 1023     - job: gcc:mutexatomics
 1024       artifacts: true
 1025 
 1026 # Jobs for Clang builds on Debian Buster (amd64)
 1027 
 1028 clang:buster:amd64:
 1029   variables:
 1030     CC: ${CLANG}
 1031     CFLAGS: "${CFLAGS_COMMON} -Wenum-conversion"
 1032     EXTRA_CONFIGURE: "--with-python=python3"
 1033   <<: *debian_buster_amd64_image
 1034   <<: *build_job
 1035 
 1036 system:clang:buster:amd64:
 1037   <<: *debian_buster_amd64_image
 1038   <<: *system_test_job
 1039   needs:
 1040     - job: clang:buster:amd64
 1041       artifacts: true
 1042 
 1043 unit:clang:buster:amd64:
 1044   <<: *debian_buster_amd64_image
 1045   <<: *unit_test_job
 1046   needs:
 1047     - job: clang:buster:amd64
 1048       artifacts: true
 1049 
 1050 # Jobs for PKCS#11-enabled GCC builds on Debian Sid (amd64)
 1051 
 1052 gcc:pkcs11:
 1053   variables:
 1054     CC: gcc
 1055     CFLAGS: "${CFLAGS_COMMON}"
 1056     EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so"
 1057   <<: *base_image
 1058   <<: *build_job
 1059 
 1060 system:gcc:pkcs11:
 1061   <<: *base_image
 1062   <<: *system_test_job
 1063   needs:
 1064     - job: gcc:pkcs11
 1065       artifacts: true
 1066 
 1067 unit:gcc:pkcs11:
 1068   <<: *base_image
 1069   <<: *unit_test_job
 1070   needs:
 1071     - job: gcc:pkcs11
 1072       artifacts: true
 1073 
 1074 # Jobs for Clang builds on FreeBSD 11 (amd64)
 1075 
 1076 clang:freebsd11:amd64:
 1077   variables:
 1078     CFLAGS: "${CFLAGS_COMMON}"
 1079     USER: gitlab-runner
 1080   <<: *freebsd_11_amd64_image
 1081   <<: *build_job
 1082 
 1083 system:clang:freebsd11:amd64:
 1084   <<: *freebsd_11_amd64_image
 1085   <<: *system_test_job
 1086   variables:
 1087     USER: gitlab-runner
 1088     TEST_PARALLEL_JOBS: 4
 1089   needs:
 1090     - job: clang:freebsd11:amd64
 1091       artifacts: true
 1092 
 1093 unit:clang:freebsd11:amd64:
 1094   <<: *freebsd_11_amd64_image
 1095   <<: *unit_test_job
 1096   needs:
 1097     - job: clang:freebsd11:amd64
 1098       artifacts: true
 1099 
 1100 # Jobs for Clang builds on FreeBSD 12 (amd64)
 1101 
 1102 clang:freebsd12:amd64:
 1103   variables:
 1104     CFLAGS: "${CFLAGS_COMMON}"
 1105     EXTRA_CONFIGURE: "--enable-dnstap"
 1106     USER: gitlab-runner
 1107   <<: *freebsd_12_amd64_image
 1108   <<: *build_job
 1109 
 1110 system:clang:freebsd12:amd64:
 1111   <<: *freebsd_12_amd64_image
 1112   <<: *system_test_job
 1113   variables:
 1114     USER: gitlab-runner
 1115     TEST_PARALLEL_JOBS: 4
 1116   needs:
 1117     - job: clang:freebsd12:amd64
 1118       artifacts: true
 1119 
 1120 unit:clang:freebsd12:amd64:
 1121   <<: *freebsd_12_amd64_image
 1122   <<: *unit_test_job
 1123   needs:
 1124     - job: clang:freebsd12:amd64
 1125       artifacts: true
 1126 
 1127 # Jobs for Clang builds on OpenBSD (amd64)
 1128 
 1129 clang:openbsd:amd64:
 1130   variables:
 1131     CC: clang
 1132     USER: gitlab-runner
 1133   <<: *openbsd_amd64_image
 1134   <<: *build_job
 1135 
 1136 system:clang:openbsd:amd64:
 1137   <<: *openbsd_amd64_image
 1138   <<: *system_test_job
 1139   variables:
 1140     USER: gitlab-runner
 1141   needs:
 1142     - job: clang:openbsd:amd64
 1143       artifacts: true
 1144   only:
 1145     - schedules
 1146     - web
 1147 
 1148 # Jobs with libtool disabled
 1149 
 1150 nolibtool:sid:amd64:
 1151   variables:
 1152     CC: gcc
 1153     CFLAGS: "${CFLAGS_COMMON}"
 1154     EXTRA_CONFIGURE: "--with-libidn2 --without-libtool --with-dlopen"
 1155   <<: *debian_sid_amd64_image
 1156   <<: *build_job
 1157 
 1158 system:nolibtool:sid:amd64:
 1159   <<: *debian_sid_amd64_image
 1160   <<: *system_test_job
 1161   needs:
 1162     - job: nolibtool:sid:amd64
 1163       artifacts: true
 1164 
 1165 unit:nolibtool:sid:amd64:
 1166   <<: *debian_sid_amd64_image
 1167   <<: *unit_test_job
 1168   needs:
 1169     - job: nolibtool:sid:amd64
 1170       artifacts: true
 1171 
 1172 # Jobs for Visual Studio 2017 builds on Windows (amd64)
 1173 
 1174 msvc:windows:amd64:
 1175   <<: *windows_build_job
 1176   <<: *default_triggering_rules
 1177   variables:
 1178     VSCONF: Release
 1179 
 1180 system:msvc:windows:amd64:
 1181   <<: *windows_system_test_job
 1182   variables:
 1183     VSCONF: Release
 1184   needs:
 1185     - job: msvc:windows:amd64
 1186       artifacts: true
 1187 
 1188 msvc-debug:windows:amd64:
 1189   <<: *windows_build_job
 1190   variables:
 1191     VSCONF: Debug
 1192   only:
 1193     - schedules
 1194     - tags
 1195     - web
 1196 
 1197 system:msvc-debug:windows:amd64:
 1198   <<: *windows_system_test_job
 1199   variables:
 1200     VSCONF: Debug
 1201   needs:
 1202     - job: msvc-debug:windows:amd64
 1203       artifacts: true
 1204 
 1205 # Job producing a release tarball
 1206 
 1207 release:
 1208   <<: *base_image
 1209   stage: release
 1210   script:
 1211     # Determine BIND version
 1212     - source version
 1213     - export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
 1214     # Remove redundant files and system test utilities from Windows build artifacts
 1215     - find Build/Release/ -name "*.pdb" -print -delete
 1216     - find Build/Debug/ \( -name "*.bsc" -o -name "*.idb" \) -print -delete
 1217     - 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
 1218     # Create Windows zips
 1219     - openssl dgst -sha256 "${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" | tee Build/Release/SHA256 Build/Debug/SHA256
 1220     - ( cd Build/Release; zip "../../BIND${BIND_DIRECTORY#bind-}.x64.zip" * )
 1221     - ( cd Build/Debug; zip "../../BIND${BIND_DIRECTORY#bind-}.debug.x64.zip" * )
 1222     # Prepare release tarball contents (tarballs + zips + documentation)
 1223     - mkdir -p release/doc/arm
 1224     - pushd release
 1225     - mv "../${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" ../BIND*.zip .
 1226     - tar --extract --file="${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}"
 1227     - mv "${BIND_DIRECTORY}"/{CHANGES*,COPYRIGHT,LICENSE,README,srcid} .
 1228     - mv "${BIND_DIRECTORY}"/doc/arm/{Bv9ARM{*.html,.pdf},man.*,notes.{html,pdf,txt}} doc/arm/
 1229     - rm -rf "${BIND_DIRECTORY}"
 1230     - cp doc/arm/notes.html "RELEASE-NOTES-${BIND_DIRECTORY}.html"
 1231     - cp doc/arm/notes.pdf "RELEASE-NOTES-${BIND_DIRECTORY}.pdf"
 1232     - cp doc/arm/notes.txt "RELEASE-NOTES-${BIND_DIRECTORY}.txt"
 1233     - popd
 1234     # Create release tarball
 1235     - tar --create --file="${CI_COMMIT_TAG}.tar.gz" --gzip release/
 1236   needs:
 1237     - job: tarball-create
 1238       artifacts: true
 1239     - job: msvc:windows:amd64
 1240       artifacts: true
 1241     - job: msvc-debug:windows:amd64
 1242       artifacts: true
 1243   only:
 1244     - tags
 1245   artifacts:
 1246     paths:
 1247       - "*.tar.gz"
 1248     expire_in: "1 day"
 1249 
 1250 # Coverity Scan analysis upload
 1251 
 1252 .coverity_cache_prep: &coverity_cache_prep |
 1253   test -f cov-analysis-linux64.md5 && test -f cov-analysis-linux64.tgz || (
 1254   curl --output cov-analysis-linux64.md5 https://scan.coverity.com/download/linux64 \
 1255        --form project=$COVERITY_SCAN_PROJECT_NAME \
 1256        --form token=$COVERITY_SCAN_TOKEN \
 1257        --form md5=1
 1258   curl --output cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64 \
 1259        --form project=$COVERITY_SCAN_PROJECT_NAME \
 1260        --form token=$COVERITY_SCAN_TOKEN
 1261   )
 1262   test "$(md5sum cov-analysis-linux64.tgz | awk '{ print $1 }')" = "$(cat cov-analysis-linux64.md5)"
 1263   tar --extract --gzip --file=cov-analysis-linux64.tgz
 1264   test -d cov-analysis-linux64-2019.03
 1265 
 1266 .coverity_build: &coverity_build |
 1267   cov-analysis-linux64-2019.03/bin/cov-build --dir cov-int sh -c 'make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1'
 1268   tar --create --gzip --file=cov-int.tar.gz cov-int/
 1269   curl -v https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME \
 1270        --form token=$COVERITY_SCAN_TOKEN \
 1271        --form email=bind-changes@isc.org \
 1272        --form file=@cov-int.tar.gz \
 1273        --form version="$(git rev-parse --short HEAD)" \
 1274        --form description="$(git rev-parse --short HEAD) / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID" 2>&1 \
 1275        | tee curl-response.txt
 1276   grep -q 'Build successfully submitted' curl-response.txt
 1277 
 1278 coverity:
 1279   <<: *base_image
 1280   stage: postcheck
 1281   variables:
 1282     CC: gcc
 1283     CFLAGS: "${CFLAGS_COMMON} -Og"
 1284     EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
 1285   script:
 1286     - *coverity_cache_prep
 1287     - *configure
 1288     - *coverity_build
 1289   needs:
 1290     - job: autoreconf
 1291       artifacts: true
 1292   artifacts:
 1293     paths:
 1294       - curl-response.txt
 1295       - cov-int.tar.gz
 1296     expire_in: "1 week"
 1297     when: on_failure
 1298   only:
 1299     variables:
 1300       - $COVERITY_SCAN_PROJECT_NAME
 1301       - $COVERITY_SCAN_TOKEN
 1302   cache:
 1303     key: cov-analysis-linux64-2019.03
 1304     paths:
 1305       - cov-analysis-linux64.md5
 1306       - cov-analysis-linux64.tgz
 1307 
 1308 # Respdiff test
 1309 
 1310 respdiff:
 1311   <<: *base_image
 1312   stage: system
 1313   variables:
 1314     CC: gcc
 1315     CFLAGS: "${CFLAGS_COMMON} -Og"
 1316     BIND_BASELINE_VERSION: v9_11_3
 1317   script:
 1318     - ./configure --without-make-clean
 1319     - make -j${BUILD_PARALLEL_JOBS:-1} V=1
 1320     - *setup_interfaces
 1321     - git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.isc.org/isc-private/bind-qa.git
 1322     - git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind
 1323     - cd refbind/
 1324     - ./configure --without-make-clean
 1325     - make -j${BUILD_PARALLEL_JOBS:-1} V=1
 1326     - cd ../bind-qa/bind9/respdiff
 1327     - bash respdiff.sh -q "${PWD}/100k_mixed.txt" -c 3 -w "${PWD}/rspworkdir" "${CI_PROJECT_DIR}/refbind" "${CI_PROJECT_DIR}"
 1328   needs:
 1329     - job: tarball-create
 1330       artifacts: true
 1331   only:
 1332     - tags
 1333   artifacts:
 1334     paths:
 1335       - refbind
 1336     untracked: true
 1337     expire_in: "1 day"
 1338     when: on_failure
 1339 
 1340 # ABI check
 1341 
 1342 abi-check:
 1343   <<: *base_image
 1344   stage: build
 1345   needs:
 1346     - job: autoreconf
 1347       artifacts: true
 1348   variables:
 1349     CC: gcc
 1350     CFLAGS: "${CFLAGS_COMMON} -Og"
 1351     EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
 1352     BIND_BASELINE_VERSION: v9_11_22
 1353   script:
 1354     - *configure
 1355     - make -j${BUILD_PARALLEL_JOBS:-1} V=1
 1356     - git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind
 1357     - cd refbind/
 1358     - *configure
 1359     - make -j${BUILD_PARALLEL_JOBS:-1} V=1
 1360     - cd ..
 1361     - util/api-checker.sh . refbind
 1362   artifacts:
 1363     paths:
 1364       - "*-lib*.html"
 1365       - "*-lib*.txt"
 1366       - "abi-*.dump"
 1367     expire_in: "1 week"
 1368   only:
 1369     - main@isc-projects/bind9
 1370     - /^v9_[1-9][0-9]$/@isc-projects/bind9
 1371 
 1372 gcov:
 1373   <<: *base_image
 1374   stage: build
 1375   needs:
 1376     - job: autoreconf
 1377       artifacts: true
 1378   variables:
 1379     CC: gcc
 1380     CFLAGS: "${CFLAGS_COMMON} --coverage -O0"
 1381     EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
 1382   script:
 1383     - *configure
 1384     - *setup_interfaces
 1385     - *setup_softhsm
 1386     - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
 1387     - make -k unit || true
 1388     - make -C bin/tests/system -j${TEST_PARALLEL_JOBS:-1} -k test V=1 || true
 1389     # *.gcno and *.gcda files generated for shared library objects are created
 1390     # in directories in which gcovr is unable to process them properly
 1391     # (.../.libs/...).  Move such *.gcno and *.gcda files one level higher.
 1392     - find . -regex ".*/\.libs/.*\.\(gcda\|gcno\)" -execdir mv "{}" .. \;
 1393     # Help gcovr process the nasty tricks in lib/dns/code.h, where we include C
 1394     # source files from lib/dns/rdata/*/, using an even nastier trick.
 1395     - find lib/dns/rdata/* -name "*.c" -execdir cp -f "{}" ../../ \;
 1396     # These drivers are built into bin/named/named in a way which trips up
 1397     # gcovr.  Copy them to where gcovr expects them.
 1398     - cp contrib/dlz/drivers/dlz_drivers.c contrib/dlz/drivers/dlz_filesystem_driver.c contrib/dlz/drivers/sdlz_helper.c bin/named/
 1399     # The same reasoning applies for some libisc source files.
 1400     - cp lib/isc/app_api.c lib/isc/socket_api.c lib/isc/unix/
 1401     - cp lib/isc/x86_64/include/isc/atomic.h lib/dns/
 1402     - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories libltdl --exclude-directories lib/samples --exclude 'lib/.*/tests/.*' --html-details -o coverage.html
 1403     - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories libltdl --exclude-directories lib/samples --exclude 'lib/.*/tests/.*' -o coverage.txt
 1404     - tail -n 3 coverage.txt
 1405   artifacts:
 1406     paths:
 1407       - coverage*.html
 1408   only:
 1409     - main@isc-projects/bind9
 1410     - /^v9_[1-9][0-9]$/@isc-projects/bind9