diff --git a/.github/workflows/on_PR_meson.yaml b/.github/workflows/on_PR_meson.yaml index 1eeb6532..b9838e8a 100644 --- a/.github/workflows/on_PR_meson.yaml +++ b/.github/workflows/on_PR_meson.yaml @@ -163,3 +163,17 @@ jobs: meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 meson compile -C "${{github.workspace}}/build" --verbose meson test -C "${{github.workspace}}/build" --verbose + Emscripten: + runs-on: ubuntu-latest + name: Emscripten + steps: + - uses: actions/checkout@v4 + - name: Install packages + run: | + python3 -m pip install meson ninja + - name: Emscripten + uses: mymindstorm/setup-emsdk@v11 + - name: Compile + run: | + meson setup "${{github.workspace}}/build" --cross-file="${{github.workspace}}/em.txt" --wrap-mode=forcefallback -Ddefault_library=static -Dwarning_level=3 -Dcpp_std=c++20 -DunitTests=disabled + meson compile -C "${{github.workspace}}/build" --verbose diff --git a/em.txt b/em.txt new file mode 100644 index 00000000..5956c150 --- /dev/null +++ b/em.txt @@ -0,0 +1,11 @@ +[binaries] +c = 'emcc' +cpp = 'em++' +ar = 'emar' +nm = 'emnm' + +[host_machine] +system = 'emscripten' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little'