[commit: ghc] wip/test-hadrian-caching: gitlab-ci: Test Hadrian's caching (7dacefc)

git at git.haskell.org git at git.haskell.org
Thu Feb 21 15:13:03 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/test-hadrian-caching
Link       : http://ghc.haskell.org/trac/ghc/changeset/7dacefcb39f6145980bcf7fa82049c3445493707/ghc

>---------------------------------------------------------------

commit 7dacefcb39f6145980bcf7fa82049c3445493707
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed Feb 20 19:09:44 2019 -0500

    gitlab-ci: Test Hadrian's caching
    
    We just delete the `_build` directory and verify that it is recreated
    successfully. This doesn't actually verify that we don't rebuild
    unnecessarily but it is at least a rough test that the dependency graph
    is reasonably complete.


>---------------------------------------------------------------

7dacefcb39f6145980bcf7fa82049c3445493707
 .gitlab-ci.yml | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 33d96d8..5156ad9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -60,11 +60,17 @@ ghc-linters:
     - if [[ -d ./cabal-cache ]]; then cp -R ./.cabal-cache ~/.cabal-cache; fi
     - ./boot
     - ./configure $CONFIGURE_ARGS
-    - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh`
+    - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` $HADRIAN_OPTS
     - hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` docs-haddock
+      # Support for testing Hadrian caching
+    - if [[ -d ./_cache ]]; then
+        rm -R ./_build
+        hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` $HADRIAN_OPTS
+      fi
   cache:
     key: hadrian
     paths:
+      - _cache
       - cabal-cache
 
 validate-x86_64-linux-deb8-hadrian:
@@ -82,6 +88,11 @@ validate-x86_64-linux-deb8-hadrian:
   tags:
     - x86_64-linux
 
+validate-x86_64-linux-deb8-hadrian-cached:
+  extends: validate-x86_64-linux-deb8-hadrian
+  variables:
+    HADRIAN_OPTS: --shared=_cache
+
 ############################################################
 # Validation via Pipelines (make)
 ############################################################



More information about the ghc-commits mailing list