summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-09-27 17:01:13 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2022-12-07 12:17:38 +0000
commitdcc72dbb2cf883b897786aae9273061166ea3695 (patch)
treec121d2c395f0066384ec32122363f2940e3122f0
parent6d05060240bd899f9430a6a5e306b31d62a8bfff (diff)
downloadhaskell-wip/fix-multi-repl.tar.gz
ci: Add job to test hadrian-multi commandwip/fix-multi-repl
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 f19c78c561..f5f902bfaa 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 2e683cdef3..0f7aaf79d6 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