Skip to content

Commit

Permalink
chore: fix cabal cache key in CI by including project hash (#143)
Browse files Browse the repository at this point in the history
* chore: fix cabal cache key in CI by including project hash

the Github Actions configuration for the Cabal cache was not good
(despite it being the recommended configuration on the cache action
documentation; it’s just broken). The cache key is too fixed, so if
`ic-ref` changes, you still get a cache hit with the old store, and
still rebuild lots of dependendencies, but don’t push a new cache.

This tries to improve this, by including some of cabals configuration
files in the cache key.

(This is the same as dfinity/agent-js#326)

* Update to path in ic-hs

Co-authored-by: Eric Swanson <[email protected]>
  • Loading branch information
nomeata and ericswanson-dfinity authored Nov 9, 2021
1 parent c5c2b1f commit cec7298
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ic-ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ jobs:
with:
path: |
~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('ic-hs/cabal.project', 'ic-hs/cabal.project.freeze') }}
restore-keys: cabal-${{ runner.os }}-${{ matrix.ghc }}-


- uses: actions/[email protected]
with:
Expand Down

0 comments on commit cec7298

Please sign in to comment.