Consolidate and isolate bindist installation
In particular, this now ensure that we actually use the ghcup version we installed as well as a separate installation directory, instead of any potentially previously installed versions/files.
This commit is contained in:
18
.github/workflows/install-bindist.sh
vendored
Executable file
18
.github/workflows/install-bindist.sh
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
export GHCUP_INSTALL_BASE_PREFIX=$RUNNER_TEMP/foobarbaz
|
||||
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
|
||||
|
||||
source $GHCUP_INSTALL_BASE_PREFIX/.ghcup/env || source ~/.bashrc
|
||||
|
||||
ghcup --version
|
||||
which ghcup | grep foobarbaz
|
||||
|
||||
ghcup -v --url-source=file:$METADATA_FILE install ghc --set $GHC_VERSION
|
||||
|
||||
ghc --version
|
||||
echo 'main = print $ 1 + 1' > main.hs
|
||||
ghc main.hs
|
||||
[[ $(./main) -eq 2 ]]
|
||||
Reference in New Issue
Block a user