forked from Piratkopia13/Sail
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipeline-sonarcloud.yml
38 lines (30 loc) · 1.17 KB
/
azure-pipeline-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
trigger:
- '*'
pool:
vmImage: 'windows-2019'
steps:
- script: git submodule update --init --recursive
displayName: 'Fetch git submodules'
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'Stora Spel SonarCloud'
organization: 'bth-storaspel-dxr'
scannerMode: 'MSBuild'
projectKey: 'StoraSpelGame'
extraProperties: |
sonar.cfamily.build-wrapper-output=s\bw-output
sonar.exclusions=libraries/**
sonar.cfamily.threads=2
- pwsh: |
echo "Downloading SonarQube build wrapper"
Invoke-WebRequest 'https://sonarcloud.io/static/cpp/build-wrapper-win-x86.zip' -outfile 'build-wrapper-win-x86.zip'
7z e build-wrapper-win-x86.zip -y
displayName: 'Download build wrapper'
- script: .\premake\premake5.exe vs2019
displayName: 'Run premake'
- pwsh: ./build-wrapper-win-x86-64.exe --out-dir bw-output "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\msbuild.exe" "d:\a\1\s\Sail.sln" /p:Configuration=Release /p:Platform="DX12 x64" /verbosity:minimal /p:VisualStudioVersion="16.0"
displayName: 'Build'
- task: SonarCloudAnalyze@1
- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'