Skip to content

Commit 2511616

Browse files
committed
Add emscripten build job.
1 parent 39497ab commit 2511616

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/emscripten.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: emscripten
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
container: archlinux:base-devel
13+
steps:
14+
- name: Install dependencies
15+
run: pacman -Syu --noconfirm && pacman -S --noconfirm --needed cmake git unzip python ninja
16+
- name: Setup emscripten
17+
uses: mymindstorm/setup-emsdk@v14
18+
with:
19+
version: 3.1.67
20+
actions-cache-folder: 'emsdk-cache'
21+
- uses: actions/checkout@v4
22+
- name: Profiler GUI
23+
run: |
24+
cmake -G Ninja -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=emsdk-cache/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
25+
cmake --build profiler/build --parallel
26+
- name: Compress artifacts
27+
run: |
28+
gzip -9 profiler/build/tracy-profiler.js profiler/build/tracy-profiler.wasm
29+
- name: Find Artifacts
30+
id: find_artifacts
31+
run: |
32+
mkdir -p bin
33+
cp profiler/build/index.html bin
34+
cp profiler/build/tracy-profiler.data bin
35+
cp profiler/build/tracy-profiler.js.gz bin
36+
cp profiler/build/tracy-profiler.wasm.gz bin
37+
- uses: actions/upload-artifact@v4
38+
with:
39+
name: emscripten
40+
path: bin

0 commit comments

Comments
 (0)