-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.38 KB
/
cabal-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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build with Cabal
on:
workflow_dispatch:
push:
schedule:
- cron: '0 8 * * *'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: ['9.0', '9.2', '9.4', '9.6', '9.8']
cabal: ['3.10']
os: ['ubuntu-22.04', 'ubuntu-20.04', 'macOS-latest']
steps:
# Setup
- name: Checkout repository
uses: actions/checkout@v3
- name: Install GHC and Cabal
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Configure project
run: |
cat > cabal.project.local <<EOF
package merkle-log
documentation: True
benchmarks: True
tests: True
EOF
# Restore Packages from Caches
- uses: actions/cache@v3
name: Cache dist-newstyle
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ matrix.os }}-${{ matrix.ghc }}-cabal
# Build
- name: Update package database
run: cabal update
- name: Configure build
run: |
cabal build all --dry-run
cabal freeze
- name: Install build dependencies
run: cabal build --only-dependencies
- name: Build library
run: cabal build
# Tests
- name: Run Tests
run: cabal test