-
Notifications
You must be signed in to change notification settings - Fork 42
58 lines (50 loc) · 1.48 KB
/
emscripten.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
name: Emscripten version
on:
push:
branches: [master]
workflow_dispatch:
env:
emsdk_ver: 3.1.49
jobs:
build:
name: Emscripten version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Cache emsdk
id: cache-emsdk
uses: actions/cache@v3
with:
path: emsdk
key: ${{ runner.os }}-${{ env.emsdk_ver }}
- name: Install Packages
run: |
sudo apt-get update -qq
sudo apt-get install -y git
- if: ${{ steps.cache-emsdk.outputs.cache-hit != 'true' }}
name: Prep
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install ${{ env.emsdk_ver }}
./emsdk activate ${{ env.emsdk_ver }}
mkdir env
- name: Build
run: |
cd emsdk
export WORKSPACE="${{github.workspace}}/emsdk/env"
../contrib/instead-em-build.sh
- name: Create Artifact
run: |
cd emsdk
mkdir -p ../release/instead-em
cp env/instead-em-js/instead-em.* ../release/instead-em
cp -f env/instead-em-js/instead.html ../release/instead-em/instead-em.html
cp env/instead-em-js/load* ../release/instead-em
cp env/instead-em-js/*.svg ../release/instead-em
- name: Publish Artifact
uses: actions/upload-artifact@v3
with:
name: instead-em
path: release
retention-days: 1