-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.46 KB
/
build.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
name: build
on:
push:
pull_request:
branches: ["master"]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
ghc: ["9.4.8"]
cabal: ["3.8"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Cache Cabal
uses: actions/cache@v4
env:
cache-name: cache-cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-
- name: Set up HLint
uses: haskell-actions/hlint-setup@v2
- name: Run HLint
uses: haskell-actions/hlint-run@v2
with:
fail-on: warning
- name: Check for Ormolu formatting
uses: haskell-actions/run-ormolu@v16
with:
pattern: |
app/**/*.hs
lib/**/*.hs
test/**/*.hs
- name: Install LLVM
run: sudo apt install -y llvm-17 llvm-17-dev
- name: Build project
run: cabal build
- name: Run tests
run: >
cabal test
--test-show-details=direct
--test-options "--color=always"