Skip to content

Commit

Permalink
Fix cache (maybe)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Jul 19, 2022
1 parent 9df6a5a commit e08246f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
cabal-version: 3.6.2.0

- name: "WIN: Setup Haskell"
id: win-setup-haskell
if: runner.os == 'Windows'
run: |
# see https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/scripts/bootstrap/bootstrap-haskell
Expand Down Expand Up @@ -77,6 +78,7 @@ jobs:
ghc --version
cabal --version
echo "::set-output name=cabal-store::$(cabal --help | tail -1 | tr -d ' ' | rev | cut -d '/' -f2- | rev)/store"
- name: Set cache version
run: echo "CACHE_VERSION=9w76Z3Q" >> $GITHUB_ENV
Expand Down Expand Up @@ -147,7 +149,7 @@ jobs:
- uses: actions/cache@v2
name: "Cache `cabal store`"
with:
path: ${{ runner.os == 'Windows' && '/c/cabal/store' || steps.setup-haskell.outputs.cabal-store }}
path: ${{ runner.os == 'Windows' && steps.win-setup-haskell.outputs.cabal-store || steps.setup-haskell.outputs.cabal-store }}
key: cache-dependencies-${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('dependencies.txt') }}
restore-keys: |
cache-dependencies-${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('dependencies.txt') }}
Expand All @@ -156,7 +158,9 @@ jobs:
- uses: actions/cache@v2
name: "Cache `dist-newstyle`"
with:
path: dist-newstyle
path: |
dist-newstyle
!dist-newstyle/**/.git
key: cache-dist-${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ steps.record-deps.outputs.weeknum }}
restore-keys: |
cache-dist-${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ steps.record-deps.outputs.weeknum }}
Expand Down

0 comments on commit e08246f

Please sign in to comment.