diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1072902ae3dc7a280050043504298c26b11f1231..71c4fb9ba4fc9970ceef147178ff77de554ab483 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,23 +6,26 @@ variables: CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9 CCACHE_DIR: "/ccache" + SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf" + OPENSSL_ENGINES: "/usr/lib/x86_64-linux-gnu/engines-1.1" + DEFAULT_OPENSSL_CONF: "/etc/ssl/openssl.cnf" + OPENSSL_CONF: "/var/tmp/etc/openssl.cnf" GIT_DEPTH: 1 BUILD_PARALLEL_JOBS: 6 TEST_PARALLEL_JOBS: 6 CONFIGURE: ./configure - CLANG_VERSION: 14 - CLANG: "clang-${CLANG_VERSION}" - SCAN_BUILD: "scan-build-${CLANG_VERSION}" - ASAN_SYMBOLIZER_PATH: "/usr/lib/llvm-${CLANG_VERSION}/bin/llvm-symbolizer" - CLANG_FORMAT: "clang-format-${CLANG_VERSION}" + CLANG: clang-13 + SCAN_BUILD: scan-build-13 + ASAN_SYMBOLIZER_PATH: /usr/lib/llvm-13/bin/llvm-symbolizer + CLANG_FORMAT: clang-format-13 - CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra + CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra # Pass run-time flags to AddressSanitizer to get core dumps on error. ASAN_OPTIONS: abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1 - TSAN_OPTIONS_COMMON: "disable_coredump=0 second_deadlock_stack=1 history_size=7 log_exe_name=true log_path=tsan" + TSAN_OPTIONS_COMMON: "disable_coredump=0 second_deadlock_stack=1 history_size=7 log_exe_name=true log_path=tsan external_symbolizer_path=/usr/lib/llvm-12/bin/llvm-symbolizer" TARBALL_EXTENSION: xz @@ -62,6 +65,7 @@ stages: - system - performance - docs + - push - postcheck - release @@ -102,8 +106,8 @@ stages: # Alpine Linux -.alpine-3.16-amd64: &alpine_3_16_amd64_image - image: "$CI_REGISTRY_IMAGE:alpine-3.16-amd64" +.alpine-3.15-amd64: &alpine_3_15_amd64_image + image: "$CI_REGISTRY_IMAGE:alpine-3.15-amd64" <<: *linux_amd64 # Oracle Linux @@ -116,11 +120,15 @@ stages: image: "$CI_REGISTRY_IMAGE:oraclelinux-8-amd64" <<: *linux_amd64 -.oraclelinux-9-amd64: &oraclelinux_9_amd64_image - image: "$CI_REGISTRY_IMAGE:oraclelinux-9-amd64" +# Debian + +.debian-stretch-amd64: &debian_stretch_amd64_image + image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64" <<: *linux_amd64 -# Debian +.debian-buster-amd64: &debian_buster_amd64_image + image: "$CI_REGISTRY_IMAGE:debian-buster-amd64" + <<: *linux_amd64 .debian-bullseye-amd64: &debian_bullseye_amd64_image image: "$CI_REGISTRY_IMAGE:debian-bullseye-amd64" @@ -142,22 +150,22 @@ stages: # Fedora -.fedora-36-amd64: &fedora_36_amd64_image - image: "$CI_REGISTRY_IMAGE:fedora-36-amd64" +.fedora-35-amd64: &fedora_35_amd64_image + image: "$CI_REGISTRY_IMAGE:fedora-35-amd64" <<: *linux_amd64 -.fedora-36-arm64: &fedora_36_arm64_image - image: "$CI_REGISTRY_IMAGE:fedora-36-arm64" +.fedora-35-arm64: &fedora_35_arm64_image + image: "$CI_REGISTRY_IMAGE:fedora-35-arm64" <<: *linux_stress_arm64 # Ubuntu -.ubuntu-focal-amd64: &ubuntu_focal_amd64_image - image: "$CI_REGISTRY_IMAGE:ubuntu-focal-amd64" +.ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image + image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64" <<: *linux_amd64 -.ubuntu-jammy-amd64: &ubuntu_jammy_amd64_image - image: "$CI_REGISTRY_IMAGE:ubuntu-jammy-amd64" +.ubuntu-focal-amd64: &ubuntu_focal_amd64_image + image: "$CI_REGISTRY_IMAGE:ubuntu-focal-amd64" <<: *linux_amd64 # Base image @@ -173,46 +181,16 @@ stages: <<: *libvirt_amd64 .freebsd-13-amd64: &freebsd_13_amd64_image - image: "freebsd-13.1-x86_64" + image: "freebsd-13.0-x86_64" <<: *libvirt_amd64 .openbsd-amd64: &openbsd_amd64_image - image: "openbsd-7.1-x86_64" + image: "openbsd-7.0-x86_64" <<: *libvirt_amd64 ### Job Templates -.api-schedules-tags-triggers-web-triggering-rules: &api_schedules_tags_triggers_web_triggering_rules - only: - - api - - schedules - - tags - - triggers - - web - -.api-schedules-triggers-web-triggering-rules: &api_schedules_triggers_web_triggering_rules - only: - - api - - schedules - - triggers - - web - -.default-triggering-rules: &default_triggering_rules - only: - - api - - merge_requests - - schedules - - tags - - triggers - - web - -.precheck: &precheck_job - <<: *default_triggering_rules - <<: *base_image - stage: precheck - .autoconf: &autoconf_job - <<: *default_triggering_rules <<: *base_image stage: autoconf script: @@ -230,15 +208,9 @@ stages: --with-cmocka --with-libxml2 --with-json-c - --enable-leak-detection $EXTRA_CONFIGURE || (test -s config.log && cat config.log; exit 1) -# change directory to the workspace before including this -.find_python: &find_python - - PYTHON="$(source bin/tests/system/conf.sh; echo $PYTHON)" - - test -x "$PYTHON" - .check_readline_setup: &check_readline_setup - if [[ -n "${WITHOUT_READLINE}" ]]; then ! grep "^#define HAVE_READLINE" config.h; @@ -260,8 +232,19 @@ stages: - rm -f bind-*.tar.${TARBALL_EXTENSION} - cd bind-* +# Move the out-of-tree workspace to CI project dir to save it for use in +# dependent jobs. +.save_out_of_tree_workspace: &save_out_of_tree_workspace + - test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}" + +# Move the artifacts from the out-of-tree build job to their original +# location (the out-of-tree workspace) and then continue work in the +# out-of-tree workspace. +.retrieve_out_of_tree_workspace: &retrieve_out_of_tree_workspace + - test -n "${OUT_OF_TREE_WORKSPACE}" && mv "$(basename "${OUT_OF_TREE_WORKSPACE}")" "${OUT_OF_TREE_WORKSPACE}" + - test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}" + .build: &build_job - <<: *default_triggering_rules stage: build before_script: - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}" @@ -277,7 +260,8 @@ stages: - test -z "${CROSS_COMPILATION}" || file lib/dns/gen | grep -F -q "ELF 64-bit LSB" - test -z "${CROSS_COMPILATION}" || ( ! git ls-files -z --others --exclude lib/dns/gen | xargs -0 file | grep "ELF 64-bit LSB" ) - if test -z "${OUT_OF_TREE_WORKSPACE}" && test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi - - bin/named/named -V + after_script: + - *save_out_of_tree_workspace needs: - job: autoreconf artifacts: true @@ -286,135 +270,19 @@ stages: expire_in: "1 day" when: always -.setup_interfaces: &setup_interfaces - - if [ "$(id -u)" -eq "0" ]; then - sh -x bin/tests/system/ifconfig.sh up; - else - sudo sh -x bin/tests/system/ifconfig.sh up; - fi - -.system_test_common: &system_test_common - <<: *default_triggering_rules - stage: system - before_script: - - test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}" - - *setup_interfaces - script: - - cd bin/tests/system - - make -j${TEST_PARALLEL_JOBS:-1} -k check V=1 - - if git rev-parse > /dev/null 2>&1; then ( ! grep "^I:.*:file.*not removed$" *.log ); fi - after_script: - - test -d bind-* && cd bind-* - - REALSOURCEDIR="$PWD" - - test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}" - - cat bin/tests/system/test-suite.log - - *find_python - - > - "$PYTHON" "$REALSOURCEDIR"/bin/tests/convert-trs-to-junit.py . > "$CI_PROJECT_DIR"/junit.xml - -.system_test: &system_test_job - <<: *system_test_common - artifacts: - untracked: true - expire_in: "1 day" - when: always - reports: - junit: junit.xml - -.system_test_gcov: &system_test_gcov_job - <<: *system_test_common - artifacts: - untracked: true - expire_in: "1 day" - when: always - -.system_test_tsan: &system_test_tsan_job - <<: *system_test_common - after_script: - - cat bin/tests/system/test-suite.log - - *find_python - - find -name 'tsan.*' -exec "$PYTHON" util/parse_tsan.py {} \; - - > - "$PYTHON" bin/tests/convert-trs-to-junit.py . > "$CI_PROJECT_DIR"/junit.xml - artifacts: - untracked: true - expire_in: "1 day" - when: always - reports: - junit: junit.xml - -.unit_test_common: &unit_test_common - <<: *default_triggering_rules - stage: unit - before_script: - - test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}" - script: - - make -j${TEST_PARALLEL_JOBS:-1} -k unit V=1 - after_script: - - test -d bind-* && cd bind-* - - REALSOURCEDIR="$PWD" - - test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}" - - *find_python - - > - "$PYTHON" "$REALSOURCEDIR"/bin/tests/convert-trs-to-junit.py . > "$CI_PROJECT_DIR"/junit.xml - -.unit_test: &unit_test_job - <<: *unit_test_common - artifacts: - untracked: true - expire_in: "1 day" - when: always - reports: - junit: junit.xml - -.unit_test_gcov: &unit_test_gcov_job - <<: *unit_test_common - artifacts: - untracked: true - expire_in: "1 day" - when: always - -.unit_test_tsan: &unit_test_tsan_job - <<: *unit_test_common - after_script: - - *find_python - - find -name 'tsan.*' -exec "$PYTHON" util/parse_tsan.py {} \; - - > - "$PYTHON" bin/tests/convert-trs-to-junit.py . > "$CI_PROJECT_DIR"/junit.xml - artifacts: - untracked: true - expire_in: "1 day" - when: always - reports: - junit: junit.xml - .docs: &docs_job stage: docs script: - *configure - make -j${BUILD_PARALLEL_JOBS:-1} -k doc V=1 - - qpdf --check doc/arm/_build/latex/Bv9ARM.pdf - - find doc/man/ -maxdepth 1 -name "*.[0-9]" -exec mandoc -T lint "{}" \; | ( ! grep -v -e "skipping paragraph macro. sp after" -e "unknown font, skipping request. ft C" ) - -.respdiff: &respdiff_job - <<: *base_image - stage: system - before_script: - - autoreconf -fi - - *configure - - make -j${BUILD_PARALLEL_JOBS:-1} V=1 - - *setup_interfaces - - git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.isc.org/isc-private/bind-qa.git - - cd bind-qa/bind9/respdiff - needs: [] artifacts: + expire_in: "1 week" paths: - - bind-qa/bind9/respdiff + - doc/ exclude: - - bind-qa/bind9/respdiff/rspworkdir/data.mdb # Exclude a 10 GB file. - untracked: true - expire_in: "1 day" - when: always + - doc/arm/_build/.doctrees/**/* + - doc/arm/_build/epub/**/* + - doc/arm/_build/singlehtml/**/* ### Job Definitions @@ -423,1048 +291,69 @@ stages: autoreconf: <<: *autoconf_job -misc: - <<: *precheck_job - script: - - sh util/checklibs.sh > checklibs.out - - sh util/tabify-changes < CHANGES > CHANGES.tmp - - diff -urNap CHANGES CHANGES.tmp - - perl util/check-changes CHANGES - - sh util/check-line-length.sh CHANGES - - 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 - - test ! -f CHANGES.SE || sh util/check-line-length.sh CHANGES.SE - - rm CHANGES.tmp - - sh util/check-categories.sh - - if git grep SYSTEMTESTTOP -- ':!.gitlab-ci.yml'; then echo 'Please use relative paths instead of $SYSTEMTESTTOP.'; exit 1; fi - - bash util/unused-headers.sh - - bash util/xmllint-html.sh - needs: [] - artifacts: - paths: - - checklibs.out - expire_in: "1 day" - when: on_failure - -black: - <<: *precheck_job - needs: [] - script: - - black $(git ls-files '*.py') - - git diff > black.patch - - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi - artifacts: - paths: - - black.patch - expire_in: "1 week" - when: on_failure - -clang-format: - <<: *precheck_job - needs: [] - script: - - if [ -r .clang-format ]; then "${CLANG_FORMAT}" -i -style=file $(git ls-files '*.c' '*.h'); fi - - git diff > clang-format.patch - - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi - artifacts: - paths: - - clang-format.patch - expire_in: "1 week" - when: on_failure - -coccinelle: - <<: *precheck_job - needs: [] - script: - - util/check-cocci - - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi - -pylint: - <<: *precheck_job - needs: [] - script: - - pylint --rcfile $CI_PROJECT_DIR/.pylintrc $(git ls-files '*.py' | grep -vE '(ans\.py|dangerfile\.py|^bin/tests/system/)') - # Ignore Pylint wrong-import-position error in system test to enable use of pytest.importorskip - - pylint --rcfile $CI_PROJECT_DIR/.pylintrc --disable=wrong-import-position $(git ls-files 'bin/tests/system/*.py' | grep -vE 'ans\.py') - -reuse: - <<: *precheck_job - needs: [] - image: - name: docker.io/fsfe/reuse:latest - entrypoint: [""] - script: - - reuse lint - -danger: - <<: *precheck_job - needs: [] - script: - - danger-python ci -f - only: - refs: - - merge_requests - variables: - - $DANGER_GITLAB_API_TOKEN - -tarball-create: - stage: precheck - <<: *base_image - <<: *default_triggering_rules - script: - - ./configure --enable-maintainer-mode - - make maintainer-clean - - autoreconf -fi - - ./configure --enable-maintainer-mode - - make -j${BUILD_PARALLEL_JOBS:-1} all V=1 - - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; git diff > diff.patch; exit 1; fi - - make -j${BUILD_PARALLEL_JOBS:-1} dist V=1 - artifacts: - paths: - - diff.patch - - bind-*.tar.${TARBALL_EXTENSION} - when: always - needs: - - job: autoreconf - artifacts: true + #flake8: + # <<: *base_image + # stage: postcheck + # needs: + # - job: autoreconf + # artifacts: true + # script: + # - *configure + # - flake8 --max-line-length=80 $(git ls-files '*.py' | grep -vE '(ans\.py|dangerfile\.py|^bin/tests/system/)') + # # Ignore Flake8 E402 error (module level import not at top of file) in system test to enable use of pytest.importorskip + # - flake8 --max-line-length=80 --extend-ignore=E402 $(git ls-files 'bin/tests/system/*.py' | grep -vE 'ans\.py') + # + #pylint: + # <<: *base_image + # stage: postcheck + # needs: + # - job: autoreconf + # artifacts: true + # script: + # - *configure + # - pylint --rcfile $CI_PROJECT_DIR/.pylintrc $(git ls-files '*.py' | grep -vE '(ans\.py|dangerfile\.py|^bin/tests/system/)') + # # Ignore Pylint wrong-import-position error in system test to enable use of pytest.importorskip + # - pylint --rcfile $CI_PROJECT_DIR/.pylintrc --disable=wrong-import-position $(git ls-files 'bin/tests/system/*.py' | grep -vE 'ans\.py') + # + #tarball-create: + # stage: precheck + # <<: *base_image + # script: + # - ./configure --enable-maintainer-mode + # - make maintainer-clean + # - autoreconf -fi + # - ./configure --enable-maintainer-mode + # - make -j${BUILD_PARALLEL_JOBS:-1} all V=1 + # - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi + # - make -j${BUILD_PARALLEL_JOBS:-1} dist V=1 + # artifacts: + # paths: + # - bind-*.tar.${TARBALL_EXTENSION} + # needs: + # - job: autoreconf + # artifacts: true + # allow_failure: true # not to scare Ron - and not to make him touch Makefiles # Jobs for doc builds on Debian 11 "bullseye" (amd64) docs: - <<: *default_triggering_rules - <<: *base_image - <<: *docs_job - needs: - - job: autoreconf - artifacts: true - artifacts: - untracked: true - -docs:tarball: - <<: *default_triggering_rules <<: *base_image <<: *docs_job before_script: - - *unpack_release_tarball - needs: - - job: tarball-create - artifacts: true - -# Jobs for regular GCC builds on Alpine Linux 3.16 (amd64) - -gcc:alpine3.16:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "${WITHOUT_READLINE}" - <<: *alpine_3_16_amd64_image - <<: *build_job - -system:gcc:alpine3.16:amd64: - <<: *alpine_3_16_amd64_image - <<: *system_test_job - needs: - - job: gcc:alpine3.16:amd64 - artifacts: true - -unit:gcc:alpine3.16:amd64: - <<: *alpine_3_16_amd64_image - <<: *unit_test_job - needs: - - job: gcc:alpine3.16:amd64 - artifacts: true - -# Jobs for regular GCC builds on Oracle Linux 7 (amd64) - -gcc:oraclelinux7:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--with-libidn2" - <<: *oraclelinux_7_amd64_image - <<: *build_job - -system:gcc:oraclelinux7:amd64: - <<: *oraclelinux_7_amd64_image - <<: *system_test_job - needs: - - job: gcc:oraclelinux7:amd64 - artifacts: true - -unit:gcc:oraclelinux7:amd64: - <<: *oraclelinux_7_amd64_image - <<: *unit_test_job - needs: - - job: gcc:oraclelinux7:amd64 - artifacts: true - -# Jobs for regular GCC builds on Oracle Linux 8 (amd64) - -gcc:oraclelinux8:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--with-libidn2" - <<: *oraclelinux_8_amd64_image - <<: *build_job - -system:gcc:oraclelinux8:amd64: - <<: *oraclelinux_8_amd64_image - <<: *system_test_job - needs: - - job: gcc:oraclelinux8:amd64 - artifacts: true - -unit:gcc:oraclelinux8:amd64: - <<: *oraclelinux_8_amd64_image - <<: *unit_test_job - needs: - - job: gcc:oraclelinux8:amd64 - artifacts: true - -# Jobs for regular GCC builds on Oracle Linux 9 (amd64) - -gcc:oraclelinux9:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--with-libidn2" - <<: *oraclelinux_9_amd64_image - <<: *build_job - -system:gcc:oraclelinux9:amd64: - <<: *oraclelinux_9_amd64_image - <<: *system_test_job - needs: - - job: gcc:oraclelinux9:amd64 - artifacts: true - -unit:gcc:oraclelinux9:amd64: - <<: *oraclelinux_9_amd64_image - <<: *unit_test_job - needs: - - job: gcc:oraclelinux9:amd64 - artifacts: true - -# Jobs for regular GCC builds on Debian 11 "bullseye" (amd64) -# (The second unit test job also executes unstable unit tests.) - -gcc:bullseye:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON} --coverage -O0" - EXTRA_CONFIGURE: "--with-libidn2 ${WITH_READLINE_LIBEDIT}" - <<: *debian_bullseye_amd64_image - <<: *build_job - -system:gcc:bullseye:amd64: - <<: *debian_bullseye_amd64_image - <<: *system_test_gcov_job - needs: - - job: unit:gcc:bullseye:amd64 - artifacts: true - -system:gcc:bullseye:unstable:amd64: - <<: *debian_bullseye_amd64_image - <<: *system_test_job - <<: *api_schedules_triggers_web_triggering_rules - variables: - CI_ENABLE_ALL_TESTS: 1 - needs: - - job: gcc:bullseye:amd64 - artifacts: true - -unit:gcc:bullseye:amd64: - <<: *debian_bullseye_amd64_image - <<: *unit_test_gcov_job - needs: - - job: gcc:bullseye:amd64 - artifacts: true - -unit:gcc:bullseye:unstable:amd64: - <<: *debian_bullseye_amd64_image - <<: *unit_test_job - <<: *api_schedules_triggers_web_triggering_rules - variables: - CI_ENABLE_ALL_TESTS: 1 - needs: - - job: gcc:bullseye:amd64 - artifacts: true - -# Jobs for cross-compiled GCC builds on Debian 11 "bullseye" (amd64) with -# 32-bit libraries - -gcc:bullseye:amd64cross32: - variables: - CFLAGS: "${CFLAGS_COMMON}" - CROSS_COMPILATION: 1 - EXTRA_CONFIGURE: "--build=x86_64-linux-gnu --host=i686-linux-gnu --with-libidn2 ${WITH_READLINE_LIBEDIT}" - <<: *debian_bullseye_amd64cross32_image - <<: *build_job - -system:gcc:bullseye:amd64cross32: - <<: *debian_bullseye_amd64cross32_image - <<: *system_test_job - needs: - - job: gcc:bullseye:amd64cross32 - artifacts: true - -unit:gcc:bullseye:amd64cross32: - <<: *debian_bullseye_amd64cross32_image - <<: *unit_test_job - needs: - - job: gcc:bullseye:amd64cross32 - artifacts: true - -# Jobs for scan-build builds on Debian 11 "bullseye" (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: - <<: *default_triggering_rules - <<: *base_image - stage: postcheck - variables: - CC: "${CLANG}" - CFLAGS: "${CFLAGS_COMMON}" - CONFIGURE: "${SCAN_BUILD} ./configure" - EXTRA_CONFIGURE: "--with-libidn2" - script: - - *configure - - *scan_build + - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}" needs: - job: autoreconf artifacts: true - artifacts: - paths: - - scan-build.reports/ - expire_in: "1 day" - when: on_failure - -# Jobs for regular GCC builds on Debian "sid" (amd64) -# Also tests configration option: --without-lmdb. - -gcc:sid:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON} -O3 -DOPENSSL_API_COMPAT=10100" - # For the jemalloc ./configure option, see https://gitlab.isc.org/isc-projects/bind9/-/issues/3444 - EXTRA_CONFIGURE: "--with-libidn2 --without-lmdb --without-jemalloc --disable-leak-detection ${WITH_READLINE}" - RUN_MAKE_INSTALL: 1 - <<: *debian_sid_amd64_image - <<: *build_job - -system:gcc:sid:amd64: - # Set up environment variables that allow the "keyfromlabel" system test to be run - variables: - DEFAULT_OPENSSL_CONF: "/etc/ssl/openssl.cnf" - OPENSSL_CONF: "/var/tmp/etc/openssl.cnf" - SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf" - SOFTHSM2_MODULE: "/usr/lib/softhsm/libsofthsm2.so" - <<: *debian_sid_amd64_image - <<: *system_test_job - needs: - - job: gcc:sid:amd64 - artifacts: true - -unit:gcc:sid:amd64: - <<: *debian_sid_amd64_image - <<: *unit_test_job - needs: - - job: gcc:sid:amd64 - artifacts: true - -# Job for out-of-tree GCC build on Debian 11 "bullseye" (amd64) -# Also tests configration option: --with-lmdb. -gcc:out-of-tree: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON} -Og" - CONFIGURE: "${CI_PROJECT_DIR}/configure" - EXTRA_CONFIGURE: "--with-libidn2 --with-lmdb" - RUN_MAKE_INSTALL: 1 - OUT_OF_TREE_WORKSPACE: workspace +pages: + stage: push <<: *base_image - <<: *build_job - -system:gcc:out-of-tree: - variables: - OUT_OF_TREE_WORKSPACE: workspace - needs: - - job: gcc:out-of-tree - artifacts: true - <<: *base_image - <<: *system_test_job - <<: *api_schedules_tags_triggers_web_triggering_rules - -unit:gcc:out-of-tree: - variables: - OUT_OF_TREE_WORKSPACE: workspace - needs: - - job: gcc:out-of-tree - artifacts: true - <<: *base_image - <<: *unit_test_job - <<: *api_schedules_tags_triggers_web_triggering_rules - -# Jobs for tarball GCC builds on Debian 11 "bullseye" (amd64) - -gcc:tarball: - variables: - CC: gcc - EXTRA_CONFIGURE: "--with-libidn2" - RUN_MAKE_INSTALL: 1 - <<: *base_image - <<: *build_job - before_script: - - *unpack_release_tarball - needs: - - job: tarball-create - artifacts: true - -system:gcc:tarball: - <<: *base_image - <<: *system_test_job - <<: *api_schedules_tags_triggers_web_triggering_rules - before_script: - - cd bind-* - - *setup_interfaces - needs: - - job: gcc:tarball - artifacts: true - -unit:gcc:tarball: - <<: *base_image - <<: *unit_test_job - <<: *api_schedules_tags_triggers_web_triggering_rules - before_script: - - cd bind-* - needs: - - job: gcc:tarball - artifacts: true - -# Jobs for debug GCC builds on openSUSE Tumbleweed (amd64) - -gcc:tumbleweed:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON} -DDEBUG" - EXTRA_CONFIGURE: "--with-libidn2 ${WITH_READLINE_READLINE}" - <<: *tumbleweed_latest_amd64_image - <<: *build_job - -system:gcc:tumbleweed:amd64: - <<: *tumbleweed_latest_amd64_image - <<: *system_test_job - needs: - - job: gcc:tumbleweed:amd64 - artifacts: true - -unit:gcc:tumbleweed:amd64: - <<: *tumbleweed_latest_amd64_image - <<: *unit_test_job - needs: - - job: gcc:tumbleweed:amd64 - artifacts: true - -# Jobs for regular GCC builds on Ubuntu 20.04 Focal Fossa (amd64) - -gcc:focal:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON} -Og" - EXTRA_CONFIGURE: "--disable-dnstap --without-cmocka --without-gssapi --with-libidn2" - <<: *ubuntu_focal_amd64_image - <<: *build_job - -system:gcc:focal:amd64: - <<: *ubuntu_focal_amd64_image - <<: *system_test_job - needs: - - job: gcc:focal:amd64 - artifacts: true - -unit:gcc:focal:amd64: - <<: *ubuntu_focal_amd64_image - <<: *unit_test_job - needs: - - job: gcc:focal:amd64 - artifacts: true - -# Jobs for regular GCC builds on Ubuntu 22.04 Jammy Jellyfish (amd64) - -gcc:jammy:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--disable-geoip --with-libidn2 --disable-doh" - <<: *ubuntu_jammy_amd64_image - <<: *build_job - -system:gcc:jammy:amd64: - <<: *ubuntu_jammy_amd64_image - <<: *system_test_job - needs: - - job: gcc:jammy:amd64 - artifacts: true - -unit:gcc:jammy:amd64: - <<: *ubuntu_jammy_amd64_image - <<: *unit_test_job - needs: - - job: gcc:jammy:amd64 - artifacts: true - -# Jobs for ASAN builds on Fedora 36 (amd64) - -gcc:asan: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined" - LDFLAGS: "-fsanitize=address,undefined" - EXTRA_CONFIGURE: "--with-libidn2 --without-jemalloc" - <<: *fedora_36_amd64_image - <<: *build_job - -system:gcc:asan: - variables: - LSAN_OPTIONS: "suppressions=$CI_PROJECT_DIR/suppr-lsan.txt" - <<: *fedora_36_amd64_image - <<: *system_test_job - needs: - - job: gcc:asan - artifacts: true - -unit:gcc:asan: - <<: *fedora_36_amd64_image - <<: *unit_test_job - needs: - - job: gcc:asan - artifacts: true - -clang:asan: - variables: - CC: ${CLANG} - CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined" - LDFLAGS: "-fsanitize=address,undefined" - EXTRA_CONFIGURE: "--with-libidn2 --without-jemalloc" - <<: *base_image - <<: *build_job - -system:clang:asan: - <<: *base_image - <<: *system_test_job - needs: - - job: clang:asan - artifacts: true - -unit:clang:asan: - <<: *base_image - <<: *unit_test_job - needs: - - job: clang:asan - artifacts: true - -# Jobs for TSAN builds on Fedora 36 (amd64) - -gcc:tsan: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON} -fsanitize=thread" - LDFLAGS: "-fsanitize=thread" - EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock --without-jemalloc" - <<: *fedora_36_amd64_image - <<: *build_job - -system:gcc:tsan: - variables: - TSAN_OPTIONS: "${TSAN_OPTIONS_COMMON} external_symbolizer_path=/usr/bin/llvm-symbolizer" - <<: *fedora_36_amd64_image - <<: *system_test_tsan_job - needs: - - job: gcc:tsan - artifacts: true - -unit:gcc:tsan: - variables: - TSAN_OPTIONS: "${TSAN_OPTIONS_COMMON} external_symbolizer_path=/usr/bin/llvm-symbolizer" - <<: *fedora_36_amd64_image - <<: *unit_test_tsan_job - needs: - - job: gcc:tsan - artifacts: true - -clang:tsan: - <<: *base_image - <<: *build_job - variables: - CC: "${CLANG}" - CFLAGS: "${CFLAGS_COMMON} -fsanitize=thread" - LDFLAGS: "-fsanitize=thread" - EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock --without-jemalloc" - -system:clang:tsan: - variables: - TSAN_OPTIONS: "${TSAN_OPTIONS_COMMON} external_symbolizer_path=/usr/lib/llvm-${CLANG_VERSION}/bin/llvm-symbolizer" - <<: *base_image - <<: *system_test_tsan_job - needs: - - job: clang:tsan - artifacts: true - -unit:clang:tsan: - variables: - TSAN_OPTIONS: "${TSAN_OPTIONS_COMMON} external_symbolizer_path=/usr/lib/llvm-${CLANG_VERSION}/bin/llvm-symbolizer suppressions=$CI_PROJECT_DIR/tsan-suppressions.txt" - <<: *base_image - <<: *unit_test_tsan_job - needs: - - job: clang:tsan - artifacts: true - -# Jobs for Clang builds on Debian 11 "bullseye" (amd64) - -clang:bullseye:amd64: - variables: - CC: ${CLANG} - CFLAGS: "${CFLAGS_COMMON} -Wenum-conversion" - # See https://gitlab.isc.org/isc-projects/bind9/-/issues/3444 - EXTRA_CONFIGURE: "--without-jemalloc --disable-leak-detection" - <<: *debian_bullseye_amd64_image - <<: *build_job - -system:clang:bullseye:amd64: - # Set up environment variables that allow the "keyfromlabel" system test to be run - variables: - DEFAULT_OPENSSL_CONF: "/etc/ssl/openssl.cnf" - OPENSSL_CONF: "/var/tmp/etc/openssl.cnf" - SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf" - SOFTHSM2_MODULE: "/usr/lib/softhsm/libsofthsm2.so" - <<: *debian_bullseye_amd64_image - <<: *system_test_job - needs: - - job: clang:bullseye:amd64 - artifacts: true - -unit:clang:bullseye:amd64: - <<: *debian_bullseye_amd64_image - <<: *unit_test_job - needs: - - job: clang:bullseye:amd64 - artifacts: true - -# Jobs for Clang builds on FreeBSD 12 (amd64) - -clang:freebsd12:amd64: - variables: - CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "${WITH_READLINE_EDITLINE}" - USER: gitlab-runner - <<: *freebsd_12_amd64_image - <<: *build_job - -system:clang:freebsd12:amd64: - <<: *freebsd_12_amd64_image - <<: *system_test_job - variables: - USER: gitlab-runner - TEST_PARALLEL_JOBS: 4 - needs: - - job: clang:freebsd12:amd64 - artifacts: true - -unit:clang:freebsd12:amd64: - <<: *freebsd_12_amd64_image - <<: *unit_test_job - needs: - - job: clang:freebsd12:amd64 - artifacts: true - -# Jobs for Clang builds on FreeBSD 13 (amd64) - -clang:freebsd13:amd64: - variables: - CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "${WITH_READLINE_LIBEDIT}" - USER: gitlab-runner - <<: *freebsd_13_amd64_image - <<: *build_job - -system:clang:freebsd13:amd64: - <<: *freebsd_13_amd64_image - <<: *system_test_job - variables: - USER: gitlab-runner - TEST_PARALLEL_JOBS: 4 - needs: - - job: clang:freebsd13:amd64 - artifacts: true - -unit:clang:freebsd13:amd64: - <<: *freebsd_13_amd64_image - <<: *unit_test_job - needs: - - job: clang:freebsd13:amd64 - artifacts: true - -# Jobs for Clang builds on OpenBSD (amd64) - -clang:openbsd:amd64: - variables: - CC: clang - USER: gitlab-runner - EXTRA_CONFIGURE: "--disable-dnstap" - <<: *openbsd_amd64_image - <<: *build_job - -system:clang:openbsd:amd64: - <<: *openbsd_amd64_image - <<: *system_test_job - <<: *api_schedules_triggers_web_triggering_rules - variables: - USER: gitlab-runner - needs: - - job: clang:openbsd:amd64 - artifacts: true - -unit:clang:openbsd:amd64: - <<: *openbsd_amd64_image - <<: *unit_test_job - variables: - USER: gitlab-runner - needs: - - job: clang:openbsd:amd64 - artifacts: true - -# Job producing a release tarball - -release: - <<: *base_image - stage: release script: - - export BIND_DIRECTORY="$(basename "$(find . -name "bind-*.tar.*" -printf "%f")" ".tar.${TARBALL_EXTENSION}")" - # Prepare release tarball contents (tarballs + documentation) - - mkdir -p release/doc/arm - - pushd release - - mv "../${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" . - - tar --extract --file="${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" - - mv "${BIND_DIRECTORY}"/{CHANGES*,COPYRIGHT,LICENSE,README.md,srcid} . - - rm -rf "${BIND_DIRECTORY}" - - mv "../doc/arm/_build/html" doc/arm/ - - mv "../doc/arm/_build/latex/Bv9ARM.pdf" doc/arm/ - - mv "../doc/arm/_build/epub/Bv9ARM.epub" doc/arm/ - - echo '