-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.57 KB
/
main.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
name: main
on:
- push
- pull_request
jobs:
test:
strategy:
matrix:
ghc: ['9.2.8', '9.4.4', '9.6.2']
test: [doctest, spec]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
- run: cp cabal.project.${{ matrix.ghc }}.freeze cabal.project.freeze
- uses: actions/cache/restore@v3
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
./dist-newstyle
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('./cabal.project.freeze') }}
restore-keys: cabal-${{ runner.os }}-${{ matrix.ghc }}-
- run: make build-deps
- uses: actions/cache/save@v3
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
./dist-newstyle
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('./cabal.project.freeze') }}
- run: make build
env:
CABAL_OPTIONS: --ghc-options -Werror
- run: make ${{ matrix.test }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/hlint-setup@v2
- run: sudo apt-get install libtinfo5
- run: make lint
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: curl -sL https://raw.github.com/haskell/stylish-haskell/master/scripts/latest.sh | sh -s -- --inplace --recursive src app test
- run: git diff --exit-code