Skip to content

CI: Add SonarCloud back #2

CI: Add SonarCloud back

CI: Add SonarCloud back #2

Workflow file for this run

name: SonarCloud
on:
push:
branches:
- '*'
pull_request:
branches:
- master
jobs:
build:
name: SonarCloud
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install SonarCloud tools
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Install dependencies
run: ./.github/workflows/deps/linux.sh
- name: Configure build
run: |
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-G Ninja \
..
- name: Build
run: |
cd build
cmake --build .
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner -X