-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (44 loc) · 1.31 KB
/
haskell.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:
check_suite:
types: [completed]
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ["8.8", "8.10", "9.0", "9.2", "9.4", "9.6"]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{matrix.ghc}}
cancel-in-progress: true
env:
CONFIG: "--enable-tests"
steps:
- uses: actions/checkout@v3
- uses: haskell-actions/[email protected]
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-update: false
- run: cabal v2-update
- run: cabal v2-freeze $CONFIG
- uses: actions/cache@v3
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 }}-${{ hashFiles('cabal.project.freeze') }}
${{ runner.os }}-${{ matrix.ghc }}-
- run: cabal v2-build --disable-optimization -j $CONFIG
- run: cabal v2-test --disable-optimization -j $CONFIG
- run: cabal v2-haddock -j $CONFIG
- run: cabal v2-sdist