-
Notifications
You must be signed in to change notification settings - Fork 15
64 lines (55 loc) · 1.53 KB
/
cabal.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
53
54
55
56
57
58
59
60
61
62
63
64
name: cabal
on:
push:
pull_request:
jobs:
build:
name: ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
matrix:
cabal: ["3.10.3.0"]
ghc:
- "9.2.8"
- "9.4.7"
- "9.6.3"
include:
- repo: "hackage"
- ghc: "9.8.1"
repo: "github"
- ghc: "9.8.1"
repo: "hackage"
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup z3
uses: pavpanchekha/[email protected]
with:
version: "4.8.7"
- name: Setup GHC and cabal-install
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Configure the build
run: |
if [ ${{ matrix.repo }} == "github" ]
then
cp cabal.project.github cabal.project
fi
cabal configure --enable-tests --enable-benchmarks --disable-documentation
# generate dist-newstyle/cache/plan.json
cabal build all --dry-run
- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v3
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('**/*.cabal', './dist-newstyle/cache/plan.json') }}
- name: Update package list
run: cabal update
- name: Build
run: cabal build all