CI: Add ghc-in-ghci build job
authorMatthew Pickering <matthewtpickering@gmail.com>
Sun, 10 Mar 2019 17:54:59 +0000 (17:54 +0000)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Tue, 12 Mar 2019 13:04:52 +0000 (09:04 -0400)
This is a separate build job to the other hadrian jobs as it only takes
about 2-3 minutes to run from cold. The CI tests that the
`./hadrian/ghci` script loads `ghc/Main.hs` successfully.

.gitlab-ci.yml

index f1f5550..13e9d8e 100644 (file)
@@ -85,6 +85,32 @@ validate-x86_64-linux-deb8-hadrian:
   tags:
     - x86_64-linux
 
+hadrian-ghc-in-ghci:
+  stage: build
+  image: ghcci/x86_64-linux-deb8:0.1
+  before_script:
+    # workaround for docker permissions
+    - sudo chown ghc:ghc -R .
+    - python3 .gitlab/fix-submodules.py
+    - git submodule sync --recursive
+    - git submodule update --init --recursive
+    - git checkout .gitmodules
+  tags:
+    - x86_64-linux
+  script:
+    - cabal update
+    - git clean -xdf && git submodule foreach git clean -xdf
+    - bash .circleci/prepare-system.sh
+    - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi
+    - ./boot
+    - ./configure $CONFIGURE_ARGS
+    # Load ghc-in-ghci then immediately exit
+    - echo ":q" | hadrian/ghci.sh
+  cache:
+    key: hadrian-ghci
+    paths:
+      - cabal-cache
+
 ############################################################
 # Validation via Pipelines (make)
 ############################################################