Skip to content

ci: Use CodeChecker as static analysis tool #14

ci: Use CodeChecker as static analysis tool

ci: Use CodeChecker as static analysis tool #14

name: SonarCloud Scan
on: [push]
jobs:
sonarcloud:
runs-on: ubuntu-24.04
steps:
- name: Checkout code including full history and submodules
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Install dependencies from APT repository
run: |
sudo apt-get update
sudo apt-get install cmake gcovr libcunit1-dev ninja-build unzip wget
- name: Install sonar-scanner and build-wrapper
uses: sonarsource/sonarcloud-github-c-cpp@v2
- name: Collect test coverage data
run: |
tools/ci/run_ci.sh \
--run-build \
--run-tests \
--sonarqube build-wrapper-linux-x86-64
- name: Run SonarCloud Scan
run: |
sonar-scanner \
-Dsonar.branch.name="${GITHUB_REF_NAME}" \
-Dsonar.cfamily.build-wrapper-output=build-wakaama/sonar-cloud-build-wrapper-output \
-Dsonar.cfamily.cache.enabled=false \
-Dsonar.cfamily.gcov.reportsPath=build-wakaama \
-Dsonar.cfamily.threads=2 \
-Dsonar.exclusions="build-wakaama-*/**, .git/**" \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
-Dsonar.organization="eclipse" \
-Dsonar.projectKey="eclipse_wakaama" \
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.sources=.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}