62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
version: 1.0.{build}
|
|
image:
|
|
- Visual Studio 2017
|
|
- Visual Studio 2015
|
|
configuration: Release
|
|
platform:
|
|
- x86
|
|
- x64
|
|
init:
|
|
- cmd: >-
|
|
SET
|
|
|
|
set arch=
|
|
|
|
if "%Platform%"=="x64" ( set arch= Win64)
|
|
|
|
echo %arch%
|
|
|
|
echo %APPVEYOR_BUILD_WORKER_IMAGE%
|
|
|
|
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( set generator="Visual Studio 15 2017%arch%" )
|
|
|
|
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" ( set generator="Visual Studio 14 2015%arch%" )
|
|
|
|
if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" ( set generator="Visual Studio 12 2013%arch%" )
|
|
|
|
echo %generator%
|
|
install:
|
|
- ps: >-
|
|
echo "Build Platform: $($env:Platform)"
|
|
|
|
vcpkg upgrade --no-dry-run
|
|
|
|
vcpkg install zlib sqlite3 dirent libgd leveldb libpq --triplet "$($env:Platform)-windows"
|
|
cache:
|
|
- c:\tools\vcpkg\installed\
|
|
build_script:
|
|
- cmd: >-
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DVCPKG_TARGET_TRIPLET=%Platform%-windows -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -G %generator% -DENABLE_POSTGRESQL=true
|
|
|
|
cmake --build . --target ALL_BUILD --config Release
|
|
|
|
cpack -G "ZIP"
|
|
|
|
cpack -G "WIX"
|
|
artifacts:
|
|
- path: '\build\Minetestmapper*.zip'
|
|
name: build
|
|
- path: '\build\Minetestmapper*.msi'
|
|
name: installer
|
|
deploy:
|
|
- provider: GitHub
|
|
auth_token:
|
|
secure: nvCGwNkN3YUjH8vsFB/Xkseo2VSLqje0wMOXmOPyo1Lovh++Cwg7/dJRyLsEZo+U
|
|
artifact: build
|
|
prerelease: true
|
|
on:
|
|
appveyor_repo_tag: true |