From 32618ee719290da5e2c0d11ba8a6a8880c680b4a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Wed, 20 Nov 2019 09:11:35 +0100 Subject: [PATCH] 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 --- .gitlab-ci.yml | 12 +++--------- 1 file 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: -- 2.30.2