This repository has been archived by the owner on Jul 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
143 lines (127 loc) · 5.78 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
branches:
only:
- /master|^\d+\.\d+\.\d+$/
configuration:
- Debug
- Release
image:
- Visual Studio 2017
skip_branch_with_pr: true
environment:
# Enable for RDP connections to failing build VMs
# APPVEYOR_RDP_PASSWORD:
# secure: DelQKdq2M0hQqWTJcBPrnhwyekAAg3BGg4DVB7zGCg0=
sentry_api_url:
secure: grqYfjT9kMwONAdl/iwYcI7NOEd8ounzFFehZIWX3I3y1oiIa7F4GrZJKNqWcucEhyyn9SpAnXiheKAJU/kl0nFT7QUlnXplEE9c/krbWDEy0mSMy5DaFv1+MijZ5hjm
git_access_token:
secure: SvHymEaf8z/NGLTrYUeI3PutAKTLiWlQtT0LVuVTkPGSG1uWXsF22ySBx4o/sRH1
git_email: [email protected]
git_user: Appveyor Build
# Taken from https://boblokerse.github.io/2015/11/03/GitVersion-versioning-made-easy-and-dry/
install:
- cmd: ver
- cmd: set
- ps: |
if ($isWindows) {
get-childitem c:\tools\nunit3 -rec | where {!$_.PSIsContainer} | select-object FullName
choco install -y -r --no-progress resharper-clt.portable
choco install -y -r --no-progress InnoSetup
(Get-Content Buttplug.Components.Controls\ButtplugTabControl.xaml.cs).replace('SENTRY_API_URL', $env:sentry_api_url) | Set-Content Buttplug.Components.Controls\ButtplugTabControl.xaml.cs
}
- ps: |
function gitVersion() {
$env:newhash=git rev-parse HEAD
$env:shorthash=git rev-parse --short HEAD
If ($env:APPVEYOR_REPO_TAG -eq $TRUE) {
$env:newVersion="$env:APPVEYOR_REPO_TAG_NAME.$env:APPVEYOR_BUILD_NUMBER"
$env:appveyor_info_version="$env:APPVEYOR_REPO_TAG_NAME"
} Else {
$gitVersion=git describe --tags --abbrev=0 $env:APPVEYOR_REPO_BRANCH
$env:newVersion="$gitVersion.$env:APPVEYOR_BUILD_NUMBER"
$env:appveyor_info_version="$env:newVersion-$env:APPVEYOR_REPO_BRANCH"
}
$env:appveyor_build_version="$env:newVersion"
appveyor UpdateBuild -Version "$env:newVersion"
$regex = [regex]"AssemblyGitVersion\(.*\)"
Get-ChildItem $env.APPVEYOR_BUILD_FOLDER AssemblyInfo.* -recurse | Foreach-Object {
$c = ($_ | Get-Content)
$c = [regex]::replace($c -join "`r`n", $regex,"AssemblyGitVersion(`"$env:APPVEYOR_REPO_COMMIT`")")
$c | Set-Content $_.FullName
}
write-host "Using hash for build version: $env:newhash"
write-host "Update appveyor build version to: $env:appveyor_build_version"
write-host "Update appveyor info version to: $env:appveyor_info_version"
}
gitVersion
# patch the assembly version, but only in our own directories
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: $(appveyor_build_version)
assembly_file_version: $(appveyor_build_version)
assembly_informational_version: $(appveyor_info_version)
# Turn off nuget for now.
#
# Automatically register private account and/or project AppVeyor NuGet feeds.
# nuget:
# account_feed: true
# project_feed: true
# disable_publish_on_pr: true
before_build:
- nuget restore
build:
project: ButtplugWindowsSuite.sln
# publish_nuget: true
parallel: true
verbosity: minimal
after_build:
- ps: |
if ($isWindows) {
InspectCode.exe --output=resharper-clt-output.xml --project="Buttplug*" ButtplugWindowsSuite.sln;
$result = [xml](Get-Content .\resharper-clt-output.xml)
$result.Report.Issues.ChildNodes | ForEach-Object {$project = $_.Name; $_.ChildNodes | ForEach-Object {Add-AppveyorCompilationMessage -Message $_.Message -Line $_.Line -FileName $_.File -ProjectName $project}}
}
# test_script:
# - ps: |
# if ($isWindows) {
# .\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -returntargetcode -register:user -target:"$env:SYSTEMDRIVE\Tools\NUnit3\nunit3-console.exe" -targetargs:"Buttplug.Core.Test\bin\$env:CONFIGURATION\Buttplug.Core.Test.dll Buttplug.Server.Test\bin\$env:CONFIGURATION\Buttplug.Server.Test.dll Buttplug.Client.Test\bin\$env:CONFIGURATION\Buttplug.Client.Test.dll Buttplug.Client.Connectors.IPCConnector.Test\bin\$env:CONFIGURATION\Buttplug.Client.Connectors.IPCConnector.Test.dll Buttplug.Client.Connectors.WebsocketConnector.Test\bin\$env:CONFIGURATION\Buttplug.Client.Connectors.WebsocketConnector.Test.dll --inprocess --result=myresults.xml;format=AppVeyor" -output:"coverage.xml" -excludebyfile:"*\*LibLog.cs" -filter:"+[*]* -[nunit*]*"
# }
after_test:
# - ps: |
# If (($env:CONFIGURATION -imatch "Debug") -and $isWindows) {
# $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
# Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
# bash codecov.sh -f "coverage.xml" -X gcov
# }
- ps: |
if ($isWindows) {
set PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5"
iscc buttplug-installer.iss
installer\buttplug-installer.exe /VERYSILENT
Push-AppveyorArtifact installer\buttplug-installer.exe -FileName Buttplug-$env:CONFIGURATION-$env:APPVEYOR_BUILD_VERSION-installer.exe
}
# Enable for RDP connections to failing build VMs
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
cache:
- packages -> **\packages.config
# Cache chocolatey packages
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
deploy:
# - provider: NuGet
# api_key:
# secure: vUJ4hlf8iKu6epmN7F68KkVFQUqGE0Fe0i6kYeKAj85ZRTVy3EOmX6M68oi3me0R
# skip_symbols: true
# artifact: /.*\.nupkg/
# on:
# image: Visual Studio 2017
# branch: master
# configuration: release
# appveyor_repo_provider: github
# appveyor_repo_name: buttplugio/buttplug-csharp
notifications:
- provider: Slack
auth_token:
secure: niT02PuMtJmQsNxJo6dfdlU6X3gBzyPsFsskTSGHFDgkRL2IRj6iBzjTGhF1mM9x
channel: '#buttplug'