File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 strategy :
99 fail-fast : false
1010 matrix :
11- os : [windows-latest, ubuntu-latest]
11+ os : [windows-latest, ubuntu-latest, macos-latest ]
1212 include :
1313 - os : windows-latest
1414 preset : ' x64-release'
15- binary : ' .\out\build\x64-release\src\tests\tests .exe'
15+ binary_ext : ' .exe'
1616 - os : ubuntu-latest
1717 preset : ' linux-debug'
18- binary : ' ./out/build/linux-debug/src/tests/tests'
1918 install_opengl : true
19+ - os : macos-latest
20+ preset : ' macos-debug'
2021
2122 steps :
2223 - name : Checkout
@@ -25,13 +26,18 @@ jobs:
2526 - name : Install openGL
2627 if : ${{ matrix.install_opengl }}
2728 run : |
29+ sudo apt-get update
2830 sudo apt-get install libxmu-dev libxi-dev libgl-dev
2931 sudo apt install libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev pkg-config
3032 sudo apt install libxrandr-dev
3133
32343335
3436 - uses : lukka/get-cmake@latest
37+ with :
38+ cmakeVersion : " ~3.31.0" # use most recent 3.31.x version
39+
40+
3541 - name : Run vcpkg
36423743 with :
@@ -43,11 +49,11 @@ jobs:
4349 configurePreset : ${{ matrix.preset }}
4450
4551 - name : Compile
46- run : |
47- cd './out/build/${{ matrix.preset }}'
48- ninja
52+ working-directory : ./out/build/${{ matrix.preset }}
53+ run : ninja
4954
5055 - name : Run Tests
56+ working-directory : ./out/build/${{ matrix.preset }}/src/tests
5157 timeout-minutes : 5
52- run : ${{ matrix.binary }}
58+ run : ./tests ${{ matrix.binary_ext }}
5359
Original file line number Diff line number Diff line change @@ -35,4 +35,8 @@ target_link_libraries(tests PUBLIC GTest::gmock_main GTest::gtest)
3535include (GoogleTest )
3636gtest_discover_tests (tests )
3737
38- file (COPY ./../../test_data DESTINATION "${CMAKE_CURRENT_BINARY_DIR} " )
38+ add_custom_command (
39+ TARGET tests
40+ POST_BUILD
41+ COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR} /test_data" "${CMAKE_CURRENT_BINARY_DIR} "
42+ )
You can’t perform that action at this time.
0 commit comments