-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.23 KB
/
build.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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/checkout@v2
- name: Install esy
run: npm install -g esy
- name: Try to restore install cache
uses: actions/cache@v1
with:
path: ~/.esy/source
key: source-${{ hashFiles('**/index.json') }}
- name: Install
run: esy install
- name: Print esy cache
id: print_esy_cache
run: node .github/workflows/print_esy_cache.js
- name: Try to restore build cache
id: deps-cache-macos
uses: actions/cache@v1
with:
path: ${{ steps.print_esy_cache.outputs.esy_cache }}
key: build-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
restore-keys: build-${{ matrix.os }}-
- name: Build
run: |
esy build
# Cleanup build cache in case dependencies have changed
esy cleanup .
- name: Test
run: esy test
- name: Build docs
run: esy doc
if: matrix.os != 'windows-latest'