-
Notifications
You must be signed in to change notification settings - Fork 70
53 lines (45 loc) · 1.28 KB
/
pullrequest-ci.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
name: Pullrequest CI
on:
pull_request:
types:
- opened
- synchronize
jobs:
build-and-test:
name: Build site
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ["9.2.5"]
cabal: ["3.10.1"]
defaults:
run:
working-directory: message-index
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Install Haskell Toolchain
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Configure the build plan
run: |
cabal update
cabal build --dry-run
# cabal build --dry-run creates dist-newstyle/cache/plan.json
# Keep a watch on this `cabal-3.9 build --dry-run` bug:
# https://github.com/haskell/cabal/issues/8706
- name: Read the Cabal cache
uses: actions/cache@v3
with:
path: |
~/.cabal/store
message-index/dist-newstyle
key: |
cabal-cache-ghc-${{ matrix.ghc }}-cabal-${{ matrix.cabal }}-${{ hashFiles('**/plan.json') }}
restore-keys: |
cabal-cache-ghc-${{ matrix.ghc }}-cabal-${{ matrix.cabal }}-
- name: Build with Hakyll
working-directory: message-index
run: cabal run site build