-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (56 loc) · 1.67 KB
/
haskell-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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Continuous Integration
on:
push:
pull_request:
jobs:
continuous-integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc-version:
- "9.4.8"
- "9.6.6"
- "9.8.4"
- "9.10.1"
- "9.12.1"
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.14.1.1'
- name: Generate freeze file
run: |
cabal update
cabal configure --disable-optimization --enable-tests --disable-benchmarks
cabal freeze
# Exclude the timestamp of Hackage index update from our cache key, to
# avoid invalidating cache too often.
# This idea comes from:
# https://github/com/jaspervdj/hakyll
sed '/^index-state: /d' cabal.project.freeze > dependencies-versions
- name: Cache cabal work
uses: actions/cache@v4
with:
path: |
dist-newstyle
${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-${{ hashFiles('dependencies-versions', 'cabal.project.local') }}-cabal-install
- name: Build dependencies
run: |
cabal build all --only-dependencies
- name: Build packages
run: |
cabal build all
- name: Run tests
run: |
cabal test all
- name: Run doctests
run: |
cabal install doctest
cabal repl javelin --with-ghc=doctest
cabal repl javelin-io --with-ghc=doctest
cabal repl javelin-frames --with-ghc=doctest