File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -51,18 +51,22 @@ jobs:
5151 stack-no-global : true
5252
5353 - name : Configure the build
54+ id : configure
5455 run : |
55- echo "with key: ${{ runner.os }}-ghc -${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}"
56+ echo "with key: ${{ runner.os }}-lts -${{ matrix.stack.lts }}"
5657
5758 stack config set resolver lts-${{ matrix.stack.lts }}
5859 stack build --dry-run
5960 # The last step generates dist-newstyle/cache/plan.json for the cache key.
6061
62+ outputs :
63+ cache-key : ${{ runner.os }}-lts-${{ matrix.stack.lts }}
64+
6165 - name : Restore cached dependencies
6266 uses : actions/cache/restore@v3
6367 id : cache
6468 env :
65- key : ${{ runner.os }}-ghc-${{ steps.setup .outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
69+ key : ${{ steps.configure .outputs.cache-key }}
6670
6771 with :
6872 path : ${{ steps.setup.outputs.stack-root }}
7276 - name : Install dependencies
7377 run : stack build --only-dependencies
7478
75- # Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail.
79+ # Cache dependencies already here, so that we do not have to rebuild them
80+ # should the subsequent steps fail.
7681 - name : Save cached dependencies
7782 uses : actions/cache/save@v3
7883 # Caches are immutable, trying to save with the same key would error.
You can’t perform that action at this time.
0 commit comments