Skip to content

Commit

Permalink
Enable WASM tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou authored Dec 8, 2023
1 parent b0558ee commit 898d756
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ jobs:
linux:
runs-on: [ubuntu-latest]
container:
image: ghcr.io/jfalcou/compilers:v6
image: ghcr.io/jfalcou/compilers:v7
strategy:
fail-fast: false
matrix:
cfg:
- { compiler: g++-12 , opts: -O0 , linker: }
- { compiler: g++ , opts: -O0 , linker: }
- { compiler: clang++ , opts: -O0 , linker: }
- { compiler: clang++ , opts: "-O3 -flto -DNDEBUG" , linker: }
- { compiler: g++-12 , opts: "-O3 -flto -DNDEBUG" , linker: }
- { compiler: g++ , opts: "-O3 -flto -DNDEBUG" , linker: }
- { compiler: clang++ , opts: "-O3 -flto -DNDEBUG -stdlib=libc++" , linker: -stdlib=libc++ }
- { compiler: clang++ , opts: "-O0 -stdlib=libc++" , linker: -stdlib=libc++ }
steps:
Expand Down Expand Up @@ -105,3 +105,26 @@ jobs:
cmake .. -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a
- name: Compiling Unit Tests
run: cd build && make tts-test -j 2

wasm:
runs-on: ubuntu-latest
container:
image: ghcr.io/jfalcou/compilers:v7
strategy:
fail-fast: false
matrix:
cfg:
- { opts: "-sNO_DISABLE_EXCEPTION_CATCHING -O0" }
- { opts: "-sNO_DISABLE_EXCEPTION_CATCHING -O3 -flto -DNDEBUG" }
steps:
- name: Fetch current branch
uses: actions/checkout@v3
- name: Running CMake for em++ with ${{ matrix.cfg.opts }}
run: |
mkdir build
cd build
emcmake cmake .. -G Ninja -DCMAKE_CXX_COMPILER=em++ -DCMAKE_CXX_FLAGS="${{ matrix.cfg.opts }}" -DCMAKE_CROSSCOMPILING_CMD="`pwd`/../cmake/run_wasm.sh"
- name: Running Unit Tests
run: |
cd build
ninja tts-test -j 2 && ctest --output-on-failure -j 2
8 changes: 8 additions & 0 deletions cmake/run_wasm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##======================================================================================================================
## TTS - Tiny Test System
## Copyright : TTS Contributors & Maintainers
## SPDX-License-Identifier: BSL-1.0
##======================================================================================================================
#!/bin/sh

node $@

0 comments on commit 898d756

Please sign in to comment.