forked from koraa/sauerbraten-fork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
75 lines (65 loc) · 2.61 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
version: 0.{build}
clone_depth: 1
clone_folder: C:\projects\inexor-game
platform:
- Win32
- x64
# build Configuration, i.e. Debug, Release, etc.
configuration:
# - Debug
- Release
# scripts that are called at very beginning, before repo cloning
init:
- if defined APPVEYOR_PULL_REQUEST_NUMBER set "IS_PR=True"
- if "%APPVEYOR_REPO_NAME%"=="inexor-game/code" set "IS_MAIN_REPO=True"
- if "%IS_MAIN_REPO%"=="True" if "%IS_PR%"=="True" set "SKIP_BUILD=1"
- cmd: cmake --version
- cmd: msbuild /version
# scripts that run after cloning repository
install:
- cmd: set "MAIN_FOLDER=C:\projects\inexor-game"
- cmd: cd %MAIN_FOLDER%
- cmd: git submodule update --init
# scripts to run before build
before_build:
- cmd: cd C:\projects\inexor-game
- cmd: md build
- cmd: cd build
# We generate project files for Visual Studio 13 only atm.
- cmd: if "%platform%"=="Win32" set "CMAKE_GENERATOR_NAME=Visual Studio 14 2015"
- cmd: if "%platform%"=="x64" set "CMAKE_GENERATOR_NAME=Visual Studio 14 2015 Win64"
- cmd: cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%configuration% ..
build:
# cmakes placeholder project to silence appveyor complaining about us using the cli
project: C:\projects\inexor-game\build\ZERO_CHECK.vcxproj
# enable MSBuild parallel builds
# parallel: true
after_build: # this is actually partly our before_deploy, but appveyor doesnt like that with dynamic artifacts
- cmd: cd C:\projects\inexor-game\
# Start the build here instead of in build to be able to finetune it:
- cmd: if not defined SKIP_BUILD msbuild C:\projects\inexor-game\build\install.vcxproj /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /m
# create the nightly bundle .zip
- cmd: if not defined SKIP_BUILD if "%configuration%"=="Release" tool\appveyor_create_nightly.bat
deploy:
# push our nightly bundle via ftp
- provider: FTP
protocol: ftp
host: inexor.org
username:
secure: rpQyxcVaaqNxDvYQlGP/eA==
password:
secure: aBNw6S6n1MqCfw/0S2vhDA==
# push release binaries to GitHub if tag gets created (and create a release draft)
- provider: GitHub
auth_token:
secure: vIfb9LX3nWCSRefUqY4JJL3hSosnPgKAbmGejFBL+C9GtHJKSuPLU6aMCrR79hPM
draft: true
prerelease: true
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only
# Note: on_success gets executed last
on_success: #we atm do not use it as test_script: bc if it fails then it signals a failed build
- cmd: cd C:\projects\inexor-game\
# run the unit test executable.
- cmd: tool\appveyor_test.bat