ci: run tests on msvc workflow
No tests were run, because the top CMakeLists.txt was not doing enable-testing().
This commit is contained in:
committed by
Anonymous Maarten
parent
0e955a9127
commit
26fd231151
11
.github/workflows/msvc.yml
vendored
11
.github/workflows/msvc.yml
vendored
@@ -21,9 +21,9 @@ jobs:
|
|||||||
- { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON, artifact: 'SDL-VC-static-VCRT-x86' }
|
- { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON, artifact: 'SDL-VC-static-VCRT-x86' }
|
||||||
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64, artifact: 'SDL-clang-cl-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, artifact: 'SDL-clang-cl-x86' }
|
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32, artifact: 'SDL-clang-cl-x86' }
|
||||||
- { name: Windows (ARM), flags: -A ARM, artifact: 'SDL-VC-arm32' }
|
- { name: Windows (ARM), flags: -A ARM, artifact: 'SDL-VC-arm32', notests: true }
|
||||||
- { name: Windows (ARM64), flags: -A ARM64, artifact: 'SDL-VC-arm64' }
|
- { name: Windows (ARM64), flags: -A ARM64, artifact: 'SDL-VC-arm64', notests: true }
|
||||||
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0", nowerror: true,
|
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0", nowerror: true, notests: true,
|
||||||
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0', artifact: 'SDL-VC-UWP' }
|
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0', artifact: 'SDL-VC-UWP' }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -38,8 +38,9 @@ jobs:
|
|||||||
os.makedirs(builddir)
|
os.makedirs(builddir)
|
||||||
with open(f"{ builddir }/CMakeLists.txt", "w") as f:
|
with open(f"{ builddir }/CMakeLists.txt", "w") as f:
|
||||||
f.write(textwrap.dedent(f"""\
|
f.write(textwrap.dedent(f"""\
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0...3.25)
|
||||||
project(sdl_user)
|
project(sdl_user)
|
||||||
|
enable_testing()
|
||||||
add_subdirectory("{ srcdir }" SDL)
|
add_subdirectory("{ srcdir }" SDL)
|
||||||
"""))
|
"""))
|
||||||
- name: Configure (CMake)
|
- name: Configure (CMake)
|
||||||
@@ -58,7 +59,7 @@ jobs:
|
|||||||
- 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
|
||||||
if: "! contains(matrix.platform.name, 'ARM')"
|
if: ${{ !matrix.platform.notests }}
|
||||||
run: |
|
run: |
|
||||||
$env:SDL_TESTS_QUICK=1
|
$env:SDL_TESTS_QUICK=1
|
||||||
ctest -VV --test-dir build/ -C Release -j2
|
ctest -VV --test-dir build/ -C Release -j2
|
||||||
|
|||||||
Reference in New Issue
Block a user