-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 968 Bytes
/
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
name: Build and publish artifact
on: [push]
env:
EM_VERSION: 3.1.71
EM_CACHE_FOLDER: 'emsdk-cache'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup cache
id: cache-system-libraries
uses: actions/cache@v2
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{ runner.os }}
- uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
- name: Create build folder
run: mkdir -p build
- name: Build AudioEngine
run: emcc -std=c++11 -lembind -s ALLOW_MEMORY_GROWTH -s EXPORTED_FUNCTIONS="['_malloc', '_free']" -s AUDIO_WORKLET=1 -s WASM_WORKERS=1 -O3 --emit-tsd audioengine.ts.d -o build/audioengine.js audioengine.cpp
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build