Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable WASM tests #95

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 $@