-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (37 loc) · 1.15 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
name: CI
on:
push:
jobs:
build:
# https://markkarpov.com/post/github-actions-for-haskell-ci.html#complete-example
runs-on: ubuntu-latest
strategy:
matrix:
cabal: ["3.10"]
ghc: ["8.8.4", "8.10.5", "9.4.5"]
env:
CONFIG: "--enable-tests --enable-benchmarks"
steps:
- uses: actions/[email protected]
- uses: haskell/actions/[email protected]
# https://github.com/haskell/actions
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: cabal check
- run: cabal v2-update $CONFIG
- run: cabal v2-freeze $CONFIG
# https://github.com/actions/cache
- uses: actions/[email protected]
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-
- run: cabal v2-build $CONFIG
- run: cabal v2-test $CONFIG
- run: cabal v2-haddock $CONFIG
- run: cabal v2-sdist