summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-11-19 09:43:34 -0500
committerBen Gamari <ben@smart-cactus.org>2021-12-10 10:32:59 -0500
commit3bc81e0f619763fa7aeb52adf6b1a220da37706f (patch)
tree611c74dc822c78f98e3078c2d9786d899e4accde
parentb3d4905e849fd9fc7e2dc755961a14ba51b8686b (diff)
downloadhaskell-3bc81e0f619763fa7aeb52adf6b1a220da37706f.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. (cherry picked from commit b2933ea95273f11b05f7ff796a9646a2e912d7fc)
-rwxr-xr-x.gitlab/ci.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index e95be5d4ad..2df870dfc2 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -575,7 +575,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