Skip to content

Commit 237f9a6

Browse files
committed
Add continuous build workflow.
1 parent 315967a commit 237f9a6

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/build.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build
2+
permissions: read-all
3+
4+
on:
5+
push:
6+
paths:
7+
- 'package.yaml'
8+
- 'stack.yaml'
9+
- 'app/**'
10+
- 'site/**'
11+
- 'src/**'
12+
- 'test/**'
13+
14+
jobs:
15+
build:
16+
concurrency: build
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- uses: haskell/actions/setup@v2
23+
with:
24+
enable-stack: true
25+
26+
- name: Cache dependencies
27+
uses: actions/cache@v3
28+
with:
29+
path: ~/.stack
30+
key: stack-${{ hashFiles('package.yaml', 'stack.yaml') }}
31+
restore-keys: stack-
32+
33+
- name: Cache build artifacts
34+
uses: actions/cache@v3
35+
with:
36+
path: .stack-work
37+
key: build-${{ hashFiles('app/**', 'src/**', 'test/**') }}
38+
restore-keys: build-
39+
40+
- name: Build and test
41+
run: stack build --test
File renamed without changes.

0 commit comments

Comments
 (0)