forked from pvpgn/pvpgn-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
84 lines (70 loc) · 2.39 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
branches:
only:
- master
- develop
image: Visual Studio 2019
platform:
- x86
environment:
matrix:
- db: plain
db_id: 1
- db: mysql
db_id: 2
- db: pgsql
db_id: 3
- db: sqlite
db_id: 4
- db: odbc
db_id: 5
configuration:
# - Debug
- Release
matrix:
fast_finish: true
clone_folder: c:\pvpgn
install:
- cmd: cd c:\
- cmd: appveyor DownloadFile https://github.com/HarpyWar/pvpgn-magic-builder/archive/master.zip
- cmd: 7z.exe x master.zip >nul
- cmd: ren pvpgn-magic-builder-master builder
- cmd: mkdir c:\builder\source\
- cmd: xcopy /E /R /K /Y /Q "c:\pvpgn" "c:\builder\source\"
- cmd: cd c:\builder\
- cmd: mkdir bin
- cmd: mkdir pdb
before_build:
- cmd: set APPVEYOR_REPO_COMMIT_SHORT=%APPVEYOR_REPO_COMMIT:~0,7%
# read version string from version.h to %PVPGN_VERSION% and append commit string inside that file
- cmd: module\tools\pvpgn_version.bat %APPVEYOR_REPO_COMMIT_SHORT%
- cmd: set COMPLETE_BUILD_VERSION=pvpgn-%APPVEYOR_REPO_BRANCH%-%PVPGN_VERSION%-%APPVEYOR_REPO_COMMIT_SHORT%
- ps: $env:PVPGN_ZIP=$env:COMPLETE_BUILD_VERSION + "_" + $env:DB + $(If ($env:CONFIGURATION -ne "Release") {"_" + ($env:CONFIGURATION).ToLower()} Else {""}) + ".zip"
- ps: $env:PVPGN_PDB_ZIP=$env:COMPLETE_BUILD_VERSION + "_" + $env:DB + $(If ($env:CONFIGURATION -ne "Release") {"_" + ($env:CONFIGURATION).ToLower()} Else {".pdb"}) + ".zip"
build_script:
# build gui and console for each storage type
# build_pvpgn.bat params:
# 1. automatic build flag
# 2. visual studio version
# 3. console or gui
# 4. storage type
# 5. with or without lua
# 6. Release or Debug
# gui
- cmd: build_pvpgn.bat auto auto 2 %DB_ID% y %CONFIGURATION%
- cmd: move /Y %CONFIGURATION%\*.pdb pdb\ # move pdb files
- cmd: copy /Y %CONFIGURATION%\* bin\ # backup binary files
# console
- cmd: build_pvpgn.bat auto auto 1 %DB_ID% y %CONFIGURATION%
- cmd: move /Y %CONFIGURATION%\*.pdb pdb\ # move pdb files
- cmd: move /Y bin\* %CONFIGURATION% # move back binaries after build console version
# create zip artifacts
- cmd: 7z.exe a %PVPGN_ZIP% .\%CONFIGURATION%\*
- cmd: 7z.exe a %PVPGN_PDB_ZIP% .\pdb\*
deploy_script:
- ps: |
Push-AppveyorArtifact $env:PVPGN_ZIP
Push-AppveyorArtifact $env:PVPGN_PDB_ZIP
# check the latest build executable for exists
test:
assemblies:
- '**\src\bnetd\%CONFIGURATION%\bnetd.exe'