forked from melange-re/melange-esy-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (41 loc) · 1.23 KB
/
build-sample-project.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
on:
pull_request:
push:
branches:
- main
jobs:
build-sample-project:
name: Build sample project
strategy:
matrix:
system: [windows-latest, ubuntu-latest, macos-latest]
fail-fast: false
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: current
- name: Restore cache
uses: actions/cache@v3
id: restore-cache
with:
# The entire ~/.esy directory has to be cached because esy's
# import/export commands don't import/export the Melange JS runtime
# files.
path: ~/.esy
key: ${{ matrix.system }}-esy-${{ hashFiles('esy.lock/index.json') }}
restore-keys: |
${{ matrix.system }}-esy-
- name: Install esy
run: npm install -g @esy-nightly/esy
# Separating the esy steps provides more fine-grained insight when
# debugging failed jobs
- name: esy install
run: esy install
- name: Build esy dependencies
run: esy build-dependencies --release
- name: Build project
run: esy build --release
- name: Bundle JS app
run: esy run-script bundle