Skip to content

Commit 08114fd

Browse files
committed
ci : extract emscripten job to build-wasm.yml
1 parent c227f7e commit 08114fd

2 files changed

Lines changed: 52 additions & 22 deletions

File tree

.github/workflows/build-wasm.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI (wasm)
2+
3+
on:
4+
workflow_dispatch: # allows manual triggering
5+
push:
6+
branches:
7+
- master
8+
paths: ['.github/workflows/build-wasm.yml',
9+
'**/CMakeLists.txt',
10+
'**/Makefile',
11+
'**/*.mk',
12+
'**/*.cmake',
13+
'**/*.in',
14+
'**/*.h',
15+
'**/*.hpp',
16+
'**/*.c',
17+
'**/*.cpp']
18+
19+
pull_request:
20+
types: [opened, synchronize, reopened]
21+
paths-ignore:
22+
- 'bindings/ruby/**' # handled by bindings-ruby.yml
23+
- 'bindings/go/**' # handled by bindings-go.yml
24+
- 'examples/addon.node/**' # handled by examples.yml
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
28+
cancel-in-progress: true
29+
30+
jobs:
31+
emscripten:
32+
runs-on: ubuntu-22.04
33+
34+
strategy:
35+
matrix:
36+
build: [Release]
37+
38+
steps:
39+
- name: Clone
40+
uses: actions/checkout@v6
41+
42+
- name: Setup emsdk
43+
uses: mymindstorm/setup-emsdk@v14
44+
45+
- name: Verify
46+
run: emcc -v
47+
48+
- name: Build
49+
run: |
50+
emcmake cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
51+
make

.github/workflows/build.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ on:
4040
- '.github/workflows/build-clang.yml' # handled by build-clang.yml
4141
- '.github/workflows/build-sycl.yml' # handled by build-sycl.yml
4242
- '.github/workflows/build-windows.yml' # handled by build-windows.yml
43+
- '.github/workflows/build-wasm.yml' # handled by build-wasm.yml
4344

4445
concurrency:
4546
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
@@ -68,28 +69,6 @@ jobs:
6869
# cmake -B build
6970
# cmake --build build --config Release
7071

71-
emscripten:
72-
runs-on: ubuntu-22.04
73-
74-
strategy:
75-
matrix:
76-
build: [Release]
77-
78-
steps:
79-
- name: Clone
80-
uses: actions/checkout@v6
81-
82-
- name: Setup emsdk
83-
uses: mymindstorm/setup-emsdk@v14
84-
85-
- name: Verify
86-
run: emcc -v
87-
88-
- name: Build
89-
run: |
90-
emcmake cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
91-
make
92-
9372
android:
9473
runs-on: ubuntu-22.04
9574

0 commit comments

Comments
 (0)