Skip to content

Commit 6c801a7

Browse files
committed
wip
1 parent 2b9b852 commit 6c801a7

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed

.github/workflows/callee.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Reusable haskell build workflow
2+
3+
on:
4+
workflow_call:
5+
# https://github.com/orgs/community/discussions/11692
6+
inputs:
7+
matrix-ghc:
8+
required: true
9+
type: string
10+
matrix-os:
11+
required: true
12+
type: string
13+
14+
jobs:
15+
build:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
ghc: ${{ fromJson(inputs.matrix-ghc) }}
20+
os: ${{ fromJson(inputs.matrix-os) }}
21+
runs-on: ${{ matrix.os }}
22+
23+
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
24+
steps:
25+
26+
- uses: actions/checkout@v3
27+
28+
- uses: haskell/actions/setup@v2
29+
with:
30+
ghc-version: ${{ matrix.ghc }}
31+
cabal-version: '3.10.3.0'
32+
33+
- name: Cache
34+
uses: actions/cache@v3
35+
env:
36+
cache-name: cache-cabal
37+
with:
38+
path: ~/.cabal
39+
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
40+
restore-keys: |
41+
${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
42+
${{ runner.os }}-${{ matrix.ghc }}-build-
43+
${{ runner.os }}-${{ matrix.ghc }}-
44+
${{ runner.os }}
45+
46+
- name: Install dependencies
47+
run: |
48+
cabal update
49+
cabal build --only-dependencies --enable-tests --enable-benchmarks
50+
51+
- name: Build
52+
run: cabal build --enable-tests --enable-benchmarks all
53+
54+
- name: Run tests
55+
# We don't run hlint tests, because different versions of hlint have different suggestions, and we don't want to worry about satisfying them all.
56+
run: cabal test --enable-tests -f-hlint all
57+
58+
- if: matrix.ghc != '8.4.4'
59+
# docs aren't built on ghc 8.4.4 because some dependency docs don't build on older GHCs
60+
name: Build Docs
61+
run: cabal haddock

.github/workflows/haskell.yml renamed to .github/workflows/caller.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
uses: reflex-frp/reflex-community/.github/workflows/haskell.yml@0f9c2d9f01ed56ec4b324bcdf8e65f28ed9497e1
7+
uses: reflex-frp/patch/.github/workflows/callee.yml
88
with:
99
matrix-ghc: "['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.5', '9.4.5', '9.6.1', '9.8.2', '9.10.1']"
1010
matrix-os: "['ubuntu-latest', 'macos-latest']"

0 commit comments

Comments
 (0)