From 3b54a8af179044ea02d7cc82597f1cfe08f30172 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Thu, 15 Apr 2021 14:18:35 +0000 Subject: [PATCH] ci: share ccache directory between branches --- utils/tests/gitlab-ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/utils/tests/gitlab-ci.yml b/utils/tests/gitlab-ci.yml index c8006c1c7..166dd5b04 100644 --- a/utils/tests/gitlab-ci.yml +++ b/utils/tests/gitlab-ci.yml @@ -41,7 +41,15 @@ stages: - ./waf - if [ "$MODE" != "debug" ]; then ./test.py --nowaf; fi cache: - key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + # Use separate key for each (debug/optimized/release) jobs because + # they run in parallel and will otherwise overwrite each other + # cache when they upload the cache archive at the end of the job, + # resulting in only the cache for the last finished configuration + # being stored. + # + # Do not distinguish between branches though to avoid + # recompilation of all the files when a new branch is created. + key: "$CI_JOB_NAME" paths: - $CCACHE_BASEDIR_VALUE/ timeout: 9h