Skip to content

Commit

Permalink
ci: cabal+GHC: tweak caching
Browse files Browse the repository at this point in the history
Makes it to cache only relevant directories, adds `dist-newstyle` to prevent needless rebuilding even harder and shortens cache key name by supplying `hashFiles`multiple arguments
  • Loading branch information
develop7 authored and steve-chavez committed Nov 28, 2023
1 parent ca5eb64 commit 31ce39b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,11 @@ jobs:
- name: Cache
uses: actions/cache@v3
with:
path: ~/.cabal
key: cache-cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: cache-cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project') }}
restore-keys: |
cache-cabal-${{ runner.os }}-${{ matrix.ghc }}-
- name: Install dependencies
Expand Down

0 comments on commit 31ce39b

Please sign in to comment.