-
Notifications
You must be signed in to change notification settings - Fork 30
75 lines (65 loc) · 1.79 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
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
name: ci
on:
push:
branches:
- master
pull_request:
jobs:
nix-build:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
ghc:
- 8107
- 902
- 924
- 946
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
name: Checkout
- uses: cachix/install-nix-action@v22
name: Install Nix
- uses: cachix/cachix-action@v12
name: Set up Cachix
with:
name: awakesecurity
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix-build --argstr compiler ghc${{ matrix.ghc }}
name: Build Package
stack-build:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
ghc:
- 8.10.7
- 9.0.2
- 9.2.8
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Haskell
uses: haskell/actions/[email protected]
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: 2.11
- name: Cache dependencies
uses: actions/[email protected]
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-stack
- name: Build
run: stack build --system-ghc --stack-yaml stack-${{ matrix.ghc }}.yaml
- name: Test
run: stack test --system-ghc --stack-yaml stack-${{ matrix.ghc }}.yaml
# Test fails with ld warnings on macos-stack combo
# doctest fails with ghc-9.0.2 + stack: https://github.com/sol/doctest/issues/327
continue-on-error: ${{ matrix.os == 'macos-latest' || matrix.ghc == '9.0.2' }}