@@ -52,18 +52,17 @@ jobs:
52
52
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
53
53
54
54
# Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file
55
- - if : matrix.ghc == '9.0.1'
55
+ - if : matrix.ghc-version == '9.0.1'
56
56
name : Use modified cabal.project for ghc9
57
57
run : cp cabal-ghc901.project cabal.project
58
58
59
- - if : matrix.ghc == '8.8.4' && matrix.os == 'windows-latest'
59
+ - if : matrix.ghc-version == '8.8.4' && matrix.os == 'windows-latest'
60
60
name : Modify cabal.project to workaround segfaults for ghc-8.8.4 and windows
61
61
run : |
62
62
echo "package floskell" >> cabal.project
63
63
echo " ghc-options: -O0" >> cabal.project
64
64
65
- - if : ( runner.os == 'Linux' ) || ( runner.os == 'macOS' )
66
- name : (Linux,macOS) Platform config
65
+ - name : Retrieving `cabal.project` Hackage timestamp
67
66
run : |
68
67
TIMESTAMP="$(grep index-state cabal.project)"
69
68
echo "HACKAGE_TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV
@@ -80,18 +79,16 @@ jobs:
80
79
81
80
- run : cabal v2-update
82
81
83
- # NOTE: Freeze is for the caching
84
- - name : " Configuration freeze"
85
- run : cabal v2-freeze --enable-tests --enable-benchmarks
86
-
87
82
- name : Compiled deps cache
88
83
uses : actions/cache@v2
89
84
env :
90
85
cache-name : compiled-deps
91
86
with :
92
87
path : ${{ steps.HaskEnvSetup.outputs.cabal-store }}
93
- key : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
94
- restore-keys : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
88
+ key : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc-version }}-${{ env.HACKAGE_TIMESTAMP }}-${{ hashFiles('cabal.project') }}
89
+ restore-keys : |
90
+ ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc-version }}-${{ env.HACKAGE_TIMESTAMP }}-
91
+ ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc-version }}-
95
92
96
93
# Work around for filepath length limits in Windows
97
94
- if : runner.os == 'Windows'
0 commit comments