-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (44 loc) · 1.17 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
name: CI
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
types:
- opened
- synchronize
paths-ignore:
- 'docs/**'
- '*.md'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
cabal: ["3.12.0.0"]
ghc: ["9.2", "9.4" , "9.6" , "9.8" , "9.10"]
runs-on: ${{ matrix.os }}
env:
CONFIG: "--enable-tests"
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/cache@v3
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-
- run: cabal build $CONFIG
- run: cabal test $CONFIG
- run: cabal haddock $CONFIG
- run: cabal sdist