-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (32 loc) · 988 Bytes
/
sonarcloud.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
name: sonarcloud
on: [push]
permissions: { }
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
- name: Setup dependencies
run: |
sudo add-apt-repository -y 'ppa:mhier/libboost-latest'
sudo apt-get install -y boost1.74
- name: Setup sonar-scanner
uses: sonarsource/sonarcloud-github-c-cpp@v2
- name: Produce Compilation Database
shell: bash
run: |
cmake . -DCMAKE_BUILD_TYPE=Debug
- name: SonarCloud Scan
env:
# Needed to get PR information, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define \
sonar.cfamily.compile-commands=compile_commands.json