-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (64 loc) · 1.72 KB
/
ci.yml
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
78
79
name: Kairos CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ['9.4.7']
cabal: ['3.10.1.0']
steps:
- uses: actions/checkout@v3
- name: Setup Haskell
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-
- name: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks
- name: Build
run: cabal build --enable-tests --enable-benchmarks all
- name: Run tests
run: cabal test all
- name: Check formatting
uses: haskell/actions/hlint-setup@v2
with:
version: '3.5'
- name: Run HLint
run: hlint .
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Haskell
uses: haskell/actions/setup@v2
with:
ghc-version: '9.4.7'
cabal-version: '3.10.1.0'
- name: Install Haddock
run: cabal install haddock
- name: Generate documentation
run: cabal haddock --enable-documentation
- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: docs
path: dist-newstyle/build/**/doc/html/