File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ name: C++ tests
22
33on :
44 push :
5+ branches : [main, dev]
56 pull_request :
7+ branches : [main]
68
79jobs :
810 build :
1719 steps :
1820 - uses : actions/checkout@v4
1921
20- - name : Install dependencies
22+ - name : Install Catch2
2123 run : |
2224 git clone https://github.com/catchorg/Catch2.git
2325 cd Catch2
3739
3840 - name : Run tests
3941 run : |
40- cd build/tests
42+ cd build
4143 ctest -C Release --output-on-failure --verbose
Original file line number Diff line number Diff line change @@ -19,16 +19,15 @@ set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-g -Og -Wall -Wextra")
1919set (CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -Wextra" )
2020set (CMAKE_EXE_LINKER_FLAGS_RELEASE "-O3 -Wall -Wextra" )
2121
22- if (NOT DEFINED BUILD_MEX)
23- set (BUILD_MEX True )
24- endif ()
22+ # Build MEX interface.
23+ option (BUILD_MEX "Build MEX interface" True )
2524if (BUILD_MEX)
2625 add_subdirectory ("mex" )
2726endif ()
2827
29- if (NOT DEFINED BUILD_TESTS)
30- set (BUILD_TESTS False )
31- endif ()
28+ # Build tests.
29+ option (BUILD_TESTS "Run Catch2 tests" False )
3230if (BUILD_TESTS)
31+ enable_testing ()
3332 add_subdirectory ("tests" )
3433endif ()
You can’t perform that action at this time.
0 commit comments