-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (65 loc) · 2.23 KB
/
haskell.yml
File metadata and controls
83 lines (65 loc) · 2.23 KB
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
76
77
78
79
80
81
82
83
name: Haskell CI
on:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
fourmolu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: haskell-actions/run-fourmolu@015e6ed9db2b3f344482792d42b7317c764eb30f # v12
with:
version: "0.15.0.0"
build:
name: GHC ${{ matrix.ghc-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ghc-version: ['9.12', '9.10', '9.8', '9.6', '9.4', '9.2']
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up GHC ${{ matrix.ghc-version }}
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: "3.16.1.0"
- name: Show toolchain versions
shell: bash
run: |
ghc --numeric-version
cabal --numeric-version
- name: Check cabal file
run: cabal check
- name: Update cabal package index
run: cabal update
- name: Configure the build
run: |
cabal configure --enable-tests --enable-benchmarks --disable-documentation
cabal build --dry-run
- name: Restore cabal store cache
uses: actions/cache/restore@v4
id: cache-restore
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ runner.os }}-ghc-${{ matrix.ghc-version }}-cabal-${{ hashFiles('**/plan.json') }}
restore-keys: |
${{ runner.os }}-ghc-${{ matrix.ghc-version }}-cabal-
- name: Build dependencies
run: cabal build --only-dependencies
- name: Save cabal store cache
uses: actions/cache/save@v4
if: steps.cache-restore.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
- name: Build the package
run: cabal build all
- name: Run tests
run: cabal test all
- name: Build documentation
run: cabal haddock all --disable-documentation