mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 11:57:24 +08:00
ci: run VC tests under sdlprocdump
This commit is contained in:
+21
-10
@@ -11,16 +11,16 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
- { name: Windows (x64), flags: -A x64, project: VisualC/SDL.sln, projectflags: '/p:Platform=x64' }
|
- { name: Windows (x64), flags: -A x64, project: VisualC/SDL.sln, projectflags: '/p:Platform=x64', artifact: 'SDL-VC-x64' }
|
||||||
- { name: Windows (x86), flags: -A Win32, project: VisualC/SDL.sln, projectflags: '/p:Platform=Win32' }
|
- { name: Windows (x86), flags: -A Win32, project: VisualC/SDL.sln, projectflags: '/p:Platform=Win32', artifact: 'SDL-VC-x86' }
|
||||||
- { name: Windows static VCRT (x64), flags: -A x64 -DSDL_FORCE_STATIC_VCRT=ON }
|
- { name: Windows static VCRT (x64), flags: -A x64 -DSDL_FORCE_STATIC_VCRT=ON, artifact: 'SDL-static-crt-x64' }
|
||||||
- { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON }
|
- { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON, artifact: 'SDL-static-crt-x86' }
|
||||||
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64 }
|
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64, artifact: 'SDL-clang-cl-x64' }
|
||||||
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32 }
|
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32, artifact: 'SDL-clang-cl-x86' }
|
||||||
- { name: Windows (ARM), flags: -A ARM }
|
- { name: Windows (ARM), flags: -A ARM, artifact: 'SDL-VC-arm32' }
|
||||||
- { name: Windows (ARM64), flags: -A ARM64 }
|
- { name: Windows (ARM64), flags: -A ARM64, artifact: 'SDL-VC-arm64' }
|
||||||
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DSDL_TESTS=OFF, nowerror: true,
|
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DSDL_TESTS=OFF, nowerror: true,
|
||||||
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0' }
|
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0', artifact: 'SDL-VC-UWP' }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -51,11 +51,13 @@ jobs:
|
|||||||
-DSDL_INSTALL_TESTS=ON `
|
-DSDL_INSTALL_TESTS=ON `
|
||||||
-DSDL_VENDOR_INFO="Github Workflow" `
|
-DSDL_VENDOR_INFO="Github Workflow" `
|
||||||
-DSDL2_DISABLE_INSTALL=OFF `
|
-DSDL2_DISABLE_INSTALL=OFF `
|
||||||
|
-DSDLTEST_PROCDUMP=ON `
|
||||||
${{ matrix.platform.flags }} `
|
${{ matrix.platform.flags }} `
|
||||||
-DCMAKE_INSTALL_PREFIX=prefix
|
-DCMAKE_INSTALL_PREFIX=prefix
|
||||||
- name: Build (CMake)
|
- name: Build (CMake)
|
||||||
run: cmake --build build/ --config Release --parallel
|
run: cmake --build build/ --config Release --parallel
|
||||||
- name: Run build-time tests
|
- name: Run build-time tests
|
||||||
|
id: tests
|
||||||
if: "! contains(matrix.platform.name, 'ARM')"
|
if: "! contains(matrix.platform.name, 'ARM')"
|
||||||
run: |
|
run: |
|
||||||
$env:SDL_TESTS_QUICK=1
|
$env:SDL_TESTS_QUICK=1
|
||||||
@@ -71,10 +73,19 @@ jobs:
|
|||||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} `
|
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} `
|
||||||
${{ matrix.platform.flags }}
|
${{ matrix.platform.flags }}
|
||||||
cmake --build cmake_config_build --config Release
|
cmake --build cmake_config_build --config Release
|
||||||
|
|
||||||
- name: Add msbuild to PATH
|
- name: Add msbuild to PATH
|
||||||
if: ${{ matrix.platform.project != '' }}
|
if: ${{ matrix.platform.project != '' }}
|
||||||
uses: microsoft/setup-msbuild@v2
|
uses: microsoft/setup-msbuild@v2
|
||||||
- name: Build msbuild
|
- name: Build msbuild
|
||||||
if: ${{ matrix.platform.project != '' }}
|
if: ${{ matrix.platform.project != '' }}
|
||||||
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: ${{ always() && steps.tests.outcome == 'failure' }}
|
||||||
|
with:
|
||||||
|
if-no-files-found: ignore
|
||||||
|
name: '${{ matrix.platform.artifact }}-minidumps'
|
||||||
|
path: |
|
||||||
|
build/**/*.dmp
|
||||||
|
build/**/*.exe
|
||||||
|
build/**/*.dll
|
||||||
|
build/**/*.pdb
|
||||||
|
|||||||
@@ -9,6 +9,16 @@ set(SDL_TEST_EXECUTABLES)
|
|||||||
set(SDL_TESTS_NONINTERACTIVE)
|
set(SDL_TESTS_NONINTERACTIVE)
|
||||||
set(SDL_TESTS_NEEDS_RESOURCES)
|
set(SDL_TESTS_NEEDS_RESOURCES)
|
||||||
|
|
||||||
|
if(WIN32 AND NOT WINDOWS_STORE)
|
||||||
|
option(SDLTEST_PROCDUMP "Run tests using sdlprocdump for minidump generation" OFF)
|
||||||
|
add_executable(sdlprocdump win32/sdlprocdump.c)
|
||||||
|
if(SDLTEST_PROCDUMP)
|
||||||
|
set(CMAKE_TEST_LAUNCHER "$<TARGET_FILE:sdlprocdump>")
|
||||||
|
else()
|
||||||
|
set_property(TARGET sdlprocdump PROPERTY EXCLUDE_FROM_ALL "1")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(SDLTEST_TARGETS )
|
set(SDLTEST_TARGETS )
|
||||||
|
|
||||||
macro(sdltest_link_librararies)
|
macro(sdltest_link_librararies)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user