File tree Expand file tree Collapse file tree 3 files changed +31
-41
lines changed
Expand file tree Collapse file tree 3 files changed +31
-41
lines changed Original file line number Diff line number Diff line change 1+ name : CMake Windows
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ build :
11+ runs-on : windows-2022
12+ strategy :
13+ matrix :
14+ build_type : [Debug, Release]
15+
16+ steps :
17+ - name : Clone
18+ uses : actions/checkout@v3
19+
20+ - name : Configure CMake
21+ run : cmake -B ${{github.workspace}}/build -DCINDER_BUILD_TESTS=ON -G "Visual Studio 17 2022" -A x64
22+
23+ - name : Build
24+ run : cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --parallel
25+
26+ - name : Run Unit Tests
27+ run : ${{github.workspace}}/build/${{matrix.build_type}}/UnitTests.exe
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -42,13 +42,11 @@ ci_make_app(
4242 INCLUDES "${UNIT_DIR} /src" # for catch.hpp
4343)
4444
45- if ( APPLE )
46- set ( TESTBINDIR ${CMAKE_BINARY_DIR} /${CMAKE_BUILD_TYPE} /UnitTests/UnitTests.app/Contents/MacOS )
47- else ()
48- set ( TESTBINDIR ${CMAKE_BINARY_DIR} /${CMAKE_BUILD_TYPE} /UnitTests )
49- endif ()
45+ # Unit tests need to be a console app (not WIN32 GUI app) for output
46+ set_target_properties ( UnitTests PROPERTIES WIN32_EXECUTABLE FALSE )
5047
5148add_test (
5249 NAME UnitTests
53- COMMAND ${TESTBINDIR} /UnitTests
50+ COMMAND $<TARGET_FILE:UnitTests>
51+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
5452)
You can’t perform that action at this time.
0 commit comments