Skip to content

Commit 5b0532b

Browse files
committed
WIP
1 parent 38cd642 commit 5b0532b

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/cache-deps.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
ghc: ["9.0.1", '8.10.7', '8.10.6', "8.8.4", "8.8.3", "8.6.5"]
32+
ghc-version: ["9.0.1", '8.10.7', '8.10.6', "8.8.4", "8.8.3", "8.6.5"]
33+
cabal-version: ["3.4"]
3334
os: [ubuntu-latest, macOS-latest, windows-latest]
3435
exclude:
3536
- os: windows-latest
36-
ghc: '8.8.3'
37+
ghc-version: '8.8.3'
3738

3839
steps:
3940
- uses: actions/checkout@v2
@@ -43,8 +44,8 @@ jobs:
4344
- uses: haskell/actions/setup@v1
4445
id: HaskEnvSetup
4546
with:
46-
ghc-version: ${{ matrix.ghc }}
47-
cabal-version: "3.4"
47+
ghc-version: ${{ matrix.ghc-version }}
48+
cabal-version: ${{ matrix.cabal-version }}
4849

4950
- if: runner.os == 'Windows'
5051
name: (Windows) Platform config
@@ -67,25 +68,30 @@ jobs:
6768
echo "package floskell" >> cabal.project
6869
echo " ghc-options: -O0" >> cabal.project
6970
70-
- name: Cache Cabal
71+
# NOTE: Freeze is for the caching
72+
- name: "Configuration freeze"
73+
run: cabal v2-freeze --enable-tests --enable-benchmarks
74+
75+
- name: Hackage sources cache
7176
uses: actions/cache@v2
7277
env:
7378
cache-name: hackage-sources
7479
with:
7580
path: ${{ env.CABAL_PKGS_DIR }}
76-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-${{ hashFiles('cabal.project') }}
77-
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-
81+
# 2021-12-01: NOTE: Cabal Hackage source tree storage does not depend on OS or GHC.
82+
key: ${{ env.cache-name }}-${{ hashFiles('cabal.project.freeze') }}
83+
restore-keys: ${{ env.cache-name }}-
7884

79-
- name: Cache Cabal
85+
- name: Compiled deps cache
8086
uses: actions/cache@v2
8187
env:
8288
cache-name: compiled-deps
8389
with:
8490
path: ${{ steps.HaskEnvSetup.outputs.cabal-store }}
85-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-${{ hashFiles('cabal.project') }}
86-
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-
91+
key: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
92+
restore-keys: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
8793

88-
- run: cabal update
94+
- run: cabal v2-update
8995

9096
# Work around for filepath length limits in Windows
9197
- if: runner.os == 'Windows'

0 commit comments

Comments
 (0)