-
Notifications
You must be signed in to change notification settings - Fork 9
/
appveyor.yml
239 lines (193 loc) · 7.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
#==============================================================================#
# Develop configuration #
#==============================================================================#
# configuration for "develop" branch
# build in Release mode and deploy to github
-
#---------------------------------#
# general configuration #
#---------------------------------#
# version format (you need to bump it when changing version)
version: 1.2.1-{build}-{branch}
# branches
branches:
# whitelist
only:
- develop
# blacklist
except:
- gh-pages
# Do not build on tags (note: otherwise appveyor keeps looping on a release)
# we simply want to build on a new push
skip_tags: true
# Including commits with particular message
# Start a new build if message contains 'ci-build'
only_commits:
message: /ci-build/
#---------------------------------#
# environment configuration #
#---------------------------------#
# Build worker image (VM template)
image: Visual Studio 2019
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
# clone directory
clone_folder: c:\projects\preparelanding
# fetch our repository as a zip archive (shallow clone) instead of a "full" git repo with its history.
shallow_clone: true
# environment variables
environment:
DLL_ARCH_PASS: # RimWorld DLLs archive password (secured)
secure: TYvQsvft4cGEHRyIhPrRYlCxkQzOl9zQS8GpF5S6D2I=
matrix:
# set this flag to immediately finish build once one of the jobs fails.
fast_finish: true
# cache package between builds.
cache:
- packages -> **\packages.config
# scripts that run after cloning repository
install:
# Note: by default, all script lines are interpreted as batch
- cmd: echo Starting install
#---------------------------------#
# Setup environment variables #
#---------------------------------#
# set up env variable for python path ( path is hardcoded, see https://www.appveyor.com/docs/build-environment/#python )
- cmd: set PYTHON_PATH="C:\Python36-x64"
- cmd: set PATH=%PYTHON_PATH%;%PATH%
- cmd: python --version
#
# setup various directories
#
# repo location
- cmd: echo %APPVEYOR_BUILD_FOLDER%
# downloaded stuff go here
- cmd: set DOWNLOAD_FOLDER=%APPVEYOR_BUILD_FOLDER%\download
- cmd: mkdir %DOWNLOAD_FOLDER%
# the final zip is put here
- cmd: set ARTIFACTS_FOLDER=%APPVEYOR_BUILD_FOLDER%\artifacts
- cmd: mkdir %ARTIFACTS_FOLDER%
# location of the dependencies required to build the projet
- cmd: set LIBS_FOLDER=%APPVEYOR_BUILD_FOLDER%\libs\1.3
- cmd: mkdir %LIBS_FOLDER%
# location of the mod files (everything that represents the mod, including binaries)
- cmd: set OUTPUT_FOLDER=%APPVEYOR_BUILD_FOLDER%\output\PrepareLanding
# location of the mod file binaries
- cmd: set OUTPUT_ASSEMBLY_FOLDER=%APPVEYOR_BUILD_FOLDER%\output\PrepareLanding\1.3\Assemblies
# location of the python scripts used to prepare the build
- cmd: set PYTHON_SCRIPTS_FOLDER=%APPVEYOR_BUILD_FOLDER%\tools\appveyor
# install requirements for our python scripts
- cmd: python -m pip install -r %PYTHON_SCRIPTS_FOLDER%\python-requirements.txt
#
# Download required assemblies DLLs
#
#- cmd: python %PYTHON_SCRIPTS_FOLDER%\download_dependencies.py -u https://github.com/UnlimitedHugs/RimworldHugsLib/releases/download/v3.1.2/HugsLib_3.1.2.zip --download_path %DOWNLOAD_FOLDER%
#- cmd: python %PYTHON_SCRIPTS_FOLDER%\extract_archive.py %DOWNLOAD_FOLDER% -o %LIBS_FOLDER% -x e -e *.dll
- cmd: python %PYTHON_SCRIPTS_FOLDER%\download_dependencies.py -u http://tzcorporation.com/rimworld/build/rimworld_13.7z --download_path %DOWNLOAD_FOLDER%
- cmd: python %PYTHON_SCRIPTS_FOLDER%\extract_archive.py %DOWNLOAD_FOLDER% -o %LIBS_FOLDER% -x e -e *.dll
- cmd: dir %LIBS_FOLDER%
- cmd: echo Ending install
#---------------------------------#
# build configuration #
#---------------------------------#
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
# to add several platforms to build matrix:
platform:
#- x86
- Any CPU
# build Configuration, i.e. Debug, Release, etc.
# to add several configurations to build matrix:
configuration:
- Release
# scripts to run before build
before_build:
- cmd: 'nuget restore PrepareLanding.sln -verbosity detailed'
build:
# enable MSBuild parallel builds
parallel: true
# path to Visual Studio solution or project
project: .\PrepareLanding.sln
# MSBuild verbosity level, possible values are: quiet|minimal|normal|detailed
verbosity: normal
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
before_package:
# delete downloaded assembly files
- cmd: del %LIBS_FOLDER%\*.dll
- cmd: cd %LIBS_FOLDER% & dir
- cmd: echo done!
# scripts to run after build
after_build:
# zip the mod directory and put it in artifact folder
- cmd: 7z.exe a %ARTIFACTS_FOLDER%\PrepareLanding.zip %OUTPUT_FOLDER%
# to run your custom scripts instead of automatic MSBuild
build_script:
# to disable automatic builds
#build: off
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
# pushing entire folder as a zip archive
- path: artifacts\PrepareLanding.zip
name: pl_gd
#---------------------------------#
# deployment configuration #
#---------------------------------#
# to disable deployment
#deploy: off
# scripts to run before deployment
before_deploy:
# providers: Local, FTP, WebDeploy, AzureCS, AzureBlob, S3, NuGet, Environment
# provider names are case-sensitive!
deploy:
# Deploy to GitHub 'releases'
- provider: GitHub
# artfact we want to push on github
artifact: pl_gd
# release name pushed on github
release: PrepareLanding-$(appveyor_build_version)
# auth token to push on github
auth_token:
secure: "qiSHK3OrlKBVuX0BlmwDZZGtbJC8qlCLg/S/nIQXRIRfPFUrOlixhvK2ck09cX4A"
# is it a draft release?
draft: false
# is a a pre-release?
prerelease: true
# which branch?
on:
branch: develop
# deploy on tag push only
appveyor_repo_tag: false
# scripts to run after deployment
after_deploy:
# to run your custom scripts instead of provider deployments
deploy_script:
#---------------------------------#
# global handlers #
#---------------------------------#
# on successful build
on_success:
#- do something
# on build failure
on_failure:
#- do something
# after build failure or success
on_finish:
#- do something
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
# Email
#- provider: Email
# to:
# subject: 'Build {{status}}' # optional
# message: "{{message}}, {{commitId}}, ..." # optional
# on_build_status_changed: true
# Github
- provider: GitHubPullRequest
auth_token:
secure: qiSHK3OrlKBVuX0BlmwDZZGtbJC8qlCLg/S/nIQXRIRfPFUrOlixhvK2ck09cX4A