Skip to content

Commit b2b5a06

Browse files
committed
WIP
1 parent f541e28 commit b2b5a06

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.github/workflows/cache-deps.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,17 @@ jobs:
5252
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
5353
5454
# 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'
5656
name: Use modified cabal.project for ghc9
5757
run: cp cabal-ghc901.project cabal.project
5858

59-
- if: matrix.ghc == '8.8.4' && matrix.os == 'windows-latest'
59+
- if: matrix.ghc-version == '8.8.4' && matrix.os == 'windows-latest'
6060
name: Modify cabal.project to workaround segfaults for ghc-8.8.4 and windows
6161
run: |
6262
echo "package floskell" >> cabal.project
6363
echo " ghc-options: -O0" >> cabal.project
6464
65-
- if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' )
66-
name: (Linux,macOS) Platform config
65+
- name: Retrieving `cabal.project` Hackage timestamp
6766
run: |
6867
TIMESTAMP="$(grep index-state cabal.project)"
6968
echo "HACKAGE_TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV
@@ -80,18 +79,16 @@ jobs:
8079

8180
- run: cabal v2-update
8281

83-
# NOTE: Freeze is for the caching
84-
- name: "Configuration freeze"
85-
run: cabal v2-freeze --enable-tests --enable-benchmarks
86-
8782
- name: Compiled deps cache
8883
uses: actions/cache@v2
8984
env:
9085
cache-name: compiled-deps
9186
with:
9287
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 }}-
9592
9693
# Work around for filepath length limits in Windows
9794
- if: runner.os == 'Windows'

0 commit comments

Comments
 (0)