This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
60 lines (49 loc) · 2.34 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
configuration:
- Debug
- Release
cache:
- .\packages -> .\**\packages.config
environment:
COVERALLS_REPO_TOKEN:
secure: sc+7zdXfjw2kAX4oFkzTq6NBOM41Z2DKow8HXOQWstB79X4IlejAQ6bQpkTgBRSP
CoverityProjectToken:
secure: B+iuM30hZ9APsnxUk0Ecmn6CoXDOfeQZHbSo8i2HT+c=
CoverityNotificationEmail:
secure: DEtCTPnUeMi3DghTZyTDnRu2kamKoLr1YJhcBOTNuDo=
install:
- ps: |
if ($Env:APPVEYOR_REPO_BRANCH -eq "coverity_scan") {
$Env:path="C:\Program Files (x86)\MSBuild\12.0\Bin;" + $Env:path
}
- nuget install coveralls.net
- nuget install -ExcludeVersion PublishCoverity
before_build:
- nuget restore ".\SharpScan.sln"
build_script:
- ps: |
if (($Env:APPVEYOR_REPO_BRANCH -eq "coverity_scan") -and ($env:CONFIGURATION -eq "Release")) {
cov-build.exe --dir cov-int msbuild "$Env:APPVEYOR_BUILD_FOLDER\build.xml" "/p:Configuration=$Env:CONFIGURATION" /t:Coverage /verbosity:minimal
"Compressing Coverity results..."
& PublishCoverity\tools\PublishCoverity.exe compress `
--nologo `
-i "$env:APPVEYOR_BUILD_FOLDER\cov-int" `
-o "$env:APPVEYOR_BUILD_FOLDER\coverity.zip" `
--overwrite
"Uploading Coverity results..."
& PublishCoverity\tools\PublishCoverity.exe publish `
--nologo `
-t "$env:CoverityProjectToken" `
-e "$env:CoverityNotificationEmail" `
-r "HBM/SharpScan" `
-z "coverity.zip" `
-d "Appveyor build." `
--codeVersion "$env:APPVEYOR_BUILD_VERSION"
} else {
msbuild "$Env:APPVEYOR_BUILD_FOLDER\build.xml" "/p:Configuration=$Env:CONFIGURATION" /t:Coverage /verbosity:minimal
}
after_build:
- ps: >-
if (($env:CONFIGURATION -eq "Release") -and (!$env:APPVEYOR_PULL_REQUEST_NUMBER)) {
$coveralls = (Resolve-Path "$Env:APPVEYOR_BUILD_FOLDER/coveralls.net.*/tools/csmacnz.coveralls.exe").ToString()
& $coveralls --opencover -i .\.build\SharpScanTests.coverage.xml --useRelativePaths --treatUploadErrorsAsWarnings --repoToken $env:COVERALLS_REPO_TOKEN --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_BUILD_NUMBER --serviceName appveyor
}