diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-07-06 14:31:21 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-07-10 19:59:34 -0400 |
commit | c38bce737f532cec1d863d3e15bed4a8addbffd1 (patch) | |
tree | 2d2593d42a859a712b0532e3e72545b1fc3c3fd4 /.gitlab-ci.yml | |
parent | 901f0e1b38730401a3e74d25a0b041ce551797c9 (diff) | |
download | haskell-c38bce737f532cec1d863d3e15bed4a8addbffd1.tar.gz |
ci: Copy the cache from inside the nix-shell where $HOME is different on darwin
Hopefully fixes the flaky CI failures we have seen recently.
Co-authored-by: Moritz Angerman <moritz.angermann@gmail.com>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 361be0350d..dd192172ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -587,7 +587,6 @@ validate-x86_64-darwin: IGNORE_PERF_FAILURES: "all" CABAL_CACHE: "cabal-cache-amd64" after_script: - - cp -Rf $HOME/.cabal cabal-cache-amd64 - .gitlab/ci.sh clean # I wish we could just use the nix #! logic, but we can't --run and -i bash @@ -639,6 +638,9 @@ validate-x86_64-darwin: TIME_TEST_DELTA=$(expr $TIME_TEST - $TIME_BUILD) echo "Test took $TIME_TEST_DELTA seconds" + # Important to run this in nix-shell because $HOME is different in there + runInNixShell ".gitlab/ci.sh save-cache" 2>&1 + echo "=== TIMINGS ===" echo "Setup | $TIME_SETUP_DELTA" echo "Configure | $TIME_CONFIGURE_DELTA" @@ -650,10 +652,9 @@ validate-x86_64-darwin: when: always expire_in: 2 week cache: - key: "darwin-x86_64-$GHC_VERSION" + key: "darwin-amd64-$GHC_VERSION" paths: - cabal-cache-amd64 - - cabal-cache-arm64 - toolchain validate-aarch64-darwin: @@ -681,7 +682,6 @@ validate-aarch64-darwin: TEST_ENV: "aarch64-darwin-hadrian" CABAL_CACHE: "cabal-cache-arm64" after_script: - - cp -Rf $HOME/.cabal cabal-cache-arm64 - .gitlab/ci.sh clean # I wish we could just use the nix #! logic, but we can't --run and -i bash @@ -731,6 +731,9 @@ validate-aarch64-darwin: TIME_TEST_DELTA=$(expr $TIME_TEST - $TIME_BUILD) echo "Test took $TIME_TEST_DELTA seconds" + # Important to run this in nix-shell because $HOME is different there + runInNixShell ".gitlab/ci.sh save-cache" 2>&1 + echo "=== TIMINGS ===" echo "Setup | $TIME_SETUP_DELTA" echo "Configure | $TIME_CONFIGURE_DELTA" @@ -742,9 +745,8 @@ validate-aarch64-darwin: when: always expire_in: 2 week cache: - key: "darwin-aarch64-$GHC_VERSION" + key: "darwin-arm64-$GHC_VERSION" paths: - - cabal-cache-amd64 - cabal-cache-arm64 - toolchain |