-
Notifications
You must be signed in to change notification settings - Fork 1
/
.appveyor.yml
142 lines (105 loc) · 4.15 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: '{branch}-{build}'
#---------------------------------#
# environment configuration #
#---------------------------------#
# Build worker image (VM template)
image:
- Visual Studio 2017 Preview
# set clone depth
clone_depth: 1
# scripts that are called at very beginning, before repo cloning
init:
- ps: >-
if (Test-Path env:TRIGGER_NAME) {
Update-AppveyorBuild -Message "Build by $env:TRIGGER_BUILD_VERSION in $env:TRIGGER_NAME"
}
- git --version
- cmake --version
# environment variables
environment:
CMAKE_PREFIX_PATH: C:\projects\_install;
INSTALL_PREFIX: C:/projects/_install
BUILD_TOOLSET_VERSION: 141
CMAKE_GENERATOR: Visual Studio 15 2017 Win64
# this is how to allow failing jobs in the matrix
matrix:
fast_finish: true # set this flag to immediately finish build once one of the jobs fails.
# build cache to preserve files/folders between builds
#cache:
# scripts that run after cloning repository
install:
- ps: mkdir $env:INSTALL_PREFIX
- ps: pushd $env:INSTALL_PREFIX
# initialize vcpkg
- git clone -q --branch rpcpp-devops --depth 1 https://github.com/bluekyu/vcpkg.git
- ps: pushd vcpkg
# download vcpkg artifacts
- ps: >-
if ($isWindows) {
Start-FileDownload 'https://ci.appveyor.com/api/projects/bluekyu/vcpkg/artifacts/vcpkg.7z?branch=rpcpp-devops&job=Image%3A+Visual+Studio+2017+Preview'
} else {
Start-FileDownload 'https://ci.appveyor.com/api/projects/bluekyu/vcpkg/artifacts/vcpkg.tar.xz?branch=rpcpp-devops&job=Image%3A+Ubuntu1804'
}
# extract vcpkg cache
- sh: tar xf vcpkg.tar.xz
- cmd: 7z x -y vcpkg.7z > nul
- ps: popd
# download and extract panda3d
- ps: Start-FileDownload ('https://ci.appveyor.com/api/projects/bluekyu/panda3d/artifacts/panda3d.7z?branch=master&job=Image%3A+Visual+Studio+2017+Preview%3B+Configuration%3A+' + "$env:CONFIGURATION")
- 7z x -y panda3d.7z > nul
# download and extract render pipeline
- ps: Start-FileDownload ('https://ci.appveyor.com/api/projects/bluekyu/render-pipeline-cpp/artifacts/render_pipeline_cpp.7z?branch=master&job=Image%3A+Visual+Studio+2017+Preview%3B+Configuration%3A+' + "$env:CONFIGURATION")
- 7z x -y render_pipeline_cpp.7z > nul
# download and extract rpcpp-plugins
- ps: Start-FileDownload ('https://ci.appveyor.com/api/projects/bluekyu/rpcpp-plugins/artifacts/rpcpp_plugins.7z?branch=master&job=Configuration%3A+' + "$env:CONFIGURATION")
- 7z x -y rpcpp_plugins.7z > nul
- cmd: xcopy /E .\rpcpp_plugins .\render_pipeline_cpp
- ps: popd
#---------------------------------#
# build configuration #
#---------------------------------#
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
platform: x64
# build Configuration, i.e. Debug, Release, etc.
configuration:
- Debug
- Release
build:
parallel: true # enable MSBuild parallel builds
# to run your custom scripts instead of automatic MSBuild
build_script:
- ps: mkdir _build
- ps: pushd _build
- cmd: >-
cmake .. -G "%CMAKE_GENERATOR%" -Wno-dev -Thost=x64
-DCMAKE_TOOLCHAIN_FILE=%INSTALL_PREFIX%/vcpkg/scripts/buildsystems/vcpkg.cmake
-DVCPKG_APPLOCAL_DEPS:BOOL=OFF
-DVCPKG_TARGET_TRIPLET=x64-windows-vc%BUILD_TOOLSET_VERSION%
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%/rpcpp_samples"
-Dpanda3d_ROOT:PATH="%INSTALL_PREFIX%/panda3d"
-Drpcpp_samples_BUILD_panda3d_samples:BOOL=ON
-Drpcpp_samples_BUILD_render_pipeline_samples:BOOL=ON
-Drpcpp_samples_BUILD_rpcpp_samples:BOOL=ON
-Drpcpp_samples_BUILD_snippets:BOOL=ON
- cmake --build . --config %CONFIGURATION%
- ps: popd
#---------------------------------#
# tests configuration #
#---------------------------------#
test_script:
after_test:
- cmake --build _build --config %CONFIGURATION% --target install
- 7z a rpcpp_samples.7z "%INSTALL_PREFIX%/rpcpp_samples"
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: rpcpp_samples.7z
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy: off