summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-03-09 11:02:47 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-03-09 11:07:23 +0000
commit18b9ba5602121c75f184f29e5b3e70bd7d4779c4 (patch)
treeec495791f94273c82d53ab1d161c0ff6e9cda411 /.gitlab
parent3cf75ede057148cc8e38692ff32013f7d3e4078f (diff)
downloadhaskell-18b9ba5602121c75f184f29e5b3e70bd7d4779c4.tar.gz
ci: Fix save_cache functionwip/linters-stage1
Each interation of saving the cache would copy the whole `cabal` store into a subfolder in the CACHE_DIR rather than copying the contents of the cabal store into the cache dir. This resulted in a cache which looked like: ``` /builds/ghc/ghc/cabal-cache/cabal/cabal/cabal/cabal/cabal/cabal/cabal/cabal/cabal/cabal/ ``` So it would get one layer deeper every CI run and take longer and longer to compress.
Diffstat (limited to '.gitlab')
-rwxr-xr-x.gitlab/ci.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 7cd667fe0d..2ba27cba8d 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -608,6 +608,7 @@ function run_perf_test() {
function save_cache () {
info "Storing cabal cache from $CABAL_DIR to $CABAL_CACHE..."
+ rm -Rf "$CABAL_CACHE"
cp -Rf "$CABAL_DIR" "$CABAL_CACHE"
}