Skip to content

Commit f20d2ef

Browse files
lets lcov proceed if there’s still a stray mismatch
1 parent 9209472 commit f20d2ef

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@ jobs:
3131

3232
- name: Generate coverage (LCOV)
3333
run: |
34-
# Capture
35-
lcov --capture --directory . --output-file coverage.info
36-
# Remove system & irrelevant paths
37-
lcov --remove coverage.info '/usr/*' '*/tests/*' '*/third_party/*' --output-file coverage.info
38-
# Optional: HTML report for debugging (artifact, not needed by Codecov)
39-
genhtml coverage.info --output-directory coverage
34+
# Clean any stale traces first
35+
lcov --directory build --zerocounters
36+
# Capture with matching gcov tool and stable options
37+
lcov --capture --directory build \
38+
--gcov-tool gcov-13 \
39+
--rc geninfo_unexecuted_blocks=1 \
40+
--ignore-errors mismatch,source \
41+
--output-file coverage.info
42+
# (optional) keep only your code
43+
lcov --remove coverage.info '/usr/*' '*/googletest/*' \
44+
--output-file coverage.info
4045
4146
- name: Upload to Codecov
4247
uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)