From f331b3707788847e06e2a0db7e7917a3b6fac97a Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Thu, 2 Sep 2021 13:57:57 +0100 Subject: [PATCH] Cache ~/.ghcup. --- .github/workflows/build.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb5ac027..daa6a52e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,8 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: + ref: dev + fetch-depth: 1 submodules: true - name: Update stack.yaml @@ -31,6 +33,15 @@ jobs: # Setup & Cache Haskell + - name: Cache Haskell + uses: actions/cache@v2 + id: cache-haskell + with: + path: | + ~/.ghcup + key: ${{ matrix.os }}-ghc-${{ matrix.ghc }} + + - name: Setup Haskell if: steps.cache-haskell.outputs.cache-hit != 'true' uses: haskell/actions/setup@v1 @@ -75,17 +86,22 @@ jobs: key: ${{ matrix.os }}-ghc-${{ matrix.ghc }}-agda-${{ matrix.agda }} - name: Build Agda - if: steps.cache-stack-work.outputs.cache-hit != 'true' + if: steps.cache-site-builder.outputs.cache-hit != 'true' run: stack build Agda-${{ matrix.agda }} shell: bash - name: Build Pandoc - if: steps.cache-stack-work.outputs.cache-hit != 'true' + if: steps.cache-site-builder.outputs.cache-hit != 'true' run: stack build pandoc-2.10.1 shell: bash + - name: Build other dependencies + if: steps.cache-site-builder.outputs.cache-hit != 'true' + run: stack build --only-dependencies + shell: bash + - name: Build Site Builder - if: steps.cache-stack-work.outputs.cache-hit != 'true' + if: steps.cache-site-builder.outputs.cache-hit != 'true' run: stack build shell: bash