File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 45
45
- name : Updo
46
46
run : GHC_VERSION=${{ matrix.vers.ghc }} STACKAGE_VERSION=${{ matrix.vers.stackage }} make -f project-files.mk stack.yaml
47
47
48
+ # Generate a file to cache dependencies.
49
+ - name : build
50
+ run : stack ls dependencies json | jq > stack-deps.json
51
+
52
+ - name : build
53
+ run : stack test --no-run-tests --no-terminal --only-dependencies
54
+
55
+ - name : Restore cached dependency of Pantry (Stackage package index)
56
+ uses : actions/cache/restore@v4
57
+ id : pantry
58
+ env :
59
+ key : ghc-${{ steps.setup.outputs.ghc-version }}-stack-${{ steps.setup.outputs.stack-version }}
60
+ with :
61
+ path : ${{ steps.setup.outputs.stack-root }}/pantry
62
+ key : ${{ env.key }}-plan-${{ hashFiles('stack-deps.json') }}
63
+ restore-keys : ${{ env.key }}-
64
+
65
+ - name : Recompute Stackage package index (~/.stack/pantry)
66
+ if : steps.pantry.outputs.cache-hit != 'true'
67
+ run : stack update
68
+
69
+ - name : Save cached dependencies
70
+ uses : actions/cache/save@v4
71
+ if : steps.pantry.outputs.cache-hit != 'true'
72
+ with :
73
+ path : ${{ steps.setup.outputs.stack-root }}/pantry
74
+ key : ${{ steps.cache.outputs.cache-primary-key }}
75
+
48
76
- name : build
49
77
run : stack test --no-run-tests --no-terminal
50
78
You can’t perform that action at this time.
0 commit comments