File tree 2 files changed +64
-36
lines changed
2 files changed +64
-36
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+
9
+ # The CACHE_VERSION can be updated to force the use of a new cache if
10
+ # the current cache contents become corrupted/invalid. This can
11
+ # sometimes happen when (for example) the OS version is changed but
12
+ # older .so files are cached, which can have various effects
13
+ # (e.g. cabal complains it can't find a valid version of the "happy"
14
+ # tool).
15
+ env :
16
+ CACHE_VERSION : 1
17
+
18
+ jobs :
19
+ build :
20
+ runs-on : ${{ matrix.os }}
21
+ strategy :
22
+ matrix :
23
+ os : [ubuntu-22.04]
24
+ ghc : ["9.4.8", "9.6.6", "9.8.2"]
25
+ cabal : ["3.10.3.0"]
26
+
27
+ steps :
28
+ - uses : actions/checkout@v4
29
+ with :
30
+ submodules : true
31
+
32
+ - uses : haskell-actions/setup@v2
33
+ id : setup-haskell
34
+ with :
35
+ ghc-version : ${{ matrix.ghc }}
36
+ cabal-version : ${{ matrix.cabal }}
37
+
38
+ - uses : actions/cache/restore@v4
39
+ name : Restore cabal store cache
40
+ with :
41
+ path : |
42
+ ${{ steps.setup-haskell.outputs.cabal-store }}
43
+ dist-newstyle
44
+ key : ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
45
+ restore-keys : |
46
+ ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-
47
+
48
+ - name : Update
49
+ run : cabal update
50
+ - name : Configure
51
+ run : cabal configure --enable-tests
52
+ - name : Build
53
+ run : cabal build
54
+ - name : Run tests
55
+ run : cabal test
56
+
57
+ - uses : actions/cache/save@v4
58
+ name : Save cabal store cache
59
+ if : always()
60
+ with :
61
+ path : |
62
+ ${{ steps.setup-haskell.outputs.cabal-store }}
63
+ dist-newstyle
64
+ key : ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments