File tree Expand file tree Collapse file tree 1 file changed +25
-10
lines changed Expand file tree Collapse file tree 1 file changed +25
-10
lines changed Original file line number Diff line number Diff line change 9
9
build-and-test :
10
10
name : Build site
11
11
runs-on : ubuntu-latest
12
+ strategy :
13
+ matrix :
14
+ ghc : ["9.2.5"]
15
+ cabal : ["3.10.1"]
16
+
17
+ defaults :
18
+ run :
19
+ working-directory : message-index
12
20
13
21
steps :
14
- - name : Install GHC 9.2.5
15
- run : ghcup install ghc 9.2.5
16
-
17
- - name : Select GHC 9.2.5
18
- run : ghcup set ghc 9.2.5
19
-
20
22
- name : Check out repo
21
23
uses : actions/checkout@v3
24
+
25
+ - name : Install Haskell Toolchain
26
+ uses : haskell/actions/setup@v2
27
+ with :
28
+ ghc-version : ${{ matrix.ghc }}
29
+ cabal-version : ${{ matrix.cabal }}
30
+
31
+ - name : Configure the build plan
32
+ run : |
33
+ cabal update
34
+ cabal build --dry-run
35
+ # cabal build --dry-run creates dist-newstyle/cache/plan.json
36
+ # Keep a watch on this `cabal-3.9 build --dry-run` bug:
37
+ # https://github.com/haskell/cabal/issues/8706
22
38
23
39
- name : Read the Cabal cache
24
40
uses : actions/cache@v3
25
41
with :
26
42
path : |
27
43
~/.cabal/store
28
44
message-index/dist-newstyle
29
- key : cabal-cache-0-${{ hashFiles('message-index/message-index.cabal') }}
45
+ key : |
46
+ cabal-cache-ghc-${{ matrix.ghc }}-cabal-${{ matrix.cabal }}-${{ hashFiles('**/plan.json') }}
30
47
restore-keys : |
31
- cabal-cache-0
48
+ cabal-cache-ghc-${{ matrix.ghc }}-cabal-${{ matrix.cabal }}-
32
49
33
- - name : Update the Cabal index
34
- run : cabal update
35
50
36
51
- name : Build with Hakyll
37
52
working-directory : message-index
You can’t perform that action at this time.
0 commit comments