-
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.05 KB
/
ci.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
name: CI
on:
pull_request:
push:
branches: [main]
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Stack
uses: haskell-actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Cache Stack build files
uses: actions/cache@v3
with:
path: |
~/.stack
.stack-work
key: >-
${{ runner.os }}-stack-${{
hashFiles('stack.yaml.lock', 'package.yaml') }}
restore-keys: |
${{runner.os}}-stack
- name: Test
run: stack test --ghc-options="-O2"
- name: Copy binary to ~/.local/bin so it can be uploaded
run: stack install
- name: Upload ${{ runner.os }} Release
uses: actions/upload-artifact@v3
with:
path: ~/.local/bin/haskell-template
name: haskell-template_${{ runner.os }}_${{ runner.arch }}