2014-07-03 17:17:00 -06:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
2018-02-10 23:58:06 -07:00
|
|
|
- develop
|
2014-07-03 17:17:00 -06:00
|
|
|
|
2017-03-30 00:23:16 -06:00
|
|
|
image: Visual Studio 2017
|
2014-07-03 17:17:00 -06:00
|
|
|
|
2017-05-22 11:08:16 -06:00
|
|
|
platform:
|
|
|
|
- x86
|
|
|
|
|
2017-05-22 10:04:14 -06:00
|
|
|
environment:
|
|
|
|
matrix:
|
|
|
|
- db: plain
|
2017-05-22 10:06:09 -06:00
|
|
|
db_id: 1
|
|
|
|
- db: mysql
|
|
|
|
db_id: 2
|
2017-05-22 10:04:14 -06:00
|
|
|
- db: pgsql
|
2017-05-22 10:06:09 -06:00
|
|
|
db_id: 3
|
2017-05-22 10:04:14 -06:00
|
|
|
- db: sqlite
|
2017-05-22 10:06:09 -06:00
|
|
|
db_id: 4
|
2017-05-22 10:04:14 -06:00
|
|
|
- db: odbc
|
2017-05-22 10:06:09 -06:00
|
|
|
db_id: 5
|
2017-05-22 10:06:40 -06:00
|
|
|
|
2017-05-22 10:04:14 -06:00
|
|
|
configuration:
|
2018-05-08 11:51:28 -06:00
|
|
|
# - Debug
|
2017-05-22 10:04:14 -06:00
|
|
|
- Release
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
|
|
|
|
|
2014-07-03 17:17:00 -06:00
|
|
|
clone_folder: c:\pvpgn
|
|
|
|
|
|
|
|
install:
|
|
|
|
- cmd: cd c:\
|
2015-09-23 13:14:02 -06:00
|
|
|
- cmd: appveyor DownloadFile https://github.com/HarpyWar/pvpgn-magic-builder/archive/master.zip
|
2014-07-03 17:17:00 -06:00
|
|
|
- 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\"
|
2015-09-23 13:14:02 -06:00
|
|
|
- cmd: cd c:\builder\
|
2018-05-08 11:51:28 -06:00
|
|
|
- cmd: mkdir bin
|
|
|
|
- cmd: mkdir pdb
|
2014-07-03 17:17:00 -06:00
|
|
|
|
2015-09-23 13:14:02 -06:00
|
|
|
before_build:
|
2016-08-28 11:03:14 -06:00
|
|
|
- cmd: set APPVEYOR_REPO_COMMIT_SHORT=%APPVEYOR_REPO_COMMIT:~0,7%
|
2017-03-30 05:34:24 -06:00
|
|
|
# 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%
|
2018-05-08 13:25:44 -06:00
|
|
|
- ps: $env:PVPGN_ZIP=$env:COMPLETE_BUILD_VERSION + "_" + $env:DB + $(If ($env:CONFIGURATION -ne "Release") {"_" + ($env:CONFIGURATION).ToLower()} Else {""}) + ".zip"
|
2018-05-08 11:51:28 -06:00
|
|
|
- ps: $env:PVPGN_PDB_ZIP=$env:COMPLETE_BUILD_VERSION + "_" + $env:DB + $(If ($env:CONFIGURATION -ne "Release") {"_" + ($env:CONFIGURATION).ToLower()} Else {".pdb"}) + ".zip"
|
2014-07-03 19:39:05 -06:00
|
|
|
|
2014-07-03 19:22:35 -06:00
|
|
|
build_script:
|
|
|
|
|
2015-09-23 13:14:02 -06:00
|
|
|
# build gui and console for each storage type
|
2016-11-23 06:21:22 -07:00
|
|
|
# build_pvpgn.bat params:
|
2015-09-23 13:14:02 -06:00
|
|
|
# 1. automatic build flag
|
|
|
|
# 2. visual studio version
|
|
|
|
# 3. console or gui
|
|
|
|
# 4. storage type
|
|
|
|
# 5. with or without lua
|
2016-08-28 11:03:14 -06:00
|
|
|
# 6. Release or Debug
|
2017-04-03 12:20:06 -06:00
|
|
|
|
2018-05-08 11:51:28 -06:00
|
|
|
# gui
|
2017-05-22 11:08:16 -06:00
|
|
|
- cmd: build_pvpgn.bat auto auto 2 %DB_ID% y %CONFIGURATION%
|
2018-05-08 11:51:28 -06:00
|
|
|
- cmd: move /Y %CONFIGURATION%\*.pdb pdb\ # move pdb files
|
|
|
|
- cmd: copy /Y %CONFIGURATION%\* bin\ # backup binary files
|
|
|
|
# console
|
2017-05-22 11:27:19 -06:00
|
|
|
- cmd: build_pvpgn.bat auto auto 1 %DB_ID% y %CONFIGURATION%
|
2018-05-08 11:51:28 -06:00
|
|
|
- cmd: move /Y %CONFIGURATION%\*.pdb pdb\ # move pdb files
|
|
|
|
- cmd: move /Y bin\* %CONFIGURATION% # move back binaries after build console version
|
|
|
|
# create zip artifacts
|
2017-05-22 11:08:16 -06:00
|
|
|
- cmd: 7z.exe a %PVPGN_ZIP% .\%CONFIGURATION%\*
|
2018-05-08 11:51:28 -06:00
|
|
|
- cmd: 7z.exe a %PVPGN_PDB_ZIP% .\pdb\*
|
2015-09-23 13:14:02 -06:00
|
|
|
|
2017-03-30 02:45:27 -06:00
|
|
|
deploy_script:
|
|
|
|
- ps: |
|
2017-05-22 11:08:16 -06:00
|
|
|
Push-AppveyorArtifact $env:PVPGN_ZIP
|
2018-05-08 11:51:28 -06:00
|
|
|
Push-AppveyorArtifact $env:PVPGN_PDB_ZIP
|
2016-11-23 12:49:43 -07:00
|
|
|
|
2016-11-23 06:21:22 -07:00
|
|
|
# check the latest build executable for exists
|
2014-07-03 19:22:35 -06:00
|
|
|
test:
|
|
|
|
assemblies:
|
2017-05-22 11:08:16 -06:00
|
|
|
- '**\src\bnetd\%CONFIGURATION%\bnetd.exe'
|