-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (45 loc) · 1.26 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
name: CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
cabal: ["3.2.0.0", "3.4.0.0", "3.6.0.0", "3.8.0.0"]
ghc: ["8.10.7", "9.0.2", "9.2.2", "9.4.6"]
os: [ubuntu-latest]
exclude:
- cabal: "3.2.0.0"
ghc: "9.0.2"
- cabal: "3.2.0.0"
ghc: "9.2.2"
- cabal: "3.4.0.0"
ghc: "9.2.2"
- cabal: "3.6.0.0"
ghc: "8.10.7"
- cabal: "3.6.0.0"
ghc: "9.0.2"
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: haskell/actions/setup@v1
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
- name: Build
run: |
cabal v2-update
cabal v2-build --enable-tests --enable-benchmarks
- name: Test
run: |
cabal v2-test