[Git][ghc/ghc][wip/fix-multi-repl] ci: Add job to test hadrian-multi command

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Wed Dec 7 12:17:45 UTC 2022



Matthew Pickering pushed to branch wip/fix-multi-repl at Glasgow Haskell Compiler / GHC


Commits:
dcc72dbb by Matthew Pickering at 2022-12-07T12:17:38+00:00
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.

- - - - -


3 changed files:

- .gitlab-ci.yml
- configure.ac
- hadrian/ghci-multi-cabal.in


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -376,6 +376,57 @@ hadrian-ghc-in-ghci:
     paths:
       - 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
 ############################################################


=====================================
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


=====================================
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



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dcc72dbb2cf883b897786aae9273061166ea3695

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dcc72dbb2cf883b897786aae9273061166ea3695
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221207/f2abbcbd/attachment-0001.html>


More information about the ghc-commits mailing list