File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,15 +137,21 @@ jobs:
137137 - uses : actions/checkout@v4
138138 with :
139139 submodules : true
140+ - name : Add msbuild to PATH
141+ uses : microsoft/setup-msbuild@v2
142+ with :
143+ vs-version : ' latest'
140144 - name : Setup ccache
141- uses : hendrikmuhs/ ccache-action@v1.2
145+ uses : Chocobo1/setup- ccache-action@v1
142146 with :
143- key : ccache-${{ github.job }}
144- max-size : 2G
145- variant : sccache
147+ windows_compile_environment : msvc
148+ - name : Setup ninja
149+ uses : seanmiddleditch/gha-setup-ninja@v6
150+ - name : Setup MSVC for Ninja again
151+ uses : ilammy/msvc-dev-cmd@v1
146152 - name : Build
147153 run : |
148- cmake -S . -B build -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_BUILD_TYPE=Release
154+ cmake -S . -B build -G Ninja - DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release
149155 cmake --build build --parallel --config Release
150156 - name : Test
151157 run : |
Original file line number Diff line number Diff line change @@ -26,28 +26,16 @@ if (NOT CMAKE_BUILD_TYPE)
2626endif ()
2727
2828if (WIN32 )
29- if ("${CMAKE_BUILD_TYPE } " STREQUAL "DEBUG" )
30- set (CMAKE_BUILD_TYPE "Debug" )
31- endif ()
32- if ("${CMAKE_BUILD_TYPE } " STREQUAL "RELEASE" )
33- set (CMAKE_BUILD_TYPE "Release" )
34- endif ()
3529 add_custom_command (TARGET Graph_Build POST_BUILD
3630 COMMAND ${CMAKE_COMMAND } -E copy_directory
37- "${OPENCV_BUILD_DIR} /bin/${ CMAKE_BUILD_TYPE } / ."
31+ "${OPENCV_BUILD_DIR} /bin/."
3832 "${CMAKE_BINARY_DIR } /bin/" )
3933endif ()
4034
4135if (WIN32 )
42- if ("${CMAKE_BUILD_TYPE } " STREQUAL "DEBUG" )
43- set (CMAKE_BUILD_TYPE "Debug" )
44- endif ()
45- if ("${CMAKE_BUILD_TYPE } " STREQUAL "RELEASE" )
46- set (CMAKE_BUILD_TYPE "Release" )
47- endif ()
4836 add_custom_command (TARGET ACC_MNIST POST_BUILD
4937 COMMAND ${CMAKE_COMMAND } -E copy_directory
50- "${OPENCV_BUILD_DIR} /bin/${ CMAKE_BUILD_TYPE } / ."
38+ "${OPENCV_BUILD_DIR} /bin/."
5139 "${CMAKE_BINARY_DIR } /bin/" )
5240endif ()
5341
Original file line number Diff line number Diff line change @@ -18,15 +18,9 @@ if (NOT CMAKE_BUILD_TYPE)
1818endif ()
1919
2020if (WIN32 )
21- if ("${CMAKE_BUILD_TYPE } " STREQUAL "DEBUG" )
22- set (CMAKE_BUILD_TYPE "Debug" )
23- endif ()
24- if ("${CMAKE_BUILD_TYPE } " STREQUAL "RELEASE" )
25- set (CMAKE_BUILD_TYPE "Release" )
26- endif ()
2721 add_custom_command (TARGET run_test POST_BUILD
2822 COMMAND ${CMAKE_COMMAND } -E copy_directory
29- "${OPENCV_BUILD_DIR} /bin/${ CMAKE_BUILD_TYPE } / ."
23+ "${OPENCV_BUILD_DIR} /bin/."
3024 "${CMAKE_BINARY_DIR } /bin/" )
3125endif ()
3226
You can’t perform that action at this time.
0 commit comments