From 31ce39ba364e552d8db7d2a7c2a5bc9acc85ff67 Mon Sep 17 00:00:00 2001 From: Andrei Dziahel Date: Tue, 28 Nov 2023 20:22:14 +0300 Subject: [PATCH] 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 --- .github/workflows/ci.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ceebc1787..0b440029e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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