This repository has been archived by the owner on Oct 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
102 lines (83 loc) · 3.69 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: 0.{build}
clone_depth: 1
clone_folder: C:\projects\inexorgame
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
# Maximum number of concurrent jobs for the project
max_jobs: 4
# https://www.appveyor.com/docs/build-environment/#build-worker-images
image: Visual Studio 2017
environment:
# VS VERSION IN CMAKE STYLE
matrix:
- VSVERSION: "15 2017"
TOOLSET: "None"
#CI - VSVERSION: "15 2017"
#CI TOOLSET: "v141_clang_c2"
- VSVERSION: "14 2015"
TOOLSET: "None"
platform:
- x64
#CI - Win32
configuration:
#CI - Debug
- Release
# scripts that are called at very beginning, before repo cloning
init:
- python --version
- cmake --version
- msbuild /version
# scripts that run after cloning repository
install:
- python -m pip install conan
- set "MAIN_FOLDER=C:\projects\inexorgame\%RELATIVE_PATH%"
- cd %MAIN_FOLDER%
- set VSVERSIONSHORT=%VSVERSION:~0,2%
# set INEXOR_VERSION (used in cmakes package creation process) based on the last tag found.
- if "%APPVEYOR_REPO_TAG%"=="true" ( set "INEXOR_VERSION=%APPVEYOR_REPO_TAG_NAME%" )
- if "%APPVEYOR_REPO_TAG%"=="false" ( set "INEXOR_VERSION=development" )
# scripts to run before build
before_build:
# Fix detection of VS 2017 by e.g. OpenSSL
- set "VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\"
- if "%VSVERSION%"=="15 2017" if "%platform%"=="x64" ( "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" )
- if "%VSVERSION%"=="15 2017" if "%platform%"=="Win32" ( "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_x86.bat" )
- cd %MAIN_FOLDER%
- md build
- cd build
- if "%platform%"=="Win32" ( set "CMAKE_GENERATOR_NAME=Visual Studio %VSVERSION%" && set "arch_str=x86" )
- if "%platform%"=="x64" ( set "CMAKE_GENERATOR_NAME=Visual Studio %VSVERSION% Win64" && set "arch_str=x86_64")
- if %configuration%==Debug (set "runtime_str=MTd")else (set "runtime_str=MT")
- set "args=-DBUILD_CLIENT=1 -DBUILD_SERVER=1 -DBUILD_TEST=1 -DCREATE_PACKAGE=1"
- conan --version
- conan remote add inexor https://api.bintray.com/conan/inexorgame/inexor-conan --insert
## https://bintray.com/conan/conan-center is second
- conan remote list
- if "%GLOBAL_NIGHTLY%"=="conanforcerebuild" ( set "buildstrategy=" && set "GLOBAL_NIGHTLY=conan") else ( set "buildstrategy==outdated" )
- if "%GLOBAL_NIGHTLY%"=="conan" ( set "createpackage=" ) else ( set "createpackage=--env create_package=1" && set "buildstrategy==outdated")
- conan install .. --env build_all=1 %createpackage% --build%buildstrategy% -s compiler="Visual Studio" -s compiler.version=%VSVERSIONSHORT% -s compiler.runtime=%runtime_str% -s compiler.toolset=%TOOLSET% -s arch=%arch_str% -s build_type=%configuration%
- if "%GLOBAL_NIGHTLY%"=="true" ( cmake .. -G "%CMAKE_GENERATOR_NAME%" %args% -DCPACK_GENERATOR="ZIP" ) else ( cmake .. -G "%CMAKE_GENERATOR_NAME%" %args% )
#"NSIS;7Z"
build:
project: "%MAIN_FOLDER%build\\PACKAGE.vcxproj"
# enable MSBuild parallel builds
parallel: true
artifacts:
# pushing a single file
- path: build\inexor-core-*.zip
deploy:
# push release binaries to GitHub if tag gets created (and create a release draft)
- provider: GitHub
auth_token:
secure: M/qXIxI0UwsfWg1JBnQf987R+dE0vdo/peOH03Z3E3aD4MM6jWlBIlL5VP5RMzbE
draft: false
prerelease: true
# Override files if there are any already.
force_update: true
on:
# do only deploy on tag push
appveyor_repo_tag: true
configuration: Release
VSVERSION: "15 2017"
test_script:
- C:\projects\inexorgame\%RELATIVE_PATH%build\bin\unit_tests.exe