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