-
Notifications
You must be signed in to change notification settings - Fork 22
44 lines (36 loc) · 1.15 KB
/
project-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
name: CI
# Trigger the workflow on push or pull request, but only for the main branch
on:
pull_request:
push:
branches: [main]
jobs:
stack:
name: stack / ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
matrix:
stack: ["2.7.5"]
ghc: ["9.0.2"]
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'
- uses: haskell/actions/setup@v1
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}
- uses: actions/[email protected]
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack
- name: Install dependencies
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies --arch x86_64
- name: Build
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --arch x86_64
- name: Test
run: |
stack test --system-ghc --test-arguments=--format=progress --arch x86_64