From 2f4845e96896dde34bbc9c0e97bf4a53c96462db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Mon, 5 Mar 2018 16:54:37 +0100 Subject: [PATCH 1/5] chg: dev: Compile BIND with ATF enabled, so unit tests are executed in test stage. This needs ATF, Kyuo (and deps) available in the docker images. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 04135df632..2a394a2b62 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -88,7 +88,7 @@ stages: - export CCACHE_DIR="$CI_PROJECT_DIR/.ccache" - ./autogen.sh script: - - ./configure --with-libtool --disable-static + - ./configure --with-libtool --disable-static --with-atf=/usr/local - make -j6 -k all V=1 artifacts: expire_in: '1 hour' From 7d1738785ff2bbb301c63295a0d717b8bcc88930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 8 Mar 2018 10:22:05 -0400 Subject: [PATCH 2/5] Enable developer mode in the GitLab CI builds --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a394a2b62..2dc7ecd4ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -88,7 +88,7 @@ stages: - export CCACHE_DIR="$CI_PROJECT_DIR/.ccache" - ./autogen.sh script: - - ./configure --with-libtool --disable-static --with-atf=/usr/local + - ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local - make -j6 -k all V=1 artifacts: expire_in: '1 hour' From a35e456b099de87db99341cbe1a4f2de72cc7253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 8 Mar 2018 10:29:07 -0400 Subject: [PATCH 3/5] Split system and unit tests into separate CI jobs --- .gitlab-ci.yml | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2dc7ecd4ac..f10063da45 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,12 +98,21 @@ stages: paths: - .ccache/ -.test: &test_job +.system_test: &system_test_job stage: test before_script: - bash -x bin/tests/system/ifconfig.sh up script: - - make -j8 -k check V=1 + - cd bin/tests && make -j8 -k test V=1 + artifacts: + untracked: true + expire_in: '1 week' + when: on_failure + +.unit_test: &unit_test_job + stage: test + script: + - make unit artifacts: untracked: true expire_in: '1 week' @@ -155,14 +164,26 @@ build:debian:sid:i386: <<: *debian_sid_i386_image <<: *build_job -test:debian:sid:amd64: +unittest:debian:sid:amd64: <<: *debian_sid_amd64_image - <<: *test_job + <<: *unit_test_job dependencies: - build:debian:sid:amd64 -test:debian:sid:i386: +unittest:debian:sid:i386: <<: *debian_sid_i386_image - <<: *test_job + <<: *unit_test_job + dependencies: + - build:debian:sid:i386 + +systemtest:debian:sid:amd64: + <<: *debian_sid_amd64_image + <<: *system_test_job + dependencies: + - build:debian:sid:amd64 + +systemtest:debian:sid:i386: + <<: *debian_sid_i386_image + <<: *system_test_job dependencies: - build:debian:sid:i386 From 51fd3e631b0188583a867f8dd904a2f4c3ae112e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Fri, 9 Mar 2018 09:24:41 -0400 Subject: [PATCH 4/5] Use runner specific ccache directory --- .gitlab-ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f10063da45..b4685ae71c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ variables: LC_ALL: C DOCKER_DRIVER: overlay2 CI_REGISTRY_IMAGE: oerdnj/bind9 + CCACHE_DIR: "/ccache" stages: - precheck @@ -85,7 +86,6 @@ stages: stage: build before_script: - export PATH="/usr/lib/ccache:$PATH" - - export CCACHE_DIR="$CI_PROJECT_DIR/.ccache" - ./autogen.sh script: - ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local @@ -93,10 +93,6 @@ stages: artifacts: expire_in: '1 hour' untracked: true - cache: - key: ccache - paths: - - .ccache/ .system_test: &system_test_job stage: test From 69ef7e53a4149ca9751c343c50c6eb324884f9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Fri, 9 Mar 2018 09:30:19 -0400 Subject: [PATCH 5/5] Use runner specific make parallel build settings --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4685ae71c..2399b6a60d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -89,7 +89,7 @@ stages: - ./autogen.sh script: - ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local - - make -j6 -k all V=1 + - make -j${BUILD_PARALLEL_JOBS:-2} -k all V=1 artifacts: expire_in: '1 hour' untracked: true @@ -99,7 +99,7 @@ stages: before_script: - bash -x bin/tests/system/ifconfig.sh up script: - - cd bin/tests && make -j8 -k test V=1 + - cd bin/tests && make -j${TEST_PARALLEL_JOBS:-4} -k test V=1 artifacts: untracked: true expire_in: '1 week'