-
Notifications
You must be signed in to change notification settings - Fork 11
63 lines (52 loc) · 1.36 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
name: CI
# Trigger the workflow on push or pull request
on:
pull_request:
push:
# but only for the master branch
# branches: [master]
defaults:
run:
shell: bash
jobs:
stack:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
ghc:
- "8.10"
- "8.8"
- "8.6"
include:
- os: macOS-latest
ghc: "8.10"
# - os: windows-latest
# ghc: "8.10"
env:
STACK_FLAGS: "--system-ghc --no-install-ghc --fast"
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
enable-stack: true
ghc-version: ${{ matrix.ghc }}
- name: Set up stack
id: stack-setup
run: |
ln -s stack-${{ matrix.ghc }}.yaml stack.yaml
echo "::set-output name=stack-root::$(stack path --system-ghc --no-install-ghc --stack-root)"
- uses: actions/cache@v1
with:
path: ${{ steps.stack-setup.outputs.stack-root }}
key: ${{ runner.os }}-${{ matrix.ghc }}-stack
- name: Build dependencies
run: |
stack build $STACK_FLAGS --test --no-run-tests --only-dependencies
- name: Build
run: |
stack build $STACK_FLAGS --test --no-run-tests
- name: Test
run: |
stack test