summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-09-27 17:01:13 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-09 20:15:45 -0500
commitab06c0f0ccaeb3277195e4eeac541c00558d4cc2 (patch)
treeaf2c94fd75f9569cd4e6644b67326feeec9b4ead
parent5949d927a47d14b694a61f68608b68553b5e0c5c (diff)
downloadhaskell-ab06c0f0ccaeb3277195e4eeac541c00558d4cc2.tar.gz
ci: Add job to test hadrian-multi command
I am not sure this job is good because it requires booting HEAD with HEAD, but it should be fine.
-rw-r--r--.gitlab-ci.yml51
-rw-r--r--configure.ac1
-rwxr-xr-xhadrian/ghci-multi-cabal.in6
3 files changed, 55 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d9c7ff1761..c12ecc5284 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -377,6 +377,57 @@ hadrian-ghc-in-ghci:
- cabal-cache
############################################################
+# Hadrian Multi-Repl
+############################################################
+
+hadrian-multi:
+ stage: testing
+ needs:
+ - job: x86_64-linux-fedora33-release
+ optional: true
+ - job: nightly-x86_64-linux-fedora33-release
+ optional: true
+ - job: release-x86_64-linux-fedora33-release
+ optional: true
+ dependencies: null
+ image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
+ before_script:
+ # workaround for docker permissions
+ - sudo chown ghc:ghc -R .
+ variables:
+ GHC_FLAGS: -Werror
+ CONFIGURE_ARGS: --enable-bootstrap-with-devel-snapshot
+ tags:
+ - x86_64-linux
+ script:
+ - export BOOT_HC=$GHC
+ - root=$(pwd)/ghc
+ - ls
+ - |
+ mkdir tmp
+ tar -xf ghc-x86_64-linux-fedora33-release.tar.xz -C tmp
+ pushd tmp/ghc-*/
+ ./configure --prefix=$root
+ make install
+ popd
+ rm -Rf tmp
+ - export HC=$root/bin/ghc
+ # This GHC means, use this GHC to configure with
+ - export GHC=$root/bin/ghc
+ - .gitlab/ci.sh setup
+ - .gitlab/ci.sh configure
+ # Now GHC means, use this GHC for hadrian
+ - export GHC=$BOOT_HC
+ # Load hadrian-multi then immediately exit and check the modules loaded
+ - echo ":q" | hadrian/ghci-multi -j`mk/detect-cpu-count.sh`| tail -n2 | grep "Ok,"
+ after_script:
+ - .gitlab/ci.sh save_cache
+ cache:
+ key: hadrian-ghci-$CACHE_REV
+ paths:
+ - cabal-cache
+
+############################################################
# stack-hadrian-build
############################################################
diff --git a/configure.ac b/configure.ac
index 09c48d592c..62c9a6b54e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1201,6 +1201,7 @@ AC_CONFIG_FILES(
[ mk/project.mk
hadrian/cfg/system.config
hadrian/ghci-cabal
+ hadrian/ghci-multi-cabal
hadrian/ghci-stack
docs/users_guide/ghc_config.py
distrib/configure.ac
diff --git a/hadrian/ghci-multi-cabal.in b/hadrian/ghci-multi-cabal.in
index ca9607b9f0..90fccefa37 100755
--- a/hadrian/ghci-multi-cabal.in
+++ b/hadrian/ghci-multi-cabal.in
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
-GHC=@WithGhc@
-if [[ $(printf "9.4.0\n%s\n" $($GHC --numeric-version) | sort -uV | head -n 1) != "9.4.0" ]]; then echo "Multi-repl needs at least GHC-9.4.1"; exit 1; fi
+RUN_GHC=@WithGhc@
+if [[ $(printf "9.4.0\n%s\n" $($RUN_GHC --numeric-version) | sort -uV | head -n 1) != "9.4.0" ]]; then echo "Multi-repl needs at least GHC-9.4.1"; exit 1; fi
# This file is generated by configure from ghci-multi.in
@@ -10,4 +10,4 @@ export TOOL_OUTPUT=.hadrian_ghci_multi/ghci_args
# Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
CABFLAGS=-v0 "hadrian/build-cabal" multi:ghc --build-root=.hadrian_ghci_multi --flavour=ghc-in-ghci $HADRIAN_ARGS
GHC_FLAGS="$GHC_FLAGS $(cat $TOOL_OUTPUT | tr '\n\r' ' ')"
-$GHC --interactive $GHC_FLAGS $@ -fno-code -fwrite-interface -O0 +RTS -A128m
+$RUN_GHC --interactive $GHC_FLAGS $@ -fno-code -fwrite-interface -O0 +RTS -A128m