forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request haskell#9865 from chreekat/b/new-ci-images
GitLab CI: Shake up available platforms
- Loading branch information
Showing
3 changed files
with
84 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
export GHCUP_INSTALL_BASE_PREFIX="$CI_PROJECT_DIR/toolchain" | ||
|
||
case "$(uname)" in | ||
MSYS_*|MINGW*) | ||
GHCUP_BINDIR="${GHCUP_INSTALL_BASE_PREFIX}/ghcup/bin" | ||
;; | ||
*) | ||
GHCUP_BINDIR="${GHCUP_INSTALL_BASE_PREFIX}/.ghcup/bin" | ||
;; | ||
esac | ||
|
||
mkdir -p "$GHCUP_BINDIR" | ||
export PATH="$GHCUP_BINDIR:$PATH" | ||
|
||
export BOOTSTRAP_HASKELL_NONINTERACTIVE=1 | ||
export BOOTSTRAP_HASKELL_GHC_VERSION=$GHC_VERSION | ||
export BOOTSTRAP_HASKELL_CABAL_VERSION=$CABAL_INSTALL_VERSION | ||
export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=yes | ||
# We don't use stack, and it isn't available on i386-deb9 | ||
export BOOTSTRAP_HASKELL_INSTALL_NO_STACK=yes | ||
|
||
# for some reason the subshell doesn't pick up the arm64 environment on darwin | ||
# and starts installing x86_64 GHC | ||
case "$(uname -s)" in | ||
"Darwin"|"darwin") | ||
case "$(/usr/bin/arch)" in | ||
aarch64|arm64|armv8l) | ||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | arch -arm64 /bin/bash | ||
;; | ||
*) | ||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh | ||
;; | ||
esac | ||
;; | ||
*) | ||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh | ||
;; | ||
esac |