-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (42 loc) · 1.16 KB
/
ci.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
name: CI
on:
- push
- pull_request
jobs:
cabal:
name: ${{ matrix.os }} - GHC ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
ghc:
- 9.2.7
- 9.4.4
- 9.6.1
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v2
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
- name: Restore cache
uses: actions/cache/restore@v3
with:
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
- name: Build
run: |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
cabal build all
- name: Test
run: |
cabal test all
- name: Save cache
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}