Update sonarqube github action

This commit is contained in:
2024-07-04 00:13:38 +02:00
parent 872385e3ee
commit 6f8f535b40

View File

@@ -32,16 +32,12 @@ jobs:
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Debug
cmake --build build -j 4
ctest -C Debug --output-on-failure -j 4
lcov --capture --directory ../ --demangle-cpp --ignore-errors source,source --ignore-errors mismatch --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --remove coverage.info 'lib/*' --output-file coverage.info
lcov --remove coverage.info 'libtorch/*' --output-file coverage.info
lcov --remove coverage.info 'tests/*' --output-file coverage.info
lcov --remove coverage.info 'gtest/*' --output-file coverage.info
cd build
gcovr -f ../CPPFImdlp.cpp -f ../Metrics.cpp -f ../BinDisc.cpp -f ../Discretizer.cpp --txt --sonarqube=coverage.xml
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}" \
--define sonar.coverageReportPaths=build/coverage.info
--define sonar.coverageReportPaths=build/coverage.xml