-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
65 lines (55 loc) · 2.06 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
environment:
CoverityProjectToken:
secure: k5JpbLODWLUCC4wXpzabZz+y3Otvfp8hNuA1BZI1/c0=
CoverityNotificationEmail:
secure: SkMoWnYcCR2QVa8COhA8mwLl7sxjWcIbbC0T5nrJLlM=
init:
# Properties, passed to MSBuild project.
- ps: |
$env:BuildDir = "$env:APPVEYOR_BUILD_FOLDER\.OUTPUT"
$env:VersionBuild = "$env:APPVEYOR_BUILD_NUMBER"
$env:VersionStage = "$env:APPVEYOR_REPO_BRANCH"
$env:VersionTag = "$env:APPVEYOR_REPO_COMMIT"
before_build:
- nuget restore
build_script:
- ps: |
$buildCmd = "C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe"
$buildArgs = @(
"/m",
"/l:C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll",
"/p:Configuration=Debug")
# If build is not a scheduled one, then simply build the project with
# MSBuild.
"Scheduled build: $env:APPVEYOR_SCHEDULED_BUILD"
"Forced build: $env:APPVEYOR_FORCED_BUILD"
if ($env:APPVEYOR_SCHEDULED_BUILD -ne "True" -And $env:APPVEYOR_FORCED_BUILD -ne "True") {
& $buildCmd $buildArgs
return
}
# Else, build project with Coverity Scan.
"Building project with Coverity..."
& cov-build.exe --dir cov-int $buildCmd $buildArgs
# Compress results.
$coverityPublisher =
"packages\PublishCoverity.0.9.0\PublishCoverity.exe"
"Compressing Coverity results..."
& "$coverityPublisher" compress `
-i "$env:APPVEYOR_BUILD_FOLDER\cov-int" `
-o "$env:APPVEYOR_BUILD_FOLDER\$env:APPVEYOR_PROJECT_NAME.zip" `
--overwrite
# Upload results to Coverity server.
$version = "$env:VersionMajor.$env:VersionMinor.$env:VersionPatch" +
"-$env:VersionStage+$env:VersionBuild"
"Uploading Coverity results..."
& "$coverityPublisher" publish `
-t "$env:CoverityProjectToken" `
-e "$env:CoverityNotificationEmail" `
-r "$env:APPVEYOR_REPO_NAME" `
-z "$env:APPVEYOR_BUILD_FOLDER\$env:APPVEYOR_PROJECT_NAME.zip" `
-d "CI server scheduled build." `
--codeVersion "$version"
shallow_clone: true
cache: packages
artifacts:
- path: cov-int\build-log.txt