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

[SDL2] Run tests with --trackmem #10637

Merged
merged 7 commits into from
Aug 31, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ jobs:
-DSDL_STATIC_PIC=ON \
-DSDL_VENDOR_INFO="Github Workflow" \
-DCMAKE_INSTALL_PREFIX=prefix \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-GNinja
- name: Build (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
run: |
cmake --build build --config Release --parallel --verbose
cmake --build build --config RelWithDebInfo --parallel --verbose
- name: Install (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
run: |
cmake --install build --config Release
cmake --install build --config RelWithDebInfo
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
( cd prefix; find ) | LC_ALL=C sort -u
- name: Verify CMake configuration files
Expand All @@ -59,7 +59,7 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
-DANDROID_ABI=${{ matrix.platform.android_abi }} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
cmake --build cmake_config_build --verbose
- name: Verify sdl2-config
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ jobs:
-DSDL_INSTALL_TESTS=ON \
-DSDL_VENDOR_INFO="Github Workflow" \
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
${{ matrix.platform.cmake }}
- name: Build (CMake)
if: "! matrix.platform.autotools"
run: |
${{ matrix.platform.source_cmd }}
cmake --build build/ --config Release --verbose --parallel
cmake --build build/ --config RelWithDebInfo --verbose --parallel
- name: Run build-time tests (CMake)
if: ${{ ! matrix.platform.autotools && !matrix.platform.cross }}
run: |
Expand All @@ -123,7 +123,7 @@ jobs:
if: "! matrix.platform.autotools"
run: |
set -eu
cmake --install build/ --config Release
cmake --install build/ --config RelWithDebInfo
echo "SDL2_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
( cd cmake_prefix; find ) | LC_ALL=C sort -u
- name: Configure (Autotools)
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
run: |
${{ matrix.platform.source_cmd }}
cmake -S cmake/test -B cmake_config_build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
${{ matrix.platform.cmake }} \
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
cmake --build cmake_config_build --verbose
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
id: cmake-configure
if: ${{ !matrix.platform.no-cmake }}
run: cmake -S build -B build -GNinja `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DSDL_WERROR=ON `
-DSDL_TESTS=ON `
-DCMAKE_C_FLAGS="${{ matrix.platform.cppflags }}" `
Expand All @@ -80,13 +80,13 @@ jobs:
id: cmake-build
if: ${{ steps.cmake-configure.outcome == 'success' }}
run: |
cmake --build build/ --config Release --verbose --parallel -- -k0
cmake --build build/ --config RelWithDebInfo --verbose --parallel -- -k0
- name: Run build-time tests
id: cmake-test
if: ${{ steps.cmake-build.outcome == 'success' && !contains(matrix.platform.name, 'ARM') && !contains(matrix.platform.name, 'UWP') }}
run: |
$env:SDL_TESTS_QUICK=1
ctest -VV --test-dir build/ -C Release -j2
ctest -VV --test-dir build/ -C RelWithDebInfo -j2
- name: Install (CMake)
id: cmake-install
if: ${{ steps.cmake-build.outcome == 'success' }}
Expand All @@ -97,15 +97,15 @@ jobs:
if: ${{ steps.cmake-install.outcome == 'success' && !contains(matrix.platform.name, 'UWP') }}
run: |
cmake -S cmake/test -B cmake_config_build -GNinja `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} `
-DCMAKE_C_FLAGS="${{ matrix.platform.cppflags }}" `
-DCMAKE_CXX_FLAGS="${{ matrix.platform.cppflags }}" `
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.platform.ldflags }}" `
-DCMAKE_SHARED_LINKER_FLAGS="${{ matrix.platform.ldflags }}" `
-DCMAKE_STATIC_LINKER_FLAGS="${{ matrix.platform.ldflags }}" `
${{ matrix.platform.cmake-args }}
cmake --build cmake_config_build --config Release
cmake --build cmake_config_build --config RelWithDebInfo
- name: Add msbuild to PATH
if: ${{ matrix.platform.project != '' }}
uses: microsoft/setup-msbuild@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/n3ds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
-DSDL_TESTS=ON \
-DSDL_INSTALL_TESTS=ON \
-DSDL_VENDOR_INFO="Github Workflow" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=prefix
- name: Build
run: cmake --build build --verbose
Expand All @@ -36,13 +36,13 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
-DTEST_SHARED=FALSE \
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build cmake_config_build --verbose
- name: Extract CC/CXX/CFLAGS/CXXFLAGS from CMake toolchain
run: |
cmake -S .github/cmake -B /tmp/cmake_extract \
-DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DVAR_PATH=/tmp/n3ds_env.txt
cat /tmp/n3ds_env.txt >> $GITHUB_ENV
- name: Verify sdl2-config
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ps2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
-DSDL_WERROR=ON \
-DSDL_TESTS=ON \
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Build
run: cmake --build build --config Release --verbose --parallel
run: cmake --build build --config RelWithDebInfo --verbose --parallel
- name: Install (CMake)
run: |
set -eu
cmake --install build/ --config Release
cmake --install build/ --config RelWithDebInfo
echo "SDL2_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
( cd cmake_prefix; find ) | LC_ALL=C sort -u

Expand All @@ -45,7 +45,7 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake \
-DTEST_SHARED=FALSE \
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build cmake_config_build --verbose
- name: Verify sdl2-config
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/psp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ jobs:
-DSDL_WERROR=ON \
-DSDL_TESTS=ON \
-DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=prefix
- name: Build
run: cmake --build build --config Release
run: cmake --build build --config RelWithDebInfo
- name: Install
run: |
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
cmake --install build --config Release
cmake --install build --config RelWithDebInfo
( cd prefix; find ) | LC_ALL=C sort -u
- name: Verify CMake configuration files
run: |
cmake -S cmake/test -B cmake_config_build \
-DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake \
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
-DTEST_SHARED=FALSE \
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build cmake_config_build --verbose
- name: Verify sdl2-config
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/riscos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
-DSDL_TESTS=ON \
-DSDL_INSTALL_TESTS=ON \
-DSDL_VENDOR_INFO="Github Workflow" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake
- name: Build (CMake)
if: ${{ contains(matrix.platform.name, 'CMake') }}
Expand All @@ -63,6 +63,6 @@ jobs:
cmake -S cmake/test -B cmake_config_build -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake \
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
${{ matrix.platform.test_args }}
cmake --build cmake_config_build --verbose
4 changes: 2 additions & 2 deletions .github/workflows/vita.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
-DSDL_WERROR=ON \
-DSDL_TESTS=ON \
-DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=prefix
- name: Build
run: cmake --build build --verbose
Expand All @@ -81,7 +81,7 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake \
-DTEST_SHARED=FALSE \
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} \
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build cmake_config_build --verbose
- name: Verify sdl2-config
run: |
Expand Down
6 changes: 6 additions & 0 deletions VisualC/tests/testatomic/testatomic.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
<Private>false</Private>
Expand Down
6 changes: 6 additions & 0 deletions VisualC/tests/testplatform/testplatform.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
<Private>false</Private>
Expand Down
6 changes: 6 additions & 0 deletions VisualC/tests/testpower/testpower.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
<Private>false</Private>
Expand Down
6 changes: 6 additions & 0 deletions VisualC/tests/testsurround/testsurround.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
<Private>false</Private>
Expand Down
Loading
Loading