From: Michał Kępień Date: Wed, 11 Dec 2019 11:04:29 +0000 (+0100) Subject: Create and test BIND source tarballs in GitLab CI X-Git-Tag: v9.15.7~11^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d567490460c2ef6b00bc505793f31c06718fee2;p=thirdparty%2Fbind9.git Create and test BIND source tarballs in GitLab CI Add a set of jobs to GitLab CI that create a BIND source tarball and then build and test its contents. Run those extra jobs only when a tag is pushed to the Git repository as they are only meant to be sanity checks of BIND source tarball contents. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c72d8b52eaa..60587ff5f41 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,9 @@ variables: CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra + TARBALL_COMPRESSOR: xz + TARBALL_EXTENSION: xz + stages: - precheck - build @@ -318,6 +321,23 @@ misc:sid:amd64: - util/check-cocci - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi +tarball-create:sid:amd64: + <<: *debian_sid_amd64_image + stage: precheck + script: + - source version + - export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}" + - git archive --prefix="${BIND_DIRECTORY}/" --output="${BIND_DIRECTORY}.tar" HEAD + - mkdir "${BIND_DIRECTORY}" + - echo "SRCID=$(git rev-list --max-count=1 HEAD | cut -b1-7)" > "${BIND_DIRECTORY}/srcid" + - tar --append --file="${BIND_DIRECTORY}.tar" "${BIND_DIRECTORY}/srcid" + - ${TARBALL_COMPRESSOR} "${BIND_DIRECTORY}.tar" + artifacts: + paths: + - bind-*.tar.${TARBALL_EXTENSION} + only: + - tags + # Jobs for doc builds on Debian Sid (amd64) docs:sid:amd64: @@ -578,6 +598,48 @@ cppcheck:gcc:sid:amd64: - gcc:sid:amd64 needs: ["gcc:sid:amd64"] +# Jobs for tarball GCC builds on Debian Sid (amd64) + +tarball:sid:amd64: + variables: + CC: gcc + EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2" + RUN_MAKE_INSTALL: 1 + <<: *debian_sid_amd64_image + <<: *build_job + before_script: + - tar --extract --file bind-*.tar.${TARBALL_EXTENSION} + - rm -f bind-*.tar.${TARBALL_EXTENSION} + - cd bind-* + dependencies: + - tarball-create:sid:amd64 + needs: ["tarball-create:sid:amd64"] + only: + - tags + +system:tarball:sid:amd64: + <<: *debian_sid_amd64_image + <<: *system_test_job + before_script: + - cd bind-* + - *setup_interfaces + dependencies: + - tarball:sid:amd64 + needs: ["tarball:sid:amd64"] + only: + - tags + +unit:tarball:sid:amd64: + <<: *debian_sid_amd64_image + <<: *unit_test_job + before_script: + - cd bind-* + dependencies: + - tarball:sid:amd64 + needs: ["tarball:sid:amd64"] + only: + - tags + # Jobs for regular GCC builds on Debian Sid (i386) gcc:sid:i386: