-
Notifications
You must be signed in to change notification settings - Fork 24
68 lines (59 loc) · 1.45 KB
/
build.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
name: build
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * *'
jobs:
build:
name: ${{ matrix.os }} / GHC ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
ghc:
- '7.10'
- '8.0'
- '8.2'
- '8.4'
- '8.6'
- '8.8'
- '8.10'
- '9.0'
- '9.2'
- '9.4'
- '9.6'
- '9.8'
include:
- os: macos-latest
ghc: latest
- os: windows-latest
ghc: latest
steps:
- uses: actions/checkout@v3
- uses: hspec/setup-haskell@v1
with:
ghc-version: ${{ matrix.ghc }}
- name: Install dependencies
run: |
cabal update
cabal configure --enable-tests --enable-benchmarks # NOTE: --enable-tests is necessary due to https://github.com/haskell/cabal/issues/5079
cabal build --only-dependencies
- name: Build
run: cabal build all
- name: Run tests
run: cabal test all --test-show-details=direct
env:
HSPEC_OPTIONS: --color
success:
needs: build
runs-on: ubuntu-latest
if: always() # this is required as GitHub considers "skipped" jobs as "passed" when checking branch protection rules
steps:
- run: exit 1
if: needs.build.result != 'success'