-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
98 lines (74 loc) · 4.02 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
# Definitely check out https://www.appveyor.com/docs/appveyor-yml/ for more info on what's in this document.
# Change all lines with CHANGEME in a comment above them to fit your project structure.
# AppVeyor is really nice and I recommend it for anybody looking for automating their
# Windows builds. Check it out at https://ci.appveyor.com !
version: '{branch}-{build}'
# We only care about master and develop for our project.
# CHANGEME if you want AppVeyor to build other branches!
branches:
only:
- master
- develop
# We only want to build if actual source files changed, and not game resource / misc files.
only_commits:
files:
- mp/src/
- appveyor.yml
# Don't build when tags are made
skip_tags: true
# Build image
image: Visual Studio 2019
# Clone to only the last commit
clone_depth: 1
# environment variables
environment:
POWERSHELL_TELEMETRY_OPTOUT: 1
# Install script is called after cloning the repository
install:
# Gotta do some fun Registry stuff here for VPC to work without VS2013 installed.
- REG ADD "HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\10.0\Projects\{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" /v DefaultProjectExtension /t REG_SZ /d vcproj /f
# Let's get into this source directory, where our "creategameprojects" script normally is
- cd mp\src
# It's important to note that this is what is found inside of createallprojects.bat, but our script pauses
# to help know if something went wrong with VPC, so we directly call it here instead.
# Further note: Our builder builds everything, including tools, because we require them for our push to Steam.
# It is advised to just only build your game projects (server/client DLLs). Replace this line with the commands found in
# your "creategameprojects.bat" file in your repository.
# CHANGEME
- devtools\bin\vpc.exe /momentum +everything /mksln everything.sln
# Another note: VPC is really lame and doesn't spit out the full solution file. The correct file is after you
# open it in Visual Studio and save it. There's a big chunk missing at the end. Refer to momentum's "sln_fix.txt" file,
# or push your sln file to your game's repository. You can see how the sln_file got its chunk by opening your project's sln
# file inside of a text editor and looking near the bottom of the file. We copy that chunk over here.
# CHANGEME
- copy everything.sln+sln_fix.txt everything.sln
# Build Configuration things
# You'll want Release binaries for your game, but feel free to change this if you really want to!
configuration: Release
build_script:
- msbuild everything.sln /m /nologo /p:Configuration=%CONFIGURATION% /t:Clean;Build /v:m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# Disable automatic testing
test: off
# After build scripts run... well, after the build, of course. Mainly here to clean some stuff up.
after_build:
# This is trimming the commit hash to be only around 7 characters long, much more bearable when you have it
# sent to a slack channel or something. Feel free to CHANGEME if you don't use/don't want to shorten it.
- ps: $env:APPVEYOR_REPO_COMMIT=$(git rev-parse --short HEAD)
# Gonna be creating zip files.
# CHANGEME to be your correct game's name (not Momentum I hope)
- |
cd %APPVEYOR_BUILD_FOLDER%\mp\game
7z a ..\..\bin_%APPVEYOR_REPO_COMMIT%.zip bin momentum\bin -xr!*.pdb
7z a ..\..\pdb_%APPVEYOR_REPO_COMMIT%.zip bin\*.pdb momentum\bin\*.pdb
cd %APPVEYOR_BUILD_FOLDER%
# Lastly, and certainly not leastly (it's the reason we're doing this!), Artifacts.
artifacts:
# First one is all of the binary files
# CHANGEME if you don't build everything feel free to remove this
- path: bin_%APPVEYOR_REPO_COMMIT%.zip
# Secondly, the pdbs (used for debugging)
# CHANGEME: Our game's name is Momentum, change it to be yours!
- path: pdb_%APPVEYOR_REPO_COMMIT%.zip
# It's worth to note that notifications can be set up either in this file or online. I recommend the latter.
# You can do that in your project settings -> Notifications. Slack (and Discord's webhook with /slack at the end)
# both work wonders.