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-11-19 09:58:03 -0500
commit7fdc88c93f3876b6aa68d662c0160c73121ad37d (patch)
treefdd94cadab320d78e743a74ed88e060c55f71383
parentaed98ddaf72cc38fb570d8415cac5de9d8888818 (diff)
downloadhaskell-wip/ci-fixes.tar.gz
gitlab-ci: Set HOME to plausible but still non-existent locationwip/ci-fixes
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