forked from SonarOpenCommunity/sonar-cxx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
71 lines (70 loc) · 3.23 KB
/
appveyor.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: '{build}'
install:
- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
if (!(Test-Path -Path "C:\maven" )) {
(new-object System.Net.WebClient).DownloadFile(
'http://www.us.apache.org/dist/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.zip',
'C:\maven-bin.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
}
if (!(Test-Path -Path "C:\sonar-scanner" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.1.zip',
'C:\sonar-scanner-dist.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sonar-scanner-dist.zip", "C:\sonar-scanner")
}
if (!(Test-Path -Path "C:\sonarqube" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.1.zip',
'C:\sonarqube-5.6.1.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sonarqube-5.6.1.zip", "C:\sonarqube")
}
- ps: |
If ($env:Platform -Match "x86") {
$env:PCRE_PLATFORM="Win32"
$env:JAVA_HOME="c:/Program Files (x86)/Java/jdk1.8.0"
$env:MSBuildDir="C:/Program Files (x86)/MSBuild/14.0/Bin/msbuild.exe"
$env:VCVARS_PLATFORM="x86"
$env:LANG_PLATFORM=""
} Else {
$env:PCRE_PLATFORM="x64"
$env:JAVA_HOME="c:/Program Files/Java/jdk1.8.0"
$env:MSBuildDir="C:/Program Files/MSBuild/14.0/Bin/msbuild.exe"
$env:VCVARS_PLATFORM="amd64"
$env:LANG_PLATFORM="-x64"
}
- cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;C:\sonar-scanner\sonar-scanner-2.6.1\bin;%PATH%
- cmd: SET M2_HOME=C:\maven\apache-maven-3.2.5
- cmd: SET MAVEN_HOME=C:\maven\apache-maven-3.2.5
- cmd: SET SONARHOME=C:\sonarqube\sonarqube-5.6.1
- cmd: SET TestDataFolder=C:\projects\sonar-cxx\integration-tests\testdata
- cmd: SET
build_script:
- dir
# SONAR-7154 : workaround
- mkdir C:\WINDOWS\system32\config\systemprofile\AppData\Local\Temp
- cd C:\WINDOWS\system32\config\systemprofile\AppData\Local\
- dir
- cd C:\projects\sonar-cxx
- dir
- C:\Python27\Scripts\pip.exe install requests
- C:\Python27\Scripts\pip.exe install behave
- C:\Python27\Scripts\pip.exe install colorama
- mvn clean install
- C:\Python27\Scripts\behave.exe --no-capture
cache:
- C:\maven\
- C:\Users\appveyor\.m2
artifacts:
- path: 'sonar-cxx-plugin\target\*.jar'
- path: 'sslr-cxx-toolkit\target\*.jar'
on_failure:
- ps: Get-ChildItem cxx-squid\target\surefire-reports\*.txt | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem cxx-checks\target\surefire-reports\*.txt | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem sonar-cxx-plugin\target\surefire-reports\*.txt | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem *.log | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem C:\sonarqube\sonarqube-5.6.1\logs\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }