cmake fixes #2165
This file contains hidden or 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-arch }}-${{ matrix.build-config }}${{ matrix.build-tool }}-${{ matrix.steam-sockets }} | |
| runs-on: windows-${{ matrix.os-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os-version: [2025] | |
| build-arch: [Win32, x64] | |
| build-config: [debug, release, relwithdebinfo] | |
| build-tool: ["", "-T ClangCL"] | |
| steam-sockets: [ON, OFF] | |
| exclude: | |
| - build-arch: Win32 | |
| build-tool: "-T ClangCL" | |
| - build-arch: Win32 # cage_use_steam_sockets causes issues on win32 | |
| steam-sockets: ON | |
| - build-config: release | |
| steam-sockets: ON | |
| - build-config: relwithdebinfo | |
| steam-sockets: ON | |
| steps: | |
| - name: Versions | |
| shell: bash | |
| run: | | |
| cmake --version | |
| git --version | |
| - uses: actions/checkout@v6 | |
| - name: Configure | |
| shell: bash | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -A${{ matrix.build-arch }} ${{ matrix.build-tool }} -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} -Dcage_use_steam_sockets=${{ matrix.steam-sockets }} .. | |
| - 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 | |
| Ubuntu: | |
| name: ubuntu-${{ matrix.os-version }}${{ matrix.build-arch }}-${{ matrix.build-config }}-${{ matrix.compiler.cc }}-${{ matrix.steam-sockets }} | |
| runs-on: ubuntu-${{ matrix.os-version }}.04${{ matrix.build-arch }} | |
| env: | |
| CC: ${{ matrix.compiler.cc }} | |
| CXX: ${{ matrix.compiler.cxx }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os-version: [24] | |
| build-arch: ["", "-arm"] | |
| build-config: [debug, release] | |
| compiler: | |
| - { | |
| cc: gcc-14, | |
| cxx: g++-14, | |
| install: gcc-14 g++-14 | |
| } | |
| - { | |
| cc: clang-16, | |
| cxx: clang++-16, | |
| install: clang-16 | |
| } | |
| - { | |
| cc: clang-18, | |
| cxx: clang++-18, | |
| install: clang-18 | |
| } | |
| steam-sockets: [ON, OFF] | |
| exclude: | |
| - build-config: release | |
| steam-sockets: ON | |
| - build-arch: "-arm" # disable ARM only for GCC | |
| compiler: | |
| cc: gcc-14 | |
| cxx: g++-14 | |
| install: gcc-14 g++-14 | |
| steps: | |
| - name: Install packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y xorg-dev libx11-xcb-dev libxkbcommon-dev libwayland-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@v6 | |
| - name: Configure | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} -Dcage_use_steam_sockets=${{ matrix.steam-sockets }} .. | |
| - 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: List dependencies | |
| run: | | |
| cd build/result/${{ matrix.build-config }} | |
| echo "cage-core:" | |
| ldd libcage-core.so | |
| echo "cage-engine:" | |
| ldd libcage-engine.so | |
| MacOS: | |
| name: macos-${{ matrix.os-version }}-${{ matrix.build-config }} | |
| runs-on: macos-${{ matrix.os-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os-version: [15] | |
| build-config: [debug, release] | |
| steps: | |
| - name: Install packages | |
| run: | | |
| brew install nasm | |
| - name: Versions | |
| run: | | |
| cmake --version | |
| git --version | |
| clang --version | |
| clang++ --version | |
| - uses: actions/checkout@v6 | |
| - name: Configure | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-config }} .. | |
| - name: Build | |
| run: | | |
| cd build | |
| cmake --build . -- -j$(( `sysctl -n hw.ncpu` + 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: List dependencies | |
| run: | | |
| cd build/result/${{ matrix.build-config }} | |
| echo "cage-core:" | |
| otool -L libcage-core.dylib | |
| echo "cage-engine:" | |
| otool -L libcage-engine.dylib | |
| 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 libx11-xcb-dev libxkbcommon-dev libwayland-dev libpulse-dev libasound2-dev nasm libssl-dev | |
| - uses: actions/checkout@v6 | |
| - 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 libx11-xcb-dev libxkbcommon-dev libwayland-dev libpulse-dev libasound2-dev nasm libssl-dev | |
| - name: Versions | |
| run: | | |
| cmake --version | |
| git --version | |
| clang --version | |
| clang++ --version | |
| - uses: actions/checkout@v6 | |
| - 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 |