From 251161673335249400968fb9435d2827b44a2029 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 20 Sep 2024 20:54:46 +0200 Subject: [PATCH] Add emscripten build job. --- .github/workflows/emscripten.yml | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/emscripten.yml diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml new file mode 100644 index 0000000000..49bb89187e --- /dev/null +++ b/.github/workflows/emscripten.yml @@ -0,0 +1,40 @@ +name: emscripten + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + container: archlinux:base-devel + steps: + - name: Install dependencies + run: pacman -Syu --noconfirm && pacman -S --noconfirm --needed cmake git unzip python ninja + - name: Setup emscripten + uses: mymindstorm/setup-emsdk@v14 + with: + version: 3.1.67 + actions-cache-folder: 'emsdk-cache' + - uses: actions/checkout@v4 + - name: Profiler GUI + run: | + cmake -G Ninja -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=emsdk-cache/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake + cmake --build profiler/build --parallel + - name: Compress artifacts + run: | + gzip -9 profiler/build/tracy-profiler.js profiler/build/tracy-profiler.wasm + - name: Find Artifacts + id: find_artifacts + run: | + mkdir -p bin + cp profiler/build/index.html bin + cp profiler/build/tracy-profiler.data bin + cp profiler/build/tracy-profiler.js.gz bin + cp profiler/build/tracy-profiler.wasm.gz bin + - uses: actions/upload-artifact@v4 + with: + name: emscripten + path: bin