summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorBen Gamari <ben@well-typed.com>2020-02-19 23:20:58 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-20 21:24:46 -0500
commitf44c7e6723498c5dde0cd78e4af26142a14d98f4 (patch)
tree40c400fbce65a7645677aa97c5c77cc77b668736 /.gitlab
parent05251b175b3745ed96c9f672115c78c527b63b9e (diff)
downloadhaskell-f44c7e6723498c5dde0cd78e4af26142a14d98f4.tar.gz
gitlab-ci: Avoid duplicating ~/.cabal contents with every build
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!
Diffstat (limited to '.gitlab')
-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