-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (42 loc) · 1.34 KB
/
pipeline.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
name: pipeline
on: [push, pull_request]
jobs:
pipeline:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
ghc: ["8.10", "9.0", "9.2"]
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Setup Haskell
id: setup-haskell-cabal
uses: haskell/actions/setup@v2
with:
ghc-version: "9.2"
- name: Formatting
uses: mrkkrp/ormolu-action@v15
- name: Set up HLint
uses: haskell/actions/hlint-setup@v2
- name: Run HLint
uses: haskell/actions/hlint-run@v2
with:
path: '["src/", "test/"]'
- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v4
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-ghc-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }}
restore-keys: ${{ runner.os }}-ghc-
- name: Configure
run: cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
- name: Install dependencies
run: cabal build all --only-dependencies
- name: Build
run: cabal build all
- name: Test
run: cabal test all