-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.88 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
name: CI
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
defaults: { run: { shell: bash } }
jobs:
build:
name: stackage ${{ matrix.resolver }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
resolver: ['lts-20.24']
steps:
- name: git checkout
uses: actions/checkout@v3
- name: Setup Haskell Compiler (stack)
id: setup-haskell
uses: haskell/actions/setup@d6a7b316f66cd8a730ed619cdc80c276df942196 # v2.4.3
with:
enable-stack: true
stack-no-global: true
- name: Cache .stack-work
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: .stack-work
key: stack-work-${{ matrix.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml', '**/*.cabal') }}-${{ hashFiles('internal/**','src/**','app/**','tests/**','benchmarks/**') }}
restore-keys: |
stack-work-${{ matrix.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml', '**/*.cabal') }}-
stack-work-${{ matrix.os }}-${{ matrix.resolver }}-
- name: Cache ~/.stack
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ steps.setup-haskell.outputs.stack-root }}
key: stack-root-${{ matrix.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml', '**/*.cabal') }}
restore-keys: stack-root-${{ matrix.os }}-${{ matrix.resolver }}-
- name: Get dependencies
run: stack build --resolver=${{ matrix.resolver }} --only-dependencies --test --bench --no-run-tests --no-run-benchmarks
- name: Build
run: stack build --resolver=${{ matrix.resolver }} --test --bench --no-run-tests --no-run-benchmarks
- name: Test
run: stack test --resolver=${{ matrix.resolver }}