forked from Peaker/dwarf
-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (42 loc) · 1.33 KB
/
ci.yaml
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
name: CI
on:
push:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc-ver: ["9.2.8", "9.4.5", "9.6.2"]
cabal: ["3.10.1.0"]
# complete all jobs
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Link cabal project files
run: |
ln -s cabal.project.dist cabal.project
ln -s cabal.project.werror cabal.project.local
ln -s cabal.project.dist.freeze.ghc-${{ matrix.ghc-ver }} cabal.project.freeze
- uses: haskell/actions/setup@v1
id: setup-haskell
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc-ver }}
cabal-version: ${{ matrix.cabal }}
- name: Cache
uses: actions/cache@v1
with:
path: /home/runner/.cabal/store/ghc-${{ matrix.ghc-ver }}
# Prefer previous SHA hash if it is still cached
key: linux-${{ matrix.ghc-ver }}-${{ hashFiles('cabal.project.freeze') }}-${{ github.sha }}
# otherwise just use most recent build.
restore-keys: linux-${{ matrix.ghc-ver }}-${{ hashFiles('cabal.project.freeze') }}
- name: Cabal update
run: cabal update
- name: Cabal build
run: cabal build
- name: Cabal test
run: cabal test