72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
branches:
|
|
only:
|
|
- master
|
|
|
|
image: Visual Studio 2017
|
|
|
|
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\
|
|
|
|
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: $PVPGN_ZIP=$env:COMPLETE_BUILD + "_VERSION_" + $env:DB + $(If ($env:CONFIGURATION -eq "Debug") {"_debug"} Else {""}) + ".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
|
|
|
|
- ps: .\build_pvpgn.bat auto auto 2 $env:DB_ID y $env:CONFIGURATION
|
|
- ps: move $env:CONFIGURATION + "\*.exe"
|
|
- ps: move $env:CONFIGURATION + "\*.pdb"
|
|
- ps: .\build_pvpgn.bat auto auto 1 $env:DB_ID y $env:CONFIGURATION
|
|
- ps: move /Y *.exe $env:CONFIGURATION
|
|
- ps: move /Y *.pdb $env:CONFIGURATION
|
|
- ps: .\7z.exe a $PVPGN_ZIP (".\" + $env:CONFIGURATION + "\*")
|
|
|
|
deploy_script:
|
|
- ps: |
|
|
Push-AppveyorArtifact $PVPGN_ZIP
|
|
|
|
# check the latest build executable for exists
|
|
test:
|
|
assemblies:
|
|
- '**\src\bnetd\$(configuration)\bnetd.exe'
|