]> Nishi Git Mirror - gwion.git/commitdiff
more on caching
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Fri, 17 Jan 2020 13:03:29 +0000 (14:03 +0100)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Fri, 17 Jan 2020 13:03:29 +0000 (14:03 +0100)
.github/workflows/build.yml

index 9911a8aa7ab1181f1dd8c5589d378e9deade30f3..f31464826037c988404117163d49e8f6ab6ba522 100644 (file)
@@ -12,13 +12,13 @@ jobs:
     - uses: actions/setup-haskell@v1
 
     - uses: actions/cache@v1
-      id: mdr-cache
+      id: mdr-bin
       with:
         path: mdr
         key: ${{ runner.os }}-mdr
 
     - name: Mdr
-      if: steps.mdr-cache.outputs.cache-hit != 'true'
+      if: steps.mdr-bin.outputs.cache-hit != 'true'
       run: |
         git clone https://github.com/fennecdjay/mdr
         cd mdr
@@ -28,6 +28,20 @@ jobs:
         cabal build
         cabal install
 
+    - name: Mdr
+      if: steps.mdr-bin.outputs.cache-hit == 'true'
+      run: |
+        if [ $(git rev-parse HEAD) = $(git ls-remote https://github.com/fennecdjay/mdr.git HEAD | cut -f1) ]
+        then exit 0
+        fi
+        cd mdr
+        git pull
+        cabal update
+        cabal install --only-dependencies
+        cabal configure --enable-tests
+        cabal build
+        cabal install
+
     - name: Gwion
       run: |
         git clone https://github.com/fennecdjay/Gwion