-
Notifications
You must be signed in to change notification settings - Fork 37
/
appveyor.yml
90 lines (82 loc) · 4.4 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
image: Visual Studio 2015
init:
- git config --global core.autocrlf input
clone_depth: 5
install:
- git submodule update --init --recursive
# print nuget version
- nuget help
- nuget restore VectorTileCsPortable.sln
- nuget restore VectorTileCs.sln
- nuget install NUnit.Runners -OutputDirectory tools
- nuget install OpenCover -OutputDirectory tools
# - nuget install ReportGenerator -Pre -OutputDirectory tools
- nuget install coveralls.net -Pre -OutputDirectory tools
- nuget install Microsoft.CodeAnalysis.CSharp.FxCopAnalyzers -Pre -OutputDirectory tools
- nuget install Microsoft.CodeAnalysis.FxCopAnalyzers -Pre -OutputDirectory tools
platform: Any CPU
configuration:
- Debug
environment:
COVERALLS_REPO_TOKEN:
secure: gO7ftSjlgxhWlaWnPRDjgR64iGQw1kg83UX7nA62TpqfZsRyU0NaDO/WeGpjLKDm
build_script:
#build UWP
- msbuild VectorTileCsPortable.sln /p:Configuration=Debug /p:Platform="Any Cpu" /maxcpucount:%NUMBER_OF_PROCESSORS%
#build Net 2.0
- msbuild VectorTileCs.sln /p:Configuration=Net20Debug /p:Platform="Any Cpu" /maxcpucount:%NUMBER_OF_PROCESSORS%
- bin\Net20Debug\v2.0\VerifyNetFrameworkVersion.exe
#build Net 3.5
- msbuild VectorTileCs.sln /p:Configuration=Net35Debug /p:Platform="Any Cpu" /maxcpucount:%NUMBER_OF_PROCESSORS%
- bin\Net35Debug\v3.5\VerifyNetFrameworkVersion.exe
#build Net 4.6.2
- msbuild VectorTileCs.sln /p:Configuration=Net462Debug /p:Platform="Any Cpu" /maxcpucount:%NUMBER_OF_PROCESSORS%
- bin\Net462Debug\v4.6.2\VerifyNetFrameworkVersion.exe
after_build:
- cmd: nuget pack Mapbox.VectorTile.nuspec
- ps: Get-ChildItem .\*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
after_test:
- ps: >-
$nunitrunner = (Resolve-Path "tools/NUnit.ConsoleRunner.*/tools/nunit3-console.exe").ToString();
$opencov = (Resolve-Path "tools/OpenCover.*/tools/OpenCover.Console.exe").ToString();
$coveralls = (Resolve-Path "tools/coveralls.net.*/tools/csmacnz.coveralls.exe").ToString();
Write-Host "nunitrunner: $nunitrunner"
Write-Host "opencov: $opencov"
Write-Host "coveralls: $coveralls"
- ps: >-
& $opencov `
-register:user `
-target:"$nunitrunner" `
-targetargs:"bin\Net35Debug\v3.5\VectorTiles.Tests.dll" `
-filter:"+[*]* -[*.Tests]* -[*]*.InteralClipperLib.*" `
-output:opencoverCoverage.xml;
- ps: >-
& $coveralls --opencover -i opencoverCoverage.xml `
--repoToken $env:COVERALLS_REPO_TOKEN `
--useRelativePaths `
--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;
- cmd: SET PATH=c:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\FxCop;%PATH%
- cmd: FxCopCmd.exe /out:fxcop.out.xml /file:bin\Net35Debug\v3.5\Mapbox.VectorTile.VectorTileReader.dll /file:bin\Net35Debug\v3.5\Mapbox.VectorTile.Geometry.dll /file:bin\Net35Debug\v3.5\Mapbox.VectorTile.PbfReader.dll /file:bin\Net35Debug\v3.5\Mapbox.VectorTile.ExtensionMethods.dll
#http://help.appveyor.com/discussions/kb/9-support-for-stylecop-report#comment_34865295
#http://help.appveyor.com/discussions/kb/5-code-analysis-fxcop-support
- ps: >-
$codeAnalysisErrors = [xml](Get-Content fxcop.out.xml);
foreach ($codeAnalysisError in $codeAnalysisErrors.SelectNodes("//Message")) {
$issueNode = $codeAnalysisError.SelectSingleNode("Issue");
$errorLevel = $($issueNode.Level);
if(!$errorLevel){$errorLevel='Warning'};
$errorLevel = $errorLevel.Replace("Critical","").Replace("Informational", "Information");
Write-Host "$($codeAnalysisError.CheckId): $($codeAnalysisError.TypeName) Line Number: $($issueNode.Line) FileName: $($issueNode.Path)\$($codeAnalysisError.Issue.File) ErrorMessage: $($issueNode.InnerXml)";
Add-AppveyorCompilationMessage "$($codeAnalysisError.CheckId): $($codeAnalysisError.TypeName)" -Category $errorLevel -FileName "$($issueNode.Path)\$($codeAnalysisError.Issue.File)" -Line $($issueNode.Line) -Details $($issueNode.InnerXml);
}
Push-AppveyorArtifact opencoverCoverage.xml;
Push-AppveyorArtifact fxcop.out.xml;
- cmd: cd %APPVEYOR_BUILD_FOLDER%\bin\Net20Debug\v2.0 && bench
- cmd: cd %APPVEYOR_BUILD_FOLDER%\bin\Net35Debug\v3.5 && bench
- cmd: cd %APPVEYOR_BUILD_FOLDER%\bin\Net462Debug\v4.6.2 && bench