string-only tooltip #1610
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push, pull_request] | |
jobs: | |
Windows: | |
name: windows-${{ matrix.os-version }}-${{ matrix.build-config }}-${{ matrix.build-arch }}${{ matrix.build-tool }} | |
runs-on: windows-${{ matrix.os-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os-version: [2022] | |
build-config: [debug, release, relwithdebinfo] | |
build-arch: [Win32, x64] | |
build-tool: ["", "-T ClangCL"] | |
exclude: | |
- build-arch: Win32 | |
build-tool: "-T ClangCL" | |
steps: | |
- name: Versions | |
shell: bash | |
run: | | |
cmake --version | |
git --version | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Configure | |
shell: bash | |
run: | | |
mkdir build | |
cd build | |
# cage_use_steam_sockets causes issues on win32 | |
cmake -A${{ matrix.build-arch }} ${{ matrix.build-tool }} -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} -Dcage_use_steam_sockets=${{ matrix.build-arch == 'x64' && 'ON' || 'OFF' }} .. | |
- name: Build | |
shell: bash | |
run: | | |
cd build | |
cmake --build . --config ${{ matrix.build-config }} | |
- name: Tests | |
shell: bash | |
run: | | |
cd build/result/${{ matrix.build-config }} | |
./cage-test-core | |
- name: Assets | |
shell: bash | |
run: | | |
cd build/result/${{ matrix.build-config }} | |
./cage-asset-database | |
- name: Install | |
shell: bash | |
run: | | |
cd build | |
cmake --install . --config ${{ matrix.build-config }} --prefix "C:/cage" | |
cd ../sources/test-install | |
mkdir build | |
cd build | |
cmake -A${{ matrix.build-arch }} ${{ matrix.build-tool }} -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} -DCage_DIR="C:/cage/cmake" .. | |
cmake --build . --config ${{ matrix.build-config }} | |
Ubuntu: | |
name: ubuntu-${{ matrix.os-version }}-${{ matrix.build-config }}-${{ matrix.compiler.cc }} | |
runs-on: ubuntu-${{ matrix.os-version }}.04 | |
env: | |
CC: ${{ matrix.compiler.cc }} | |
CXX: ${{ matrix.compiler.cxx }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os-version: [22, 24] | |
build-config: [debug, release] | |
compiler: | |
- { | |
cc: gcc-12, | |
cxx: g++-12, | |
install: gcc-12 g++-12 | |
} | |
- { | |
cc: gcc-13, | |
cxx: g++-13, | |
install: gcc-13 g++-13 | |
} | |
- { | |
cc: clang-15, | |
cxx: clang++-15, | |
install: clang-15 | |
} | |
- { | |
cc: clang-18, | |
cxx: clang++-18, | |
install: clang-18 | |
} | |
exclude: | |
- os-version: 24 | |
compiler: | |
cc: gcc-12 | |
- os-version: 22 | |
compiler: | |
cc: gcc-13 | |
- os-version: 24 | |
compiler: | |
cc: clang-15 | |
- os-version: 22 | |
compiler: | |
cc: clang-18 | |
steps: | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xorg-dev libwayland-dev libxkbcommon-dev libpulse-dev libasound2-dev nasm libssl-dev ${{ matrix.compiler.install }} | |
- name: Versions | |
run: | | |
cmake --version | |
git --version | |
${{ matrix.compiler.cc }} --version | |
${{ matrix.compiler.cxx }} --version | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Configure | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} -Dcage_use_steam_sockets=1 .. | |
- name: Build | |
run: | | |
cd build | |
cmake --build . -- -j$(( `nproc` + 1 )) | |
- name: Tests | |
run: | | |
cd build/result/${{ matrix.build-config }} | |
./cage-test-core | |
- name: Assets | |
run: | | |
cd build/result/${{ matrix.build-config }} | |
./cage-asset-database | |
- name: Install | |
run: | | |
cd build | |
sudo cmake --install . | |
cd ../sources/test-install | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} .. | |
cmake --build . -- -j$(( `nproc` + 1 )) | |
- name: List dependencies | |
run: | | |
cd build/result/${{ matrix.build-config }} | |
echo "cage-core:" | |
ldd libcage-core.so | |
echo "cage-engine:" | |
ldd libcage-engine.so | |
NoProfiler: | |
name: no-profiler | |
needs: Ubuntu | |
runs-on: ubuntu-24.04 | |
env: | |
CC: clang | |
CXX: clang++ | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xorg-dev libwayland-dev libxkbcommon-dev libpulse-dev libasound2-dev nasm libssl-dev | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Configure | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=DEBUG -Dcage_profiling_enabled=OFF .. | |
- name: Build | |
run: | | |
cd build | |
cmake --build . --target cage-test-core -- -j$(( `nproc` + 1 )) | |
- name: Tests | |
run: | | |
cd build/result/debug | |
./cage-test-core | |
Sanitizers: | |
name: sanitizer-${{ matrix.sanitizer.name }}-${{ matrix.build-config }} | |
needs: Ubuntu | |
runs-on: ubuntu-24.04 | |
env: | |
CFLAGS: ${{ matrix.sanitizer.flags }} | |
CXXFLAGS: ${{ matrix.sanitizer.flags }} | |
LDFLAGS: ${{ matrix.sanitizer.flags }} | |
CC: clang-16 | |
CXX: clang++-16 | |
strategy: | |
fail-fast: false | |
matrix: | |
build-config: [debug, release] | |
sanitizer: | |
- { | |
name: undefined, | |
flags: -fsanitize=undefined -fno-omit-frame-pointer | |
} | |
- { | |
name: address, | |
flags: -fsanitize=address -fno-omit-frame-pointer | |
} | |
- { | |
name: thread, | |
flags: -fsanitize=thread -fno-omit-frame-pointer | |
} | |
steps: | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xorg-dev libwayland-dev libxkbcommon-dev libpulse-dev libasound2-dev nasm libssl-dev | |
- name: Versions | |
run: | | |
cmake --version | |
clang --version | |
clang++ --version | |
git --version | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Configure | |
run: | | |
mkdir build | |
cd build | |
# WAMR_DISABLE_STACK_OVERFLOW_CHECK: avoid the program stopping on incorrectly detected stack overflow | |
cmake -DWAMR_DISABLE_STACK_OVERFLOW_CHECK=1 -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} .. | |
- name: Build | |
run: | | |
cd build | |
cmake --build . --target cage-test-core -- -j$(( `nproc` + 1 )) | |
- name: Tests | |
run: | | |
cd build/result/${{ matrix.build-config }} | |
./cage-test-core | |
Valgrind: | |
name: valgrind-${{ matrix.options.tool }} | |
needs: Ubuntu | |
runs-on: ubuntu-24.04 | |
env: | |
CC: gcc | |
CXX: g++ | |
strategy: | |
fail-fast: false | |
matrix: | |
options: | |
- { | |
tool: memcheck, | |
flags: --exit-on-first-error=yes --error-exitcode=1 | |
} | |
- { | |
tool: helgrind, | |
flags: # helgrind produces some false-positives so lets not fail on them | |
} | |
steps: | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xorg-dev libwayland-dev libxkbcommon-dev libpulse-dev libasound2-dev nasm libssl-dev | |
sudo apt-get install -y valgrind | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Configure | |
run: | | |
mkdir build | |
cd build | |
# WAMR_DISABLE_WRITE_GS_BASE: avoid valgrind crashing on an instruction it does not understand | |
cmake -DWAMR_DISABLE_WRITE_GS_BASE=1 -DCMAKE_BUILD_TYPE=RELWITHDEBINFO .. | |
- name: Build | |
run: | | |
cd build | |
cmake --build . --target cage-test-core -- -j$(( `nproc` + 1 )) | |
- name: Tests | |
run: | | |
cd build/result/relwithdebinfo | |
valgrind ${{ matrix.options.flags }} --tool=${{ matrix.options.tool }} ./cage-test-core | |