-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.24 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
50
51
52
name: CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]
jobs:
build:
name: ${{ matrix.os }} ghc-${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
cabal: ["3.4.0.0"]
ghc: ["8.10.7"]
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v1
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
- name: Install HDF5 (apt)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libhdf5-dev hdf5-tools
pkg-config --libs hdf5
pkg-config --cflags hdf5
- name: Install HDF5 (brew)
if: runner.os == 'macOS'
run: |
brew install hdf5
- name: Build
run: |
cabal v2-update
cabal v2-build --enable-tests --enable-benchmarks
- name: Test
run: |
cabal v2-test --enable-tests --test-show-details=direct