-
Notifications
You must be signed in to change notification settings - Fork 88
45 lines (39 loc) · 1.47 KB
/
SonarCloud.yml
File metadata and controls
45 lines (39 loc) · 1.47 KB
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
45
name: SonarCloud
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Prepare Sonar scanner
run: |
wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip
unzip -q sonar-scanner-cli-4.6.2.2472-linux.zip
echo "${PWD}/sonar-scanner-4.6.2.2472-linux/bin/" >> $GITHUB_PATH
wget -nv https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
unzip -q build-wrapper-linux-x86.zip
echo "${PWD}/build-wrapper-linux-x86" >> $GITHUB_PATH
- name: update-system
run: sudo apt-get update -qq
- name: install-deps
run: sudo apt-get install libibus-1.0-dev libzstd-dev qt5-default rustc cargo
- name: Clean Build OBK
run: |
mkdir build
cd build
cmake ..
build-wrapper-linux-x86-64 --out-dir ../bw-output make clean all
- name: SonarCloud Scan
run: |
sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=openbangla -Dsonar.login=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}