-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathappveyor.yml
121 lines (121 loc) · 8.41 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: 2.0.0.{build}
image: Visual Studio 2017
configuration: Release
platform: Any CPU
environment:
PROJECT_ROOT: C:\projects\sharpdebug
DEAFULT_TARGET_FRAMEWORK: net461
DEAFULT_TARGET_NETSTANDARD: netstandard2.0
DEAFULT_TARGET_NETCOREAPP: netcoreapp2.0
NUGET_PACKAGES: C:\Users\appveyor\.nuget\packages
OPENCOVER: $(NUGET_PACKAGES)\OpenCover\4.7.922\tools\OpenCover.Console.exe
XUNIT_TOOLS: $(NUGET_PACKAGES)\xunit.runner.console\2.4.1\tools\net452
XUNIT_TOOLS_CORE: $(NUGET_PACKAGES)\xunit.runner.console\2.4.1\tools\netcoreapp2.0
NATIVE_TARGET_CORE_DIR: $(PROJECT_ROOT)\bin\$(CONFIGURATION)\$(DEAFULT_TARGET_NETCOREAPP)
NATIVE_TARGET_DIR: $(PROJECT_ROOT)\bin\$(CONFIGURATION)\$(DEAFULT_TARGET_FRAMEWORK)
CLR_TARGET_DIR: $(PROJECT_ROOT)\bin\$(CONFIGURATION)\$(DEAFULT_TARGET_FRAMEWORK)
UI_TARGET_DIR: $(PROJECT_ROOT)\bin\$(CONFIGURATION)\$(DEAFULT_TARGET_FRAMEWORK)
NATIVE_TESTS_DLL: $(NATIVE_TARGET_DIR)\SharpDebug.Tests.Native.dll
NATIVE_TESTS_DLL_CORE: $(NATIVE_TARGET_CORE_DIR)\SharpDebug.Tests.Native.dll
CLR_TESTS_DLL: $(CLR_TARGET_DIR)\SharpDebug.Tests.CLR.dll
UI_TESTS_DLL: $(UI_TARGET_DIR)\SharpDebug.Tests.UI.dll
GITHUB_PAGES: $(PROJECT_ROOT)\GitHubPages
GITHUB_PAGES_REFERENCES: SharpDebugReference
HELP_OUTPUT_PATH: $(PROJECT_ROOT)\Utility\SharpDebug.Reference\Help
GITHUB_USERNAME: southpolenator
GITHUB_PASSWORD:
secure: 2KQWKwkpAyvIjNLzJS6g4SY9URejpaumcJuJLTqvppYB4+aINA3ElJC7n8UoD0zd
GITHUB_PAGES_URL: https://$(GITHUB_PASSWORD)@github.com/$(GITHUB_USERNAME)/$(GITHUB_USERNAME).github.io.git
init:
- ps: |-
if(-not $env:APPVEYOR_PULL_REQUEST_NUMBER){
git config --global user.email "auto_publish@appveyor.com"
git config --global user.name %GITHUB_PASSWORD%
}
install:
- ps: (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
- ps: (new-object Net.WebClient).DownloadString("https://raw.githubusercontent.com/southpolenator/SharpDebug/master/GetShipFiles.ps1") | iex
- ps: choco install codecov --limitoutput --no-progress
before_build:
- ps: Vsix-IncrementVsixVersion
- ps: |-
Vsix-TokenReplacement Source\SharpDebug.VS\VSInteractiveWindowPackage.cs 'productId: "([0-9\\.]+)"' 'productId: "{version}"'
- ps: Vsix-TokenReplacement SharedAssemblyInfo.props '<AssemblyVersion>([0-9\\.]+)</AssemblyVersion>' '<AssemblyVersion>{version}</AssemblyVersion>'
- ps: Vsix-TokenReplacement SharedAssemblyInfo.props '<FileVersion>([0-9\\.]+)</FileVersion>' '<FileVersion>{version}</FileVersion>'
- ps: Vsix-TokenReplacement SharedAssemblyInfo.props '<VersionPrefix>([0-9\\.]+)</VersionPrefix>' '<VersionPrefix>{version}</VersionPrefix>'
- ps: nuget restore -Verbosity quiet
- ps: pushd $env:PROJECT_ROOT\dumps\
- ps: .\download.ps1
- ps: popd
- ps: msbuild SharpDebug.sln /t:Utility\ExceptionDumper32 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration=$env:CONFIGURATION /verbosity:minimal
build:
project: SharpDebug.sln
verbosity: minimal
after_build:
- cmd: dotnet pack --no-build
- ps: pushd $env:PROJECT_ROOT\Source\SharpDebug.DbgEng\
- ps: dotnet pack --no-build
- ps: popd
- ps: msbuild SharpDebug.sln /t:Source\VisualStudio\SharpDebug_VS /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration=$env:CONFIGURATION /verbosity:minimal
- ps: pushd $env:PROJECT_ROOT\bin\$env:CONFIGURATION\$env:DEAFULT_TARGET_FRAMEWORK\
- ps: 7z a SharpDebug.WinDbg-$env:appveyor_build_version-$env:CONFIGURATION.zip (Get-ShipFiles(@("SharpDebug.CommonUserTypes.dll", "SharpDebug.DwarfSymbolProvider.dll", "SharpDebug.WinDbg.x64.dll", "SharpDebug.WinDbg.x86.dll")))
- ps: if (($env:CONFIGURATION -eq "Release") -and (($env:APPVEYOR_REPO_BRANCH -eq "master") -or ($env:APPVEYOR_REPO_BRANCH -eq "next"))) { Vsix-PushArtifacts | Vsix-PublishToGallery }
- ps: popd
- ps: |-
if ($env:CONFIGURATION -eq "Release") {
if ($env:APPVEYOR_REPO_BRANCH -eq "master") {
if(-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
msbuild Utility\SharpDebug.Reference\SharpDebug.Reference.shfbproj /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration=$env:CONFIGURATION /verbosity:minimal
git clone $env:GITHUB_PAGES_URL $env:GITHUB_PAGES
git config --global core.autocrlf false
pushd $env:GITHUB_PAGES
Remove-Item -Recurse -Force $env:GITHUB_PAGES_REFERENCES
mkdir $env:GITHUB_PAGES_REFERENCES | Out-Null
$files = "index.html", "SearchHelp.aspx", "SearchHelp.inc.php", "SearchHelp.php", "Web.Config", "WebKI.xml", "WebTOC.xml", "fti", "html", "icons", "scripts", "styles", "toc"
foreach ($file in $files) {
Copy-Item $env:HELP_OUTPUT_PATH\$file -Destination $env:GITHUB_PAGES\$env:GITHUB_PAGES_REFERENCES\$file -Recurse
}
git add .
git commit -m "Automatic update of code reference with build {version}"
git push
popd
}
}
}
test_script:
- cmd: '"%OPENCOVER%" -oldstyle -register:user -target:"%XUNIT_TOOLS%\xunit.console.exe" -targetargs:"%UI_TESTS_DLL% -noshadow -parallel assemblies -trait x64=true -appveyor" -filter:"+[SharpDebug*]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:.\code_coverage_x64.UI.xml -targetdir:%UI_TARGET_DIR%'
- cmd: '"%OPENCOVER%" -oldstyle -register:user -target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:"%XUNIT_TOOLS_CORE%\xunit.console.dll %NATIVE_TESTS_DLL_CORE% -noshadow -parallel assemblies -trait x64=true -appveyor" -filter:"+[SharpDebug*]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:.\code_coverage_x64.Native.Core.xml -targetdir:%NATIVE_TARGET_CORE_DIR%'
- cmd: '"%OPENCOVER%" -oldstyle -register:user -target:"%XUNIT_TOOLS%\xunit.console.exe" -targetargs:"%NATIVE_TESTS_DLL% -noshadow -parallel assemblies -trait x64=true -appveyor" -filter:"+[SharpDebug*]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:.\code_coverage_x64.Native.xml -targetdir:%NATIVE_TARGET_DIR%'
- cmd: '"%OPENCOVER%" -oldstyle -register:user -target:"%XUNIT_TOOLS%\xunit.console.exe" -targetargs:"%CLR_TESTS_DLL% -noshadow -parallel assemblies -trait x64=true -appveyor" -filter:"+[SharpDebug*]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:.\code_coverage_x64.CLR.xml -targetdir:%CLR_TARGET_DIR%'
- cmd: '"%OPENCOVER%" -oldstyle -register:user -target:"%XUNIT_TOOLS%\xunit.console.x86.exe" -targetargs:"%UI_TESTS_DLL% -noshadow -parallel assemblies -trait x86=true -appveyor" -filter:"+[SharpDebug*]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:.\code_coverage_x86.UI.xml -targetdir:%UI_TARGET_DIR%'
- cmd: '"%OPENCOVER%" -oldstyle -register:user -target:"%XUNIT_TOOLS%\xunit.console.x86.exe" -targetargs:"%NATIVE_TESTS_DLL% -noshadow -parallel assemblies -trait x86=true -appveyor" -filter:"+[SharpDebug*]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:.\code_coverage_x86.Native.xml -targetdir:%NATIVE_TARGET_DIR%'
- cmd: '"%OPENCOVER%" -oldstyle -register:user -target:"%XUNIT_TOOLS%\xunit.console.x86.exe" -targetargs:"%CLR_TESTS_DLL% -noshadow -parallel assemblies -trait x86=true -appveyor" -filter:"+[SharpDebug*]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:.\code_coverage_x86.CLR.xml -targetdir:%CLR_TARGET_DIR%'
- cmd: codecov -f code_coverage_x64.Native.Core.xml
- cmd: codecov -f code_coverage_x64.Native.xml
- cmd: codecov -f code_coverage_x64.CLR.xml
- cmd: codecov -f code_coverage_x64.UI.xml
- cmd: codecov -f code_coverage_x86.Native.xml
- cmd: codecov -f code_coverage_x86.CLR.xml
- cmd: codecov -f code_coverage_x86.UI.xml
artifacts:
- path: bin\**\*.nupkg
name: NuGets
- path: Utility\SharpDebug.Reference\Help\CsScripts.chm
name: Help file
- path: bin\**\SharpDebug.VS.vsix
name: Visual Studio Extension
- path: bin\**\*.trx
name: Test Results
- path: bin\**\*.zip
name: WinDbg Extension
- path: Utility\SharpDebug.Reference\Help\LastBuild.log
name: Reference build log
deploy:
- provider: NuGet
api_key:
secure: K2TRMJKDiZjaD7yaL42c0MQvldSO1AiXGJCynFyaYZgzpyYJ1w5PTzN9EteCZPYB
skip_symbols: false
artifact: NuGets
on:
branch: master
CONFIGURATION: Release