diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-09-24 11:58:56 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-10-14 03:42:50 -0400 |
commit | 0fc1cb54d1afc0f002deb4d080c9b824f423b647 (patch) | |
tree | 8290a95370b39d3b302f394f3e1434a0cdbaf8b5 /hadrian | |
parent | 8f4f5794eb3504bf2ca093dc5895742395fdbde9 (diff) | |
download | haskell-0fc1cb54d1afc0f002deb4d080c9b824f423b647.tar.gz |
gitlab-ci: Verify that Hadrian builds with Stack
As noted in #18726, this regularly breaks. Let's test it.
Note that we don't actually perform a build of GHC itself; we merely
test that the Hadrian executable builds and works (by invoking `hadrian
--version`).
Diffstat (limited to 'hadrian')
-rwxr-xr-x | hadrian/build-stack | 6 | ||||
-rw-r--r-- | hadrian/build-stack.bat | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/hadrian/build-stack b/hadrian/build-stack index 7a45042ebd..da069e3575 100755 --- a/hadrian/build-stack +++ b/hadrian/build-stack @@ -3,11 +3,13 @@ # Make sure that the script exits if Hadrian fails to build set -euo pipefail +STACK="${STACK:-stack}" + # Make sure Hadrian is up-to-date cd hadrian -stack build --no-library-profiling ${HADRIAN_NIX:+--nix} +$STACK build --no-library-profiling ${HADRIAN_NIX:+--nix} # Run Hadrian in the top-level GHC directory -stack exec hadrian -- \ +$STACK exec hadrian -- \ --directory ".." \ "$@" diff --git a/hadrian/build-stack.bat b/hadrian/build-stack.bat index 09bfd9561e..4ed26a703a 100644 --- a/hadrian/build-stack.bat +++ b/hadrian/build-stack.bat @@ -3,5 +3,9 @@ setlocal rem Change the current directory to the one containing this script cd %~dp0 +if "%STACK%"=="" ( + set STACK=stack +) + rem Build and run Hadrian in GHC top directory forwarding additional user arguments -stack run hadrian --cwd=.. -- %* +%STACK% run hadrian --cwd=.. -- %* |