$PWD doesn't work for variables:, it ended up as "/ccache", always
starting with an empty cache.
v2:
* Use relative path and realpath
v3:
* Use $CI_PROJECT_DIR (Eric Anholt)
* Clear ccache stats in before_script if the cache is in $CI_PROJECT_DIR
Fixes: c9df92bf795a "ci: Switch over to an autoscaling GKE cluster for
builds."
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
- export PATH="/usr/lib/ccache:$PATH"
- export CCACHE_BASEDIR="$PWD"
- ccache --max-size="$CCACHE_SIZE" || true
+ - if [ "$CCACHE_DIR" = "$CI_PROJECT_DIR/ccache" ]; then ccache --zero-stats; fi
- ccache --show-stats || true
after_script:
# In case the install dir is being saved as artifacts, tar it up
EXTRA_OPTION: >
-D I-love-half-baked-turnips=true
NINJA_FLAGS: "-j4"
- CCACHE_DIR: "$PWD/ccache"
+ CCACHE_DIR: "$CI_PROJECT_DIR/ccache"
CCACHE_SIZE: "1500M"
needs:
- debian-10:arm64