Skip to content

Commit a70dce3

Browse files
Jean-Michaël Celerierjcelerier
authored andcommitted
ci: add Emscripten (WASM) build
Builds libremidi + the emscripten example with emsdk so the WebMIDI backend (backends/emscripten/*) is compiled on every PR. That backend is wasm-only, so no other CI job exercised it -- which is how the observer update() arg-count regression fixed in this PR slipped through.
1 parent 29187b5 commit a70dce3

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/wasm.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Emscripten
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- v*
9+
paths-ignore:
10+
- 'docs/**'
11+
- '**.md'
12+
pull_request:
13+
paths-ignore:
14+
- '**.md'
15+
- 'docs/**'
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
wasm:
23+
name: WebAssembly
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/checkout@v7
28+
29+
- name: Install dependencies
30+
run: |
31+
sudo apt update
32+
sudo apt install -y ninja-build
33+
34+
- uses: mymindstorm/setup-emsdk@v14
35+
36+
# Build the library and the emscripten example so the WebMIDI backend
37+
# (backends/emscripten/*) is actually compiled -- it is only ever built for
38+
# wasm, so the native/mingw/android/etc. jobs never exercise it.
39+
- name: Configure
40+
run: |
41+
emcmake cmake -S . -B build -GNinja \
42+
-DCMAKE_BUILD_TYPE=Release \
43+
-DLIBREMIDI_LIBRARY_MODE=LIBRARY \
44+
-DLIBREMIDI_EXAMPLES=1
45+
46+
- name: Build
47+
run: cmake --build build

0 commit comments

Comments
 (0)