File tree Expand file tree Collapse file tree 4 files changed +20
-14
lines changed
Expand file tree Collapse file tree 4 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -160,18 +160,21 @@ jobs:
160160 ${{ steps.python-path.outputs.python-path }} -m pip install gcovr
161161 ${{ steps.python-path.outputs.python-path }} -m gcovr -r .. \
162162 --exclude '.*tests/.*' \
163- --exclude '.*tests /.*' \
163+ --exclude '.*third-party /.*' \
164164 --xml-pretty \
165165 -o coverage.xml
166166
167167 - name : Upload coverage
168168 # any except canceled or skipped
169169 if : >-
170- always() && (steps.test_report.outcome == 'success') &&
170+ always() &&
171+ (steps.test_report.outcome == 'success') &&
171172 startsWith(github.repository, 'LizardByte/')
172173 uses : codecov/codecov-action@v4
173174 with :
175+ disable_search : true
174176 fail_ci_if_error : true
175177 files : ./build/coverage.xml
176178 flags : ${{ runner.os }}
177179 token : ${{ secrets.CODECOV_TOKEN }}
180+ verbose : true
Original file line number Diff line number Diff line change @@ -23,15 +23,23 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
2323#
2424option (BUILD_TESTS "Build tests" ON )
2525
26- #
27- # Library code is located here
28- #
29- add_subdirectory (src)
30-
3126#
3227# Testing only available if this is the main project
3328#
3429if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTS)
30+ #
31+ # Additional setup for coverage
32+ # https://gcovr.com/en/stable/guide/compiling.html#compiler-options
33+ #
34+ set (CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage -O0" )
35+ set (CMAKE_C_FLAGS "-fprofile-arcs -ftest-coverage -O0" )
36+
3537 enable_testing ()
3638 add_subdirectory (tests)
3739endif ()
40+
41+ #
42+ # Library code is located here
43+ # When building tests this must be after the coverage flags are set
44+ #
45+ add_subdirectory (src)
Original file line number Diff line number Diff line change 11---
22codecov :
33 branch : master
4+ notify :
5+ after_n_builds : 3
46
57coverage :
68 status :
Original file line number Diff line number Diff line change @@ -56,10 +56,3 @@ target_link_libraries(${TEST_BINARY}
5656
5757# Add the test to CTest
5858gtest_discover_tests(${TEST_BINARY} )
59-
60- #
61- # Additional setup for coverage
62- # https://gcovr.com/en/stable/guide/compiling.html#compiler-options
63- #
64- set (CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage -O1" )
65- set (CMAKE_C_FLAGS "-fprofile-arcs -ftest-coverage -O1" )
You can’t perform that action at this time.
0 commit comments