@@ -29,11 +29,12 @@ jobs:
29
29
strategy :
30
30
fail-fast : false
31
31
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"]
33
34
os : [ubuntu-latest, macOS-latest, windows-latest]
34
35
exclude :
35
36
- os : windows-latest
36
- ghc : ' 8.8.3'
37
+ ghc-version : ' 8.8.3'
37
38
38
39
steps :
39
40
- uses : actions/checkout@v2
43
44
- uses : haskell/actions/setup@v1
44
45
id : HaskEnvSetup
45
46
with :
46
- ghc-version : ${{ matrix.ghc }}
47
- cabal-version : " 3.4 "
47
+ ghc-version : ${{ matrix.ghc-version }}
48
+ cabal-version : ${{ matrix.cabal-version }}
48
49
49
50
- if : runner.os == 'Windows'
50
51
name : (Windows) Platform config
@@ -67,25 +68,30 @@ jobs:
67
68
echo "package floskell" >> cabal.project
68
69
echo " ghc-options: -O0" >> cabal.project
69
70
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
71
76
uses : actions/cache@v2
72
77
env :
73
78
cache-name : hackage-sources
74
79
with :
75
80
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 }}-
78
84
79
- - name : Cache Cabal
85
+ - name : Compiled deps cache
80
86
uses : actions/cache@v2
81
87
env :
82
88
cache-name : compiled-deps
83
89
with :
84
90
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 }}-
87
93
88
- - run : cabal update
94
+ - run : cabal v2- update
89
95
90
96
# Work around for filepath length limits in Windows
91
97
- if : runner.os == 'Windows'
0 commit comments