-
-
Notifications
You must be signed in to change notification settings - Fork 143
52 lines (45 loc) · 1.32 KB
/
ormolu.yaml
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
# FUTUREWORK: add this to `ci.dhall`?
# TODO(srk): ^^
name: Ormolu
on:
- pull_request
jobs:
ormolu:
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v3"
- uses: "haskell-actions/setup@v2"
id: setup-haskell-cabal
with:
cabal-version: "${{ matrix.cabal }}"
enable-stack: false
ghc-version: "${{ matrix.ghc }}"
- uses: "actions/cache@v3"
name: Cache
with:
key: "${{ runner.os }}"
path: |
"${{ steps.setup-haskell-cabal.outputs.cabal-store }}"
~/.cabal/packages
~/.cabal/store
~/.cabal/bin
dist-newstyle
~/.local/bin
- name: Install dependencies
run: |
export PATH=$PATH:$HOME/.cabal/bin:$HOME/.local/bin
export ORMOLU_VERSION=$(cat ./layout/ormolu.version)
(ormolu -v 2>/dev/null | grep -q $ORMOLU_VERSION) || (cabal update && cabal install ormolu --constraint="ormolu ==$ORMOLU_VERSION")
test -e $HOME/.local/bin/yq || pip3 install yq
shell: bash
- name: Ormolu
run: |
export PATH=$PATH:$HOME/.cabal/bin:$HOME/.local/bin
./layout/ormolu.sh -c
shell: bash
strategy:
matrix:
cabal:
- '3.10'
ghc:
- '9.4.7'