File tree 3 files changed +20
-14
lines changed
3 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,5 @@ github_checks:
26
26
27
27
slack_app : false
28
28
29
- parsers :
30
- gcov :
31
- branch_detection :
32
- conditional : true
33
- loop : true
34
- method : false
35
- macro : false
36
-
37
29
ignore :
38
30
- " tests/"
Original file line number Diff line number Diff line change 96
96
- name : configure
97
97
shell : bash
98
98
run : |
99
+ sudo apt-get update
100
+ sudo apt-get install -y --no-install-recommends lcov
101
+ sudo apt-get clean
99
102
mkdir ${build_dir}
100
103
cd ${build_dir}
101
104
cmake \
@@ -106,19 +109,31 @@ jobs:
106
109
-DCMAKE_CXX_FLAGS="-g --coverage -fprofile-abs-path -fno-early-inlining" \
107
110
..
108
111
109
- - name : build, run tests, prepare .gcov files
112
+ - name : build, run tests, prepare coverage data
110
113
shell : bash
111
114
run : |
112
115
cd ${build_dir}
113
- cmake --build . --target all
114
- tests/tests -a # generate .gcda files
115
- gcov -pbc $( find tests/ -type f -name '*.gcno' ) # generate .gcov files
116
+ cmake --build .
117
+ lcov --rc lcov_branch_coverage=1 --no-external --capture --initial --directory $( realpath .. ) --output-file /tmp/base.info
118
+ tests/tests -a
119
+ lcov --rc lcov_branch_coverage=1 --no-external --capture --directory $( realpath .. ) --output-file /tmp/test.info
120
+ lcov --rc lcov_branch_coverage=1 --add-tracefile /tmp/base.info --add-tracefile /tmp/test.info --output-file /tmp/total.info
121
+ lcov --rc lcov_branch_coverage=1 --remove /tmp/total.info "$( realpath . )/*" "$( realpath ../tests )/*" --output-file /tmp/filtered.info
122
+ cp /tmp/filtered.info "$( realpath .. )/coverage.txt"
123
+
124
+ - name : archive coverage data
125
+ uses : actions/upload-artifact@v4
126
+ with :
127
+ name : coverage.lcov
128
+ path : coverage.lcov
129
+ retention-days : 30
116
130
117
131
- name : upload coverage report
118
132
119
133
with :
120
134
fail_ci_if_error : true
121
- disable_search : false
135
+ file : coverage.lcov
136
+ disable_search : true
122
137
verbose : true
123
138
plugin : noop
124
139
token : ${{ secrets.CODECOV_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments