forked from rubberduck-vba/Rubberduck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
139 lines (124 loc) · 4.56 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
version: '2.4.0.{build}'
# add nuget api to hosts file, making sure we can actually nuget restore for the build
hosts:
api.nuget.org: 93.184.221.200
# enforce crlf fixing
init:
git config --global core.autocrlf true
# history limited to 15 commits, since we ran into trouble with a limit of 3
# the limit can be rather generous
clone_depth: 15
# explicitly do not shallow-clone.
# Line-Endings are wrong on github, because of CRLF fixing
# shallow-clone would download a zip, which doesn't fix the line-endings for unit-tests
shallow_clone: false
# ignore a certain subset of files when evaluating build-changes
skip_commits:
files:
- docs/*
- '**/*.md'
- license
- License.rtf
branches:
only:
- master
- next
skip_tags: true
# build-matrix: all Release CPUs on VS2017
image: Visual Studio 2017
configuration: Release
platform: Any CPU
# cache the nuget packages unless something changed there
cache:
- packages/ -> **/packages.config
install:
set PATH=C:\Program Files (x86)\MSBuild\15.0\Bin;%PATH%
# patch version specifiers in the base project
dotnet_csproj:
patch: true
# patch version specifier in Core that's non-wildcard to deal with XAML generated code?
file: 'RubberduckBaseProject.csproj' # ;*\Rubberduck.Core.csproj'
version: '{version}'
assembly_version: '{version}'
before_build:
- cinst innosetup
- cinst codecov
- cinst opencover.portable
- nuget restore RubberduckMeta.sln
- nuget restore Rubberduck.sln
build:
verbosity: minimal
project: Rubberduck.sln
# TestScript depends on the build matrix to only contain Release cpu
# Otherwise we might run tests against artifacts that do not exist
test_script:
# we use -returntargetcode to fail the build if tests fail
- cmd: OpenCover.Console.exe -register:user -returntargetcode -target:"nunit3-console.exe" -targetargs:".\RubberduckTests\bin\RubberduckTests.dll" -output:".\Rubberduck_Coverage.xml"
- cmd: OpenCover.Console.exe -register:user -returntargetcode -target:"nunit3-console.exe" -targetargs:".\RubberduckTestsCodeAnalysis\bin\RubberduckTestsCodeAnalysis.dll" -output:".\RubberduckCodeAnalysis_Coverage.xml"
# when using test_script, after_test seems to not be executed
- cmd: codecov -f "Rubberduck_Coverage.xml RubberduckCodeAnalysis_Coverage.xml"
# Define the installer-name depending on what branch we're building on
environment:
installer_dir: Rubberduck.Deployment\InnoSetup\Installers\
for:
-
branches:
only:
- next
environment:
installer_name: Rubberduck.Setup.%APPVEYOR_BUILD_VERSION%-pre.exe
release_name: Rubberduck v%APPVEYOR_BUILD_VERSION%-pre
-
branches:
only:
- master
environment:
installer_name: Rubberduck.Setup.%APPVEYOR_BUILD_VERSION%.exe
release_name: Rubberduck v%APPVEYOR_BUILD_VERSION%
-
branches:
except:
- master
- next
environment:
# fall back to naming the installer something that shows we're in an unexpected state
installer_name: Rubberduck.Setup.%APPVEYOR_BUILD_VERSION%-unexpected.exe
release_name: Rubberduck v%APPVEYOR_BUILD_VERSION%-%APPVEYOR_REPO_BRANCH%
# Create Installers to store at appveyor and upload to github
after_test:
- cmd: iscc /O "Rubberduck.Deployment\InnoSetup\Rubberduck.Installer.Build.iss"
- cmd: move %INSTALLER_DIR%\Rubberduck.Setup.exe %INSTALLER_DIR%\%INSTALLER_NAME%
# grab the installers we produce and upload them to github :)
artifacts:
- path: Rubberduck.Deployment\InnoSetup\Installers\Rubberduck.Setup.*.exe
name: Rubberduck
deploy:
- provider: GitHub
tag: RETAGMEWITHAMESSAGE
release: $(release_name)
draft: true
prerelease: false
description: "Built with :heart: by AppVeyor CI on [$(appveyor_repo_branch)] - https://ci.appveyor.com/project/rubberduck-vba/rubberduck/build/$(appveyor_build_version)"
auth_token:
secure: NVAZgFRSk566SP5QDge5gYRWCaLi4NJJPTNk3QengH15wL9iVldfrFOllbzKXExq
artifact: Rubberduck
on:
branch: master
- provider: GitHub
tag: Prerelease-v$(appveyor_build_version)
release: $(release_name)
draft: false
prerelease: true
description: "AppVeyor build on [$(appveyor_repo_branch)] - https://ci.appveyor.com/project/rubberduck-vba/rubberduck/build/$(appveyor_build_version)"
auth_token:
secure: NVAZgFRSk566SP5QDge5gYRWCaLi4NJJPTNk3QengH15wL9iVldfrFOllbzKXExq
artifact: Rubberduck
on:
branch: next
# This is Duga posting stuff to the war room
notifications:
- provider: Webhook
url: http://stats.zomis.net/GithubHookSEChatService/hooks/github/payload?roomId=14929
on_build_success: true
on_build_failure: true
on_build_status_changed: false