From c892cef63db33cc0db500acf423a072ce1dc41f6 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 28 Mar 2025 10:45:18 +0100 Subject: [PATCH] ci : add build of wasm examples to CI This commit add the building of the wasm examples to CI. Refs: https://github.com/ggerganov/whisper.cpp/issues/2784 --- .github/workflows/examples.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 74ef8e0f..dd8e3f51 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -4,10 +4,18 @@ on: paths: - examples/addon.node/** - whisper.h + - examples/command.wasm/** + - examples/bench.wasm/** + - examples/stream.wasm/** + - examples/whisper.wasm/** pull_request: paths: - examples/addon.node/** - whisper.h + - examples/command.wasm/** + - examples/bench.wasm/** + - examples/stream.wasm/** + - examples/whisper.wasm/** jobs: addon_node-ubuntu-22: @@ -46,3 +54,22 @@ jobs: run: | cd examples/addon.node npm run test + + wasm-ubuntu-22: + runs-on: ubuntu-22.04 + + steps: + - name: Clone + uses: actions/checkout@v1 + + - name: Setup emsdk + uses: mymindstorm/setup-emsdk@v14 + + - name: Verify + run: emcc -v + + - name: Build + run: | + mkdir build-em && cd build-em + emcmake cmake .. + make -j