forked from SteamRE/SteamKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
96 lines (80 loc) · 2.91 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
version: 1.8.1.{build}
os: Visual Studio 2015
cache:
- '%LocalAppData%\NuGet\Cache'
- '%Temp%\nethook2-dependencies -> Resources\NetHook2\SetupDependencies.ps1'
assembly_info:
patch: true
file: AssemblyInfo.cs
assembly_version: "1.8.1"
assembly_file_version: "{version}"
assembly_informational_version: "{version} - CI (AppVeyor, branch: {branch})"
configuration:
- Debug
- Release
environment:
SK_BUILD_CONFIGURATION: $(configuration)
init:
- git config --global core.autocrlf true
install:
- set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
before_build:
- nuget restore SteamKit2\SteamKit2.sln
- nuget restore Samples\Samples.sln
- Resources\NetHook2\SetupDependencies.cmd
build_script:
- msbuild SteamKit2\SteamKit2.sln
- msbuild Samples\Samples.sln
- msbuild Resources\NetHook2\NetHook2.sln
- msbuild Resources\NetHookAnalyzer2\NetHookAnalyzer2.sln
after_build:
- '7z a NetHook2.zip .\Resources\NetHook2\%SK_BUILD_CONFIGURATION%\*.dll .\Resources\NetHook2\%SK_BUILD_CONFIGURATION%\*.pdb'
- ps: |
$args = @('pack', 'SteamKit2\SteamKit2.nuspec')
$version = $null
if (Test-Path Env:APPVEYOR_REPO_TAG_NAME)
{
$version = (Get-Item Env:APPVEYOR_REPO_TAG_NAME).Value
}
if (![string]::IsNullOrEmpty($version))
{
$args += $('-Version', $version)
}
& nuget $args
test_script:
- ps: |
$TestAssembly = "SteamKit2\Tests\Bin\$env:SK_BUILD_CONFIGURATION\Tests.dll"
if (Test-Path $TestAssembly)
{
& nuget install OpenCover -Version 4.6.166 -OutputDirectory SteamKit2\packages
& SteamKit2\packages\OpenCover.4.6.166\tools\OpenCover.Console.exe -register:user "-target:%xunit20%\xunit.console.exe" "-targetargs:$TestAssembly -noshadow -appveyor" -returntargetcode "-filter:+[SteamKit2]* -[SteamKit2]SteamKit2.Internal.* -[SteamKit2]SteamKit2.*.Internal.* -[SteamKit2]SevenZip*" "-excludebyattribute:*.ProtoContract*" -hideskipped:All -output:SteamKit2-code-coverage.xml
$env:Path = "C:\Python34;C:\Python34\Scripts;" + $env:Path
& pip install codecov
& codecov -f "SteamKit2-code-coverage.xml" -X gcov
}
artifacts:
- path: NetHook2.zip
- path: 'SteamKit2.*.nupkg'
name: SteamKit2.nupkg
- path: 'Resources\NetHookAnalyzer2\NetHookAnalyzer2\Bin\$(configuration)'
name: NetHookAnalyzer2
deploy:
- provider: NuGet
api_key:
secure: 'Qtxl16gv6dxg4FXOPLiNkLkTuVdPcso3IS99WgRO7IXyqgLJQJ3Ldrnymai2+1Uo'
skip_symbols: false
artifact: SteamKit2.nupkg
on:
configuration: Release
appveyor_repo_tag: true
- provider: GitHub
auth_token:
secure: 'KEOYmhFMh4Ea7RVYmX1Sv/1SWQW5uoNv6p3+aUtJXw/2Vbp2PEmbJxYJxO9xIuc9'
release: 'SteamKit2 $(appveyor_repo_tag_name)'
artifact: /.*/
draft: false
prerelease: true
tag: $(appveyor_repo_tag_name)
on:
configuration: Release
appveyor_repo_tag: true