-
Notifications
You must be signed in to change notification settings - Fork 25
69 lines (60 loc) · 1.63 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
69
name: build
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
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-latest
ghc:
- '8.2'
- '8.4'
- '8.6'
- '8.8'
- '8.10'
- '9.0'
- '9.2'
- '9.4'
include:
- os: macos-latest
ghc: system
- os: windows-latest
ghc: system
steps:
- uses: actions/checkout@v3
- uses: hspec/setup-haskell@v1
with:
ghc-version: ${{ matrix.ghc }}
- run: cabal update
- run: echo "::set-output name=version::`ghc --numeric-version`"
shell: bash
id: ghc
- uses: actions/cache@v3
with:
path: ${{ runner.os == 'Windows' && 'C:/cabal/store' || '~/.cabal/store' }}
key: ${{ runner.os }}-v2-${{ steps.ghc.outputs.version }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-v2-${{ steps.ghc.outputs.version }}-
- uses: sol/run-haskell-tests@v1
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: false
if: needs.build.result != 'success'
- uses: actions/checkout@v3
- name: Check for trailing whitespace
run: '! git grep -I "\s\+$"'