summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-11-19 09:43:34 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-20 05:36:54 -0500
commitb2933ea95273f11b05f7ff796a9646a2e912d7fc (patch)
treef0329201a3296c65c51febb245eebaffbb6131cc
parent29e0307185ea98d262e0fca4c5a72503634ebf5b (diff)
downloadhaskell-b2933ea95273f11b05f7ff796a9646a2e912d7fc.tar.gz
gitlab-ci: Set HOME to plausible but still non-existent location
We have been seeing numerous CI failures on aarch64/Darwin of the form: CI_COMMIT_BRANCH: CI_PROJECT_PATH: ghc/ghc error: creating directory '/nonexistent': Read-only file system Clearly *something* is attempting to create `$HOME`. A bit of sleuthing by @int-e found that the culprit is likely `nix`, although it's not clear why. For now we avoid the issue by setting `HOME` to a fresh directory in the working tree.
-rwxr-xr-x.gitlab/ci.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index b3ac97aff4..1eef2143fe 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -599,7 +599,9 @@ setup_locale
# Platform-specific environment initialization
if [ -n "${HERMETIC:-}" ]; then
export CABAL_DIR="$TOP/cabal"
- export HOME="/nonexistent"
+ # We previously set HOME=/nonexistent but apparently nix wants $HOME to exist
+ # so sadly we must settle for someplace writable.
+ export HOME="$TOP/tmp-home"
else
BIN_DIST_NAME="${BIN_DIST_NAME:-}"
case "$(uname)" in