File tree Expand file tree Collapse file tree 2 files changed +6
-23
lines changed
Expand file tree Collapse file tree 2 files changed +6
-23
lines changed Original file line number Diff line number Diff line change 2626 make -j $(nproc)
2727 sudo make install
2828
29- - name : Install coverage tools
30- if : runner.os == 'Linux'
31- run : |
32- sudo apt update
33- sudo apt install lcov
34- sudo apt install pipx
35- pipx install gcovr
36-
3729 - name : Configure for tests
3830 if : runner.os == 'macOS'
3931 run : |
@@ -42,30 +34,21 @@ jobs:
4234 - name : Configure for coverage
4335 if : runner.os == 'Linux'
4436 run : |
45- cmake -S. -Bbuild -DBUILD_MEX=False -DCHECK_COVERAGE =True
37+ cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug - DBUILD_MEX=False -DBUILD_TESTS =True
4638
4739 - name : Build
4840 run : |
4941 cmake --build build
5042
5143 - name : Run tests
52- if : runner.os == 'macOS'
53- working-directory : ./build
54- run : |
55- ctest -C Release --output-on-failure --verbose
56-
57- - name : Generate coverage report
58- if : runner.os == 'Linux'
5944 working-directory : ./build
6045 run : |
61- make coverage
62- gcovr -r .. . --txt-metric branch --cobertura > coverage.xml
46+ ctest --output-on-failure --verbose
6347
64- - uses : codecov/codecov-action@v5
48+ - name : Upload coverage report to Codecov
49+ uses : codecov/codecov-action@v5
6550 if : runner.os == 'Linux'
6651 with :
67- disable_search : true
68- files : build/coverage.xml
6952 verbose : true
7053 env :
7154 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ endif()
1616
1717set (CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic" )
1818
19- set (CMAKE_CXX_FLAGS_DEBUG "-g -Og" )
20- set (CMAKE_EXE_LINKER_FLAGS_DEBUG "-g -Og" )
19+ set (CMAKE_CXX_FLAGS_DEBUG "-g -Og --coverage " )
20+ set (CMAKE_EXE_LINKER_FLAGS_DEBUG "-g -Og --coverage " )
2121
2222set (CMAKE_CXX_FLAGS_RELEASE "-O3 -flto" )
2323set (CMAKE_EXE_LINKER_FLAGS_RELEASE "-O3 -flto" )
You can’t perform that action at this time.
0 commit comments