Skip to content

Commit

Permalink
Try adding emscripten to CI platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
eliemichel committed Oct 15, 2024
1 parent 1ac7b55 commit 7c5b555
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
system: [ Linux-x64, Windows-MSVC-x64, Windows-MSYS-x64, MacOS-x64, MacOS-ARM ]
system: [ Linux-x64, Windows-MSVC-x64, Windows-MSYS-x64, MacOS-x64, MacOS-ARM, emscripten ]
webgpu-backend: [ DAWN, WGPU ]
link-type: [ SHARED, STATIC ]
build-type: [ Debug, Release ]
Expand Down Expand Up @@ -43,9 +43,21 @@ jobs:
- system: MacOS-x64
runner: macos-13

- system: emscripten
runner: ubuntu-latest
cmake-wrapper: emcmake
emsdk-version: 3.1.61

exclude:
# Latest version of Dawn to not support static linking
- webgpu-backend: DAWN
link-type: STATIC
# Emscripten does not care about backend, keeping only DAWN as a mock value
- system: emscripten
webgpu-backend: WGPU
# Emscripten does not care about linking, keeping only STATIC as a mock value
- system: emscripten
link-type: SHARED


runs-on: ${{ matrix.runner }}
Expand All @@ -64,9 +76,15 @@ jobs:
msystem: ${{ matrix.msystem }}
pacboy: cmake:p

- name: Setup emscripten
if: ${{ matrix.emsdk-version }}
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ matrix.emsdk-version }}

- name: Configure CMake
run: >
cmake
${{ matrix.cmake-wrapper }} cmake
-S examples
-B build
-DWEBGPU_BACKEND=${{ matrix.webgpu-backend }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</picture>

<a href="https://github.com/eliemichel/LearnWebGPU">LearnWebGPU</a> &nbsp;|&nbsp; <a href="https://github.com/eliemichel/WebGPU-Cpp">WebGPU-C++</a> &nbsp;|&nbsp; <a href="https://github.com/eliemichel/WebGPU-distribution">WebGPU-distribution</a><br/>
<a href="https://github.com/eliemichel/glfw3webgpu">glfw3webgpu</a> &nbsp;|&nbsp; <a href="https://github.com/eliemichel/sdl2webgpu">sdl2webgpu</a>
<a href="https://github.com/eliemichel/glfw3webgpu">glfw3webgpu</a> &nbsp;|&nbsp; <a href="https://github.com/eliemichel/sdl2webgpu">sdl2webgpu</a> &nbsp;|&nbsp; <a href="https://github.com/eliemichel/sdl3webgpu">sdl3webgpu</a>

<a href="https://discord.gg/2Tar4Kt564"><img src="https://img.shields.io/static/v1?label=Discord&message=Join%20us!&color=blue&logo=discord&logoColor=white" alt="Discord | Join us!"/></a>
</div>
Expand Down

0 comments on commit 7c5b555

Please sign in to comment.