-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (54 loc) · 1.71 KB
/
macos.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
54
55
56
57
58
59
60
name: CI (macOS)
# disabled due to a bug related to restoring from cache
# Sample: https://github.com/pschachte/wybe/pull/79/checks?check_run_id=935285745
on:
push:
branches-ignore:
- '**'
# on:
# push:
# branches:
# - master
# pull_request:
# branches:
# - master
jobs:
build:
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
brew install llvm
brew install bdw-gc
brew install dwdiff
brew install coreutils
# cache Haskell Stack stuff
- name: Cache stack global package db
uses: actions/cache@v1
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('wybe.cabal') }}
restore-keys: |
${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}
# drop the cache if stack.yaml has been changed
- name: Cache stack-installed programs in ~/.local/bin
uses: actions/cache@v1
with:
path: ~/.local/bin
key: ${{ runner.os }}-stack-programs-${{ hashFiles('stack.yaml') }}-${{ hashFiles('wybe.cabal') }}
restore-keys: |
${{ runner.os }}-stack-programs-${{ hashFiles('stack.yaml') }}
- name: Cache .stack-work
uses: actions/cache@v1
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('wybe.cabal') }}
restore-keys: |
${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}
- name: Install & build Haskell Stack dependencies
run: stack build --only-dependencies
- name: Build
run: make
- name: Run tests
run: make test