[Git][ghc/ghc][master] ci: clone, don't copy when creating the cabal cache
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 7fb51f54 by mangoiv at 2026-03-17T23:48:00-04:00 ci: clone, don't copy when creating the cabal cache Also removed WINDOWS_HOST variable detected via uname - we now just check whether the CI job has windows in its name. This works because we only ever care about it if the respective job is not a cross job. We also statically detect darwin cross jobs in the same way. We only ever have darwin -> darwin cross jobs so this is enough to detect the host reliably. - - - - - 1 changed file: - .gitlab/ci.sh Changes: ===================================== .gitlab/ci.sh ===================================== @@ -737,7 +737,7 @@ function test_hadrian() { local test_compiler="$instdir/bin/${cross_prefix}ghc$exe" install_bindist _build/bindist/ghc-*/ "$instdir" - if [[ "${WINDOWS_HOST}" == "no" ]] && [ -z "${CROSS_TARGET:-}" ] + if [[ "${CI_JOB_NAME}" != *"windows"* ]] && [ -z "${CROSS_TARGET:-}" ] then run_hadrian \ test \ @@ -920,7 +920,16 @@ function save_test_output() { function save_cache () { info "Storing cabal cache from $CABAL_DIR to $CABAL_CACHE..." rm -Rf "$CABAL_CACHE" - cp -Rf "$CABAL_DIR" "$CABAL_CACHE" + if [[ "${CI_JOB_NAME}" == *"darwin"* ]]; then + # -a makes APFS behave like a COW file system + # From man CP(1) + # copy files using clonefile(2). + # Note that if clonefile(2) is not supported for the target filesystem, + # then cp will fallback to using copyfile(2) instead to ensure the copy still succeeds. + cp -Rcf "$CABAL_DIR" "$CABAL_CACHE" + else + cp -Rf "$CABAL_DIR" "$CABAL_CACHE" + fi } function clean() { @@ -1024,11 +1033,12 @@ case "$(uname)" in exe=".exe" # N.B. cabal-install expects CABAL_DIR to be a Windows path CABAL_DIR="$(cygpath -w "$CABAL_DIR")" - WINDOWS_HOST="yes" + ;; + Darwin*) + exe="" ;; *) exe="" - WINDOWS_HOST="no" ;; esac View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7fb51f543bd7bd3a5fd2170a7b634dcd... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7fb51f543bd7bd3a5fd2170a7b634dcd... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)