forked from haskell-github-trust/vector-th-unbox
-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (41 loc) · 1.28 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
name: Haskell CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc: ['8.0', '8.2', '8.4', '8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6', '9.8']
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: latest
- name: Determine precise GHC and Cabal versions
run: |
echo "GHC_VERSION=$(ghc --numeric-version)" >> "${GITHUB_ENV}"
echo "CABAL_VERSION=$(cabal --numeric-version)" >> "${GITHUB_ENV}"
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cabal
key: ${{ runner.os }}-ghc-${{ env.GHC_VERSION }}-cabal-${{ env.CABAL_VERSION }}-sha-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ghc-${{ env.GHC_VERSION }}-cabal-${{ env.CABAL_VERSION }}-
${{ runner.os }}-ghc-${{ env.GHC_VERSION }}-
- name: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks
- name: Build
run: cabal build --enable-tests --enable-benchmarks all
- name: Run tests
run: cabal test all