-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.appveyor.yml
228 lines (178 loc) · 6.67 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: '{branch}-{build}'
# Skipping commits affecting specific files (GitHub only). More details here: /docs/appveyor-yml
skip_commits:
files:
- docs/*
#---------------------------------#
# environment configuration #
#---------------------------------#
# Build worker image (VM template)
image:
- Ubuntu1804
- Visual Studio 2017 Preview
# set clone depth
clone_depth: 1
# scripts that are called at very beginning, before repo cloning
init:
- ps: >-
if (($isLinux) -and ($env:CONFIGURATION -eq "Debug") -and (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:
# Visual Studio (default)
CMAKE_PREFIX_PATH: C:\projects\_install;
INSTALL_PREFIX: C:/projects/_install
FREETYPE_DIR: C:\projects\_install\panda3d-thirdparty\win-libs-vc14-x64\freetype
# 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.
exclude:
- image: Ubuntu1804
configuration: Debug
# build cache to preserve files/folders between builds
#cache:
# scripts that run after cloning repository
install:
# init submodule
- ps: pushd $env:APPVEYOR_BUILD_FOLDER
- git submodule update --init --recursive
- ps: popd
# install packages
- sh: sudo apt-get update
- sh: sudo apt-get install --yes --no-install-recommends g++-8 libfreetype6-dev libassimp-dev
- sh: sudo update-alternatives --set gcc /usr/bin/gcc-8
- 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-thirdparty
- ps: >-
if ($isWindows) {
if ($env:CONFIGURATION -eq "Debug") {
Start-FileDownload 'https://ci.appveyor.com/api/projects/bluekyu/panda3d-thirdparty/artifacts/panda3d-thirdparty.7z?branch=master&job=Configuration%3A+MixForDebug'
} else {
Start-FileDownload 'https://ci.appveyor.com/api/projects/bluekyu/panda3d-thirdparty/artifacts/panda3d-thirdparty.7z?branch=master&job=Configuration%3A+Release'
}
}
- cmd: 7z x -y panda3d-thirdparty.7z > nul
# download and extract panda3d
- ps: >-
if ($isLinux) {
Start-FileDownload ('https://ci.appveyor.com/api/projects/bluekyu/panda3d/artifacts/panda3d.tar.xz?branch=master&job=Image%3A+Ubuntu1804%3B+Configuration%3A+' + "$env:CONFIGURATION")
} else {
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")
}
- sh: tar xf panda3d.tar.xz
- cmd: 7z x -y panda3d.7z > nul
- 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
# Linux
- sh: >-
cmake .. -G "$CMAKE_GENERATOR" -Wno-dev
-DCMAKE_TOOLCHAIN_FILE="$INSTALL_PREFIX/vcpkg/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_APPLOCAL_DEPS:BOOL=OFF
-DVCPKG_TARGET_TRIPLET=x64-linux
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX/render_pipeline_cpp"
-Dpanda3d_ROOT:PATH="$INSTALL_PREFIX/panda3d"
- sh: cmake --build . --config $CONFIGURATION
# Visual Studio
- 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%/render_pipeline_cpp"
-Dpanda3d_ROOT:PATH="%INSTALL_PREFIX%/panda3d"
- cmd: cmake --build . --config %CONFIGURATION%
- ps: popd
#---------------------------------#
# tests configuration #
#---------------------------------#
test_script:
after_test:
# Linux
- sh: cmake --build _build --config $CONFIGURATION --target install
- sh: pushd "$INSTALL_PREFIX"
- sh: tar cJf "$APPVEYOR_BUILD_FOLDER/render_pipeline_cpp.tar.xz" "render_pipeline_cpp"
- sh: popd
# Visual Studio
- cmd: cmake --build _build --config %CONFIGURATION% --target install
- cmd: 7z a render_pipeline_cpp.7z "%INSTALL_PREFIX%/render_pipeline_cpp"
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
# Visual Studio (default)
- path: render_pipeline_cpp.7z
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy: off
#---------------------------------#
# global handlers #
#---------------------------------#
# on successful build
on_success:
- ps: >-
if (($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017 Preview") -and ($env:CONFIGURATION -eq "Release") -and ($env:APPVEYOR_REPO_BRANCH -eq "master")) {
Start-AppveyorBuild -ApiKey $env:api_key -ProjectSlug 'rpcpp-plugins' -EnvironmentVariables @{
TRIGGER_NAME = $env:APPVEYOR_PROJECT_NAME
TRIGGER_BUILD_VERSION = $env:APPVEYOR_BUILD_VERSION
}
}
#---------------------------------#
# specializing matrix #
#---------------------------------#
for:
-
matrix:
only:
- image: Ubuntu1804
environment:
CMAKE_GENERATOR: Unix Makefiles
CMAKE_PREFIX_PATH: /home/appveyor/projects/_install;/home/appveyor/projects/_cache
CACHE_PREFIX: /home/appveyor/projects/_cache
INSTALL_PREFIX: /home/appveyor/projects/_install
FREETYPE_DIR: ""
artifacts:
- path: render_pipeline_cpp.tar.xz
-
matrix:
only:
- image: Visual Studio 2017 Preview
environment:
BUILD_TOOLSET_VERSION: 141
CMAKE_GENERATOR: Visual Studio 15 2017 Win64