From: Michel Dänzer Date: Wed, 20 Nov 2019 08:11:35 +0000 (+0100) Subject: gitlab-ci: Directly use host-mapped directory for ccache X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32618ee719290da5e2c0d11ba8a6a8880c680b4a;p=mesa.git gitlab-ci: Directly use host-mapped directory for ccache Use hardcoded /cache/mesa/ccache for the cache, so it will be shared by all jobs of all Mesa projects running on the same runner host. This should increase the hit rate and decrease the worst case storage used. Further benefits of directly using a host-mapped directory: * Saves up to ~1 minute per job for restoring and saving the cache contents via the GitLab CI cache mechanism * Cache contents generated by failed jobs are no longer lost * Jobs running in parallel on the same runner host can get hits from each other Also enable compression, so the default maximum cache size of 5G might be sufficient. v2: * Move CCACHE_DIR variable to the .build-linux template Suggested-by: Eric Anholt Reviewed-by: Eric Anholt # v1 --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 012a6d79f25..849331ced1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -166,22 +166,16 @@ arm_test: # Just Linux .build-linux: extends: .build-common - cache: - key: ${CI_JOB_NAME} - paths: - - ccache variables: CCACHE_COMPILERCHECK: "content" + CCACHE_COMPRESS: "true" + CCACHE_DIR: /cache/mesa/ccache # Use ccache transparently, and print stats before/after before_script: - export PATH="/usr/lib/ccache:$PATH" - export CCACHE_BASEDIR="$PWD" - - export CCACHE_DIR="$PWD/ccache" - - ccache --max-size=1500M - - ccache --zero-stats || true - - ccache --show-stats || true + - ccache --show-stats after_script: - - export CCACHE_DIR="$PWD/ccache" - ccache --show-stats .build-windows: