-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (64 loc) · 1.81 KB
/
ci.yaml
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
70
71
72
73
74
75
# SPDX-FileCopyrightText: 2020 Kowainik
# SPDX-FileCopyrightText: 2022 Serokell <https://serokell.io/>
#
# SPDX-License-Identifier: MPL-2.0
name: CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]
jobs:
haskell:
name: GHC ${{ matrix.ghc }} / config ${{ matrix.stack }}
runs-on: ubuntu-latest
strategy:
matrix:
ghc:
- "9.4.5"
- "9.2.7"
- "9.0.1"
- "8.10.7"
- "8.8.4"
- "8.6.5"
stack: [stack.yaml]
include:
- ghc: latest
stack: stack.yaml
experimental: true
steps:
- uses: actions/checkout@v4
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: haskell/actions/setup@v2
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
- uses: actions/cache@v3
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.stack }}
- name: Build
run: |
stack build --system-ghc --ghc-options '-Werror' --stack-yaml ${{ matrix.stack }}
- name: Haddock
run: |
stack haddock --system-ghc --no-haddock-deps --stack-yaml ${{ matrix.stack }}
- name: Test
run: |
stack test --system-ghc --ghc-options '-Werror' --stack-yaml ${{ matrix.stack }}
reuse:
name: REUSE Compliance Check
runs-on: ubuntu-latest
steps:
- name: Check
uses: fsfe/reuse-action@v1
xrefcheck:
name: Verify cross references
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: serokell/xrefcheck-action@v1
with:
xrefcheck-version: 0.2.2