From 09004c25a8e99043f232d647a672094ff7445105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Fri, 9 Mar 2018 14:09:26 +0100 Subject: [PATCH 1/2] Tweak the way ccache is used during CI Our current CI configuration causes ccache data to be zipped after each job and also included in build artifacts, which will quickly become infeasible as ccache data grows. Instead of asking gitlab-runner to preserve ccache data between jobs, keep a separate ccache directory on each runner, expecting it to be accessible at /ccache when a CI job is run. As this requires gitlab-runner to be configured in a specific way, do not use ccache at all in case the ccache directory is not found while building. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2399b6a60d..e05008b041 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,7 +85,7 @@ stages: .build: &build_job stage: build before_script: - - export PATH="/usr/lib/ccache:$PATH" + - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}" - ./autogen.sh script: - ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local From c330c65e7728351e1077ed8679f248b12ff1a54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Fri, 9 Mar 2018 14:09:28 +0100 Subject: [PATCH 2/2] Enable runner-specific make concurrency settings Using fixed make concurrency settings on all runners is not flexible and requires .gitlab-ci.yml to be modified each time tweaking these settings is needed. Use environment variables which are expected to be set by the runner (defaulting to 1 in case they are not set) for controlling make concurrency. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e05008b041..34c39b5b11 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 -j${BUILD_PARALLEL_JOBS:-2} -k all V=1 + - make -j${PARALLEL_JOBS_BUILD:-1} -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 -j${TEST_PARALLEL_JOBS:-4} -k test V=1 + - cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 artifacts: untracked: true expire_in: '1 week'