summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-02-23 16:18:35 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-26 15:10:09 -0500
commitc7d4fa55d19f7ac72f3071f9d19e03443c9b538c (patch)
tree63911eef67009277f6f372847f1a2e2d974043ed
parent217546a798e1eb5a931a677771bbd54bb0e4b5ee (diff)
downloadhaskell-c7d4fa55d19f7ac72f3071f9d19e03443c9b538c.tar.gz
gitlab-ci: Add run_hadrian subcommand
I've ruined two trees already by failing to pass --flavour to hadrian. Let's factor this out so it can be reused during troubleshooting.
-rwxr-xr-x.gitlab/ci.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 6c9b664a21..13ec55f389 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -378,11 +378,7 @@ function build_hadrian() {
fail "FLAVOUR not set"
fi
- run hadrian/build.cabal.sh \
- --flavour="$FLAVOUR" \
- -j"$cores" \
- $HADRIAN_ARGS \
- binary-dist
+ run_hadrian binary-dist
mv _build/bindist/ghc*.tar.xz ghc.tar.xz
}
@@ -393,10 +389,7 @@ function test_hadrian() {
run "$MAKE" install
cd ../../../
- run hadrian/build.cabal.sh \
- --flavour="$FLAVOUR" \
- -j"$cores" \
- $HADRIAN_ARGS \
+ run_hadrian \
test \
--summary-junit=./junit.xml \
--test-compiler="$TOP"/_build/install/bin/ghc
@@ -408,6 +401,14 @@ function clean() {
run rm -Rf _build
}
+function run_hadrian() {
+ run hadrian/build.cabal.sh \
+ --flavour="$FLAVOUR" \
+ -j"$cores" \
+ $HADRIAN_ARGS \
+ $@
+}
+
# A convenience function to allow debugging in the CI environment.
function shell() {
local cmd=$@
@@ -445,6 +446,7 @@ case $1 in
test_make) fetch_perf_notes; test_make; push_perf_notes ;;
build_hadrian) build_hadrian ;;
test_hadrian) fetch_perf_notes; test_hadrian; push_perf_notes ;;
+ run_hadrian) run_hadrian $@ ;;
clean) clean ;;
shell) shell $@ ;;
*) fail "unknown mode $1" ;;