-
Notifications
You must be signed in to change notification settings - Fork 20
77 lines (77 loc) · 2.23 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
ormolu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell-actions/run-ormolu@v14
build-linux:
runs-on: ubuntu-latest
needs: ormolu
strategy:
matrix:
cabal: ["3.10"]
ghc: ["9.2.8", "9.4.5", "9.6.2"]
env:
CONFIG: "--enable-tests --enable-benchmarks --flags=dev"
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: cabal update
- run: cabal freeze $CONFIG
- uses: actions/[email protected]
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-0-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-0-
- run: cabal format && git diff --exit-code --color=always
- run: cabal build $CONFIG
- run: cabal test $CONFIG
- run: cabal haddock $CONFIG
- run: cabal sdist
build-windows:
runs-on: windows-latest
needs: ormolu
strategy:
matrix:
cabal: ["3.10"]
ghc: ["9.2.8", "9.4.5", "9.6.2"]
env:
CONFIG: "--enable-tests --enable-benchmarks --flags=dev"
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: cabal update
- run: cabal freeze $CONFIG
- uses: actions/[email protected]
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-0-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-0-
- run: cabal format && git diff --exit-code --color=always
- run: cabal build $CONFIG
- run: cabal test $CONFIG
- run: cabal haddock $CONFIG
- run: cabal sdist