diff options
author | Michel Dänzer <[email protected]> | 2019-11-20 09:11:35 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2019-11-21 10:13:43 +0100 |
commit | 32618ee719290da5e2c0d11ba8a6a8880c680b4a (patch) | |
tree | 7e58e949281d896e72dea39ada3309064e958e75 | |
parent | 0d1085ac4a6d87ed13fce0c86858b8adabeeefe1 (diff) |
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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]> # v1
-rw-r--r-- | .gitlab-ci.yml | 12 |
1 files changed, 3 insertions, 9 deletions
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: |