Repository navigation
79 lines (66 loc) · 1.92 KB
/
Copy pathci.yml
File metadata and controls
79 lines (66 loc) · 1.92 KB
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
76
77
78
79
name: CI
on:
push:
pull_request:
workflow_call:
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/run-fourmolu@v13
with:
version: 0.21.0.0
pattern: |
src/**/*.hs
test/**/*.hs
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/hlint-setup@v2
with:
version: "3.10"
- uses: haskell-actions/hlint-run@v2
with:
path: '["src/", "test/"]'
fail-on: warning
build-test:
name: build-test (${{ matrix.os }}, ${{ matrix.ghc }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
ghc:
- 9.10.3
- 9.12.4
include:
- ghc: 9.10.3
stack-yaml: stack.yaml
- ghc: 9.12.4
stack-yaml: stack-ghc-9.12.yaml
env:
STACK_YAML: ${{ matrix.stack-yaml }}
steps:
- uses: actions/checkout@v4
# the default Xcode's ld can't parse the CLT SDK's .tbd files (arm64e.x1),
# see https://github.com/haskell/cabal/issues/12465
- if: runner.os == 'macOS'
run: sudo xcode-select -s /Library/Developer/CommandLineTools
- uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: latest
- uses: actions/cache@v4
with:
path: ~/.stack
key: stack-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(matrix.stack-yaml, format('{0}.lock', matrix.stack-yaml), 'package.yaml') }}
restore-keys: stack-${{ runner.os }}-${{ matrix.ghc }}-
- name: Build
run: stack build --test --no-run-tests --system-ghc --ghc-options=-Werror
- name: Test
run: stack test --system-ghc --ghc-options=-Werror