-
Notifications
You must be signed in to change notification settings - Fork 97
75 lines (65 loc) · 2.32 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
65
66
67
68
69
70
71
72
73
74
75
name: Continuous integration
on:
push:
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
pull_request:
jobs:
continuous-integration:
# You can skip continuous integration by writing '[ci skip]' or '[skip ci]' in a commit message,
# which is useful to preserve computing resources
#
# For example:
# > git commit -am "[skip ci] fixed x y z"
if: contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false
strategy:
fail-fast: false
matrix:
include:
- ghc-version: "8.10.7"
cabal-flags: ""
- ghc-version: "9.0.2"
cabal-flags: ""
- ghc-version: "9.2.8"
cabal-flags: ""
- ghc-version: "9.4.5"
cabal-flags: ""
- ghc-version: "9.6.4"
cabal-flags: ""
- ghc-version: "9.8.2"
cabal-flags: ""
- ghc-version: "9.10.1"
cabal-flags: ""
# Temporary cabal flags until all dependencies are updated
- ghc-version: "9.12.1"
cabal-flags: "--allow-newer=base --allow-newer=template-haskell --allow-newer=ghc-prim"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: Install cabal/ghc
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: '3.12.1.0'
- name: Generate freeze file
run: |
cabal configure --enable-tests --test-show-details=direct
cabal freeze ${{matrix.cabal-flags}} --minimize-conflict-set
cat cabal.project.freeze
- name: Cache cabal work
uses: actions/cache@v4
with:
path: |
dist-newstyle
${{ steps.setup-haskell.outputs.cabal-store }}
# We are using the hash of 'cabal.project.local' so that different levels
# of optimizations are cached separately
key: ${{ runner.os }}-${{ hashFiles('cabal.project', 'cabal.project.local') }}-cabal-install
- name: Build dependencies only
run: cabal build all --only-dependencies ${{matrix.cabal-flags}}
- name: Build all packages
run: cabal build all ${{matrix.cabal-flags}}
- name: Run all tests
run: cabal test all ${{matrix.cabal-flags}}