-
Notifications
You must be signed in to change notification settings - Fork 49
63 lines (54 loc) · 1.66 KB
/
Copy pathbuild.yml
File metadata and controls
63 lines (54 loc) · 1.66 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
name: build
on:
push:
branches:
- master
paths:
- ".github/workflows/**"
- "src/**"
- "tests/**"
- "docker.cabal"
- "stack*.yaml"
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
resolver:
- "stack-7.10"
- "stack-8.0"
- "stack-8.0.2"
- "stack-8.6.4"
- "stack-8.8.2"
- "stack-8.10.7"
- "stack-9.0.2"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v1
id: install-haskell
with:
enable-stack: true
stack-version: "latest"
stack-no-global: true
stack-setup-ghc: true
- name: Cache .stack
id: cache-stack
uses: actions/cache@v3.0.1
with:
path: ${{ steps.install-haskell.outputs.stack-root }}
key: ${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(format('{0}.yaml', matrix.resolver)) }}-${{ hashFiles('docker.cabal') }}
restore-keys: |
${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(format('{0}.yaml', matrix.resolver)) }}-
${{ runner.os }}-${{ matrix.resolver }}-
- name: Install dependencies
run: |
stack --stack-yaml=${{ matrix.resolver }}.yaml --no-terminal build --test --only-dependencies --fast
- name: Build
run: |
stack --stack-yaml=${{ matrix.resolver }}.yaml --no-terminal build --fast --test --no-run-tests
- name: Test
run: |
export RUN_INTEGRATION_TESTS=1
stack --stack-yaml=${{ matrix.resolver }}.yaml --no-terminal test --fast