File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 3737 with :
3838 max-size : " 2000M"
3939 - name : Install deps
40- run : sudo apt -y install git make ninja-build pkg-config gcc g++ ccache cmake libyaml-cpp-dev llvm-18 clang-18 libclang-18-dev libclang-cpp18-dev clang-format-18 lcov zlib1g-dev libunwind-dev libdw-dev gnustep-back-common libgnustep-base-dev gnustep-make
40+ run : sudo apt -y install git make grcov ninja-build pkg-config gcc g++ ccache cmake libyaml-cpp-dev llvm-18 clang-18 libclang-18-dev libclang-cpp18-dev clang-format-18 lcov zlib1g-dev libunwind-dev libdw-dev gnustep-back-common libgnustep-base-dev gnustep-make
4141 - name : Check code formatting
4242 run : |
4343 make check-formatting
@@ -46,15 +46,13 @@ jobs:
4646 CC=/usr/bin/clang-18 CXX=/usr/bin/clang++-18 LLVM_VERSION=18 NUMPROC=2 CMAKE_GENERATOR=Ninja CODE_COVERAGE=ON LLVM_VERSION=18 ENABLE_CXX_MODULES_TEST_CASES=ON ENABLE_CUDA_TEST_CASES=OFF ENABLE_OBJECTIVE_C_TEST_CASES=ON FETCH_LIBOBJC2=ON CLANG_UML_ENABLE_BACKTRACE=ON make test
4747 - name : Run coverage
4848 run : |
49- lcov -c -d debug -o coverage.info
50- lcov -r coverage.info -o coverage-src.info "$PWD/src/main.cc" "$PWD/src/common/generators/generators.cc"
51- lcov -e coverage-src.info -o coverage-src.info "$PWD/src/*"
52- lcov -l coverage-src.info
49+ grcov --llvm --binary-path debug --output-path coverage.info -t lcov --keep-only 'src/*' --source-dir . --ignore src/main.cc --ignore src/common/generators/generators.cc .
50+ lcov --ignore-errors inconsistent -l coverage.info
5351 - name : Upload coverage
5452 uses : codecov/codecov-action@v3
5553 with :
56- files : coverage-src .info
54+ files : coverage.info
5755 disable_search : true
5856 name : clang-uml
5957 token : ${{ secrets.CODECOV_TOKEN }}
60- fail_ci_if_error : false
58+ fail_ci_if_error : false
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ message(STATUS "clang-uml version: "
6666#
6767option (CODE_COVERAGE "" OFF )
6868if (CODE_COVERAGE)
69- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fno-inline" )
70- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov --coverage" )
69+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g --coverage -fno-inline" )
70+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g --coverage -fno-inline" )
71+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov" )
7172endif (CODE_COVERAGE)
7273
7374#
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ test_release: release
136136 CTEST_OUTPUT_ON_FAILURE=1 ctest --test-dir release
137137
138138coverage_report : test
139- lcov -c -d debug -o coverage.info
139+ lcov -c -d debug -o coverage.info --no-external --gcov-tool util/clang_gcov.sh
140140 lcov -r coverage.info -o coverage-src.info " ${PWD} /src/main.cc" " ${PWD} /src/common/generators/generators.cc"
141141 lcov -e coverage-src.info -o coverage-src.info " ${PWD} /src/*"
142142 lcov -l coverage-src.info
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ exec llvm-cov-18 gcov " $@ "
You can’t perform that action at this time.
0 commit comments