ci: cabal+GHC: tweak caching

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
This commit is contained in:
Andrei Dziahel
2023-11-28 12:48:57 -05:00
committed by Steve Chavez
parent ca5eb64deb
commit 31ce39ba36
+5 -2
View File
@@ -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