-
Notifications
You must be signed in to change notification settings - Fork 47
47 lines (39 loc) · 1.19 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
name: MacOS, Ubuntu, Windows
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: ['9.8.1', '9.6.3', '9.4.7']
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
# cabal-version: '3.8.1.0'
cabal-update: true
- name: Cache
uses: actions/cache@v3
env:
cache-name: haskell.yml
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ runner.os }}-${{ env.cache-name }}-ghc-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project') }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}-ghc-${{ matrix.ghc }}-
- name: Install dependencies
run: |
cabal build --only-dependencies --enable-tests --enable-benchmarks -vnormal+nowrap all
- name: Build
run: cabal build --enable-tests --enable-benchmarks -j1 -vnormal+nowrap all
- name: Run tests
run: cabal test -j1 -vnormal+nowrap all