From 669ed9bcae110ca0539876193ec3b8cb9b8a8a18 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Dec 2021 02:35:44 +0100 Subject: Actually do and submit coverage ...instead of hoping the thing will sort itself out because CLion does. --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01a4468f..8596ccd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,6 +114,7 @@ jobs: if [ -n "${{ matrix.sonar }}" ]; then mkdir -p $HOME/.sonar CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_CXX_FLAGS=--coverage" + echo "COV=gcov$CXX_VERSION_POSTFIX" >>$GITHUB_ENV fi echo "CMAKE_ARGS=$CMAKE_ARGS" >>$GITHUB_ENV @@ -215,7 +216,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | + mkdir .coverage && pushd .coverage + find $BUILD_PATH/CMakeFiles/Quotient.dir/lib -name '*.gcda' -print0 \ + | xargs -0 $COV -s $GITHUB_WORKSPACE/lib -pr + popd $HOME/.sonar/sonar-scanner*/bin/sonar-scanner \ -Dsonar.host.url="$SONAR_SERVER_URL" \ -Dsonar.cfamily.build-wrapper-output="$BUILD_PATH/sonar" \ - -Dsonar.cfamily.gcov.reportsPath="$BUILD_PATH/coverage" + -Dsonar.cfamily.gcov.reportsPath=.coverage -- cgit v1.2.3