-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,10 @@ jobs: | |
- name: configure | ||
shell: bash | ||
run: | | ||
DEBIAN_FRONTEND=noninteractive | ||
apt-get update | ||
apt-get install -y --no-install-recommends lcov | ||
apt-get clean | ||
mkdir ${build_dir} | ||
cd ${build_dir} | ||
cmake \ | ||
|
@@ -106,19 +110,24 @@ jobs: | |
-DCMAKE_CXX_FLAGS="-g --coverage -fprofile-abs-path -fno-early-inlining" \ | ||
.. | ||
- name: build, run tests, prepare .gcov files | ||
- name: build, run tests, prepare coverage data | ||
shell: bash | ||
run: | | ||
cd ${build_dir} | ||
cmake --build . --target all | ||
tests/tests -a # generate .gcda files | ||
gcov -pbc $( find tests/ -type f -name '*.gcno' ) # generate .gcov files | ||
cmake --build . | ||
lcov --rc lcov_branch_coverage=1 --no-external --capture --initial --directory $( realpath .. ) --output-file /tmp/base.info | ||
tests/tests -a | ||
lcov --rc lcov_branch_coverage=1 --no-external --capture --directory $( realpath .. ) --output-file /tmp/test.info | ||
lcov --rc lcov_branch_coverage=1 --add-tracefile /tmp/base.info --add-tracefile /tmp/test.info --output-file /tmp/total.info | ||
lcov --rc lcov_branch_coverage=1 --remove /tmp/total.info "$( realpath . )" "$( realpath ../tests )" --output-file /tmp/filtered.info | ||
cp /tmp/filtered.info coverage.txt | ||
- name: upload coverage report | ||
uses: codecov/[email protected] | ||
with: | ||
fail_ci_if_error: true | ||
disable_search: false | ||
file: ${build_dir}/coverage.txt | ||
disable_search: true | ||
verbose: true | ||
plugin: noop | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file was deleted.
Oops, something went wrong.