-
Notifications
You must be signed in to change notification settings - Fork 6
66 lines (56 loc) · 1.76 KB
/
haskell.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
name: Haskell
on:
push:
branches: [master]
tags:
- "v*"
paths:
- ".github/workflows/**"
- "src/**"
- "package.yaml"
- "stack*.yaml"
pull_request:
branches: [master]
jobs:
build:
strategy:
fail-fast: false
matrix:
resolver:
- stack-lts-20
- stack-lts-19
- stack-lts-18
- stack-lts-17.14
- stack-lts-16.1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
id: install-haskell
with:
stack-no-global: true
enable-stack: true
stack-version: "latest"
- name: Cache .stack
id: cache-stack
uses: actions/cache@v3
with:
path: ${{ steps.install-haskell.outputs.stack-root }}
key: ${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(format('{0}.yaml', matrix.resolver)) }}-${{ hashFiles('wai-saml2.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 --haddock --only-dependencies --fast
- name: Build
run: |
stack --stack-yaml=${{ matrix.resolver }}.yaml --no-terminal build --fast \
--test --no-run-tests \
--haddock --haddock-arguments='-odocs'
- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: docs-${{ matrix.resolver }}
path: docs/
- name: Test
run: stack --stack-yaml=${{ matrix.resolver }}.yaml --no-terminal test --fast