mirror of
https://github.com/rmontanana/mdlp.git
synced 2025-08-20 18:06:00 +00:00
Update sonarqube github action
This commit is contained in:
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user