-
Notifications
You must be signed in to change notification settings - Fork 73
35 lines (35 loc) · 1.27 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
on: [pull_request]
name: build
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.2', '9.2.2', '9.4.2']
name: Haskell GHC ${{ matrix.ghc }} cabal
env:
cabal_project_freeze: cabal.project.${{ matrix.ghc }}.freeze
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v2
id: setup-haskell-build
with:
ghc-version: ${{ matrix.ghc }}
- name: Cache Cabal build artifacts
uses: actions/cache@v2
with:
path: |
${{ steps.setup-haskell-build.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-cabal-${{ matrix.ghc }}-${{ hashFiles(env.cabal_project_freeze) }}
restore-keys: |
${{ runner.os }}-cabal-${{ matrix.ghc }}
- name: Cabal build dependencies
run: |
cabal build all --enable-tests --only-dependencies --project-file=cabal.project.${{ matrix.ghc }}
- name: Cabal build packages
run: |
cabal build all --enable-tests --project-file=cabal.project.${{ matrix.ghc }}
- name: Cabal test
run: |
cabal test all --enable-tests --test-show-details=Always --project-file=cabal.project.${{ matrix.ghc }}