Skip to content

Commit

Permalink
[Debug] Try resolve static-analysis
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Nov 7, 2023
1 parent 0528acc commit 3da388d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/step_static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,26 @@ jobs:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- uses: actions/checkout@v4
- name: Set up Python for gcovr
uses: actions/setup-python@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
python-version: 3.x
- name: install gcovr
run: |
pip install gcovr
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Run build-wrapper
run: |
mkdir build
cmake -S . -B build
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Release
cmake --preset gcc-ci --fresh -G "Unix Makefiles"
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build --preset gcc-ci
ctest --preset gcc-ci
gcovr --sonarqube > coverage.xml
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
sonar-scanner \
--define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" \
--define sonar.coverageReportPaths=coverage.xml

0 comments on commit 3da388d

Please sign in to comment.