up the date to retrigger analysis #179
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Install sonar-scanner | |
uses: sonarsource/sonarcloud-github-c-cpp@v3 | |
- name: Generate compilation database | |
run: | | |
mkdir build | |
cmake -S . -B build | |
- name: Run sonar-scanner | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} # Put the name of your token here | |
run: | | |
# Set the property "sonar.cfamily.compile-commands" to the compilation database file | |
sonar-scanner --define sonar.cfamily.compile-commands=build/compile_commands.json |