diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index becb92d..9362022 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -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/codecov-action@v4.3.0 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 }} diff --git a/tests/catch2 b/tests/catch2 deleted file mode 120000 index cae4eab..0000000 --- a/tests/catch2 +++ /dev/null @@ -1 +0,0 @@ -../third_party/catch2 \ No newline at end of file