-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (37 loc) · 1.3 KB
/
main.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
40
41
42
43
44
name: Code analysis
on:
push:
branches:
- master
- develop
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
sonarqube:
runs-on: ubuntu-latest
steps:
# Checks-out repository
- uses: actions/checkout@v2
- name: Download SonarQube tools
run: |
mkdir sonar
cd sonar
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.8.0.2856-linux.zip;
wget https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip;
unzip -j build-wrapper-linux-x86.zip;
unzip sonar-scanner-cli-4.8.0.2856-linux.zip
- name: Compiling
run: |
cmake .
sonar/build-wrapper-linux-x86-64 --out-dir wrapper_output make
- name: Run analyzer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ARGS: >
-Dsonar.projectKey=ArgonLang_Argon
-Dsonar.organization=argonlang
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.projectBaseDir=argon
-Dsonar.cfamily.build-wrapper-output=wrapper_output
run: sonar/sonar-scanner-4.8.0.2856-linux/bin/sonar-scanner ${SONAR_ARGS}