-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.25 KB
/
build.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
name: build
on:
push:
pull_request:
permissions:
contents: read
jobs:
build:
name: ${{ matrix.ghc-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc-version: ["9.2"]
steps:
- name: 📥 Check out repository
uses: actions/checkout@v3
- name: 🚧 Set up GHC ${{ matrix.ghc-version }}
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: "latest"
cabal-update: true
enable-stack: true
stack-version: "latest"
- name: 🏗️ Restore cached dependencies
uses: actions/cache@v3
id: cache
env:
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-stack-${{ steps.setup.outputs.stack-version }}
with:
path: |
~/.stack
.stack-work
key: ${{ env.key}}-plan-${{ hashFiles('stack.yaml', 'package.yaml') }}
restore-keys: ${{ env.key }}-
- name: ⚒️ Build
run: stack build
- name: 📖 Build documentation
run: stack haddock
- name: 📦 Package
run: stack sdist