-
Notifications
You must be signed in to change notification settings - Fork 47
65 lines (55 loc) · 1.71 KB
/
stack.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
name: Stack build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: Stack ${{ matrix.ghc }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc: ['9.8', '9.6', '9.4', '9.2', '9.0', '8.10', '8.8', '8.6', '8.4']
include:
- os: macos-latest
ghc: '9.8'
- os: windows-latest
ghc: '9.8'
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
cabal-update: false
- name: Restore cache
uses: actions/cache/restore@v4
id: cache
env:
key: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}
with:
key: ${{ env.key }}-commit-${{ github.sha }}
restore-keys: ${{ env.key }}-
path: |
${{ steps.setup.outputs.stack-root }}
.stack-work
- name: Build dependencies
run: stack build --stack-yaml=stack-${{ matrix.ghc }}.yaml --system-ghc --only-dependencies
- name: Build
run: stack build --stack-yaml=stack-${{ matrix.ghc }}.yaml --system-ghc
- name: Build tests
run: stack test --stack-yaml=stack-${{ matrix.ghc }}.yaml --system-ghc --no-run-tests
- name: Run tests
run: stack test --stack-yaml=stack-${{ matrix.ghc }}.yaml --system-ghc
- name: Save cache
uses: actions/cache/save@v4
if: always()
with:
key: ${{ steps.cache.outputs.cache-primary-key }}
path: |
${{ steps.setup.outputs.stack-root }}
.stack-work