summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@well-typed.com>2020-02-19 23:20:58 -0500
committerBen Gamari <ben@well-typed.com>2020-02-19 23:20:58 -0500
commitc50c6a31bb33b616549af74d406ca60460ce9733 (patch)
treec05a4909944464369285ff4599e4e90e4d45a754
parent1500f0898e85316c7c97a2f759d83278a072ab0e (diff)
downloadhaskell-c50c6a31bb33b616549af74d406ca60460ce9733.tar.gz
gitlab-ci: Avoid duplicating ~/.cabal contents with every buildwip/fix-cabal-duplication
Previously our attempt to cache the cabal store would `cp cabal-cache ~/.cabal`. However, if the latter already existed this meant that we would end up with ~/.cabal/cabal-cache. Not only would this not help caching but it would exponentially grow the size of ~/.cabal. Not good!
-rwxr-xr-x.gitlab/ci.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index f915945f1e..29421e56f7 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -151,7 +151,8 @@ function set_toolchain_paths() {
function setup() {
if [ -d "$TOP/cabal-cache" ]; then
info "Extracting cabal cache..."
- cp -Rf cabal-cache "$cabal_dir"
+ mkdir -p "$cabal_dir"
+ cp -Rf cabal-cache/* "$cabal_dir"
fi
if [[ -n "$needs_toolchain" ]]; then