forked from guillaumeblanc/ozz-animation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
387 lines (363 loc) · 10.1 KB
/
.travis.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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
language: cpp
dist: xenial
jobs:
include:
# Emscripten cross compiling
#- os: linux
# compiler: gcc
# env:
# - env_build_emscripten=1
# mac os
# Default mac os clang build
- os: osx
osx_image: xcode10
compiler: clang
- os: osx
compiler: clang
- os: osx
compiler: clang
env:
- env_cmake_configuration=Release
# Xcode mac os clang build
- os: osx
compiler: clang
env :
- env_cmake_generator=Xcode
- os: osx
compiler: clang
env :
- env_cmake_generator=Xcode
- env_cmake_configuration=Release
# Linux ARM
- os: linux
compiler: clang
env:
- env_build_fbx=0
- env_cmake_configuration=Debug
arch:
- arm64
- os: linux
compiler: clang
env:
- env_build_fbx=0
- env_cmake_configuration=Release
arch:
- arm64
# Linux
# Default linux clang debug
- os: linux
compiler: clang
env:
- env_cmake_configuration=Debug
# Default linux release clang
- os: linux
compiler: clang
env:
- env_cmake_configuration=Release
# Specific configurations
- os: linux
compiler: clang
env:
- env_build_fbx=0
- os: linux
compiler: clang
env:
- env_build_gltf=0
- os: linux
compiler: clang
env:
- env_build_howtos=0
- os: linux
compiler: clang
env:
- env_build_samples=0
- os: linux
compiler: clang
env:
- env_build_tools=0
- os: linux
compiler: clang
env:
- env_build_postfix=0
- os: linux
compiler: clang
env:
- env_build_simd_ref=1
- os: linux
compiler: clang
env:
- env_build_tests=0
- os: linux
compiler: clang
env:
- env_build_fbx=0
- env_build_gltf=0
- env_build_samples=0
- os: linux
compiler: clang
env:
- env_build_fbx=0
- env_build_gltf=0
- env_build_tests=0
- os: linux
compiler: clang
env:
- env_build_data=0
- env_build_fbx=0
- env_build_gltf=0
- env_build_samples=0
- env_build_tests=0
- os: linux
compiler: clang
env:
- env_build_data=0
- os: linux
compiler: clang
env:
- env_src_root="../test/sub/"
# Default linux gcc debug
- os: linux
compiler: gcc
env:
- env_cmake_configuration=Debug
# Default linux gcc release
- os: linux
compiler: gcc
env:
- env_cmake_configuration=Release
# Newer gcc
- os: linux
compiler: gcc-4.9
env:
- env_cmake_cxx_compiler=g++-4.9
- env_cmake_c_compiler=gcc-4.9
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
- os: linux
compiler: gcc-5
env:
- env_cmake_cxx_compiler=g++-5
- env_cmake_c_compiler=gcc-5
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- os: linux
compiler: gcc-6
env:
- env_cmake_cxx_compiler=g++-6
- env_cmake_c_compiler=gcc-6
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- os: linux
compiler: gcc-7
env:
- env_cmake_cxx_compiler=g++-7
- env_cmake_c_compiler=gcc-7
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- os: linux
compiler: gcc-8
env:
- env_cmake_cxx_compiler=g++-8
- env_cmake_c_compiler=gcc-8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
# Newer clang
- os: linux
compiler: clang-3.9
env:
- env_cmake_cxx_compiler=clang++-3.9
- env_cmake_c_compiler=clang-3.9
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-3.9
packages:
- clang-3.9
- os: linux
compiler: clang-4.0
env:
- env_cmake_cxx_compiler=clang++-4.0
- env_cmake_c_compiler=clang-4.0
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-4.0
packages:
- clang-4.0
- os: linux
compiler: clang-5.0
env:
- env_cmake_cxx_compiler=clang++-5.0
- env_cmake_c_compiler=clang-5.0
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
- os: linux
compiler: clang-6.0
env:
- env_cmake_cxx_compiler=clang++-6.0
- env_cmake_c_compiler=clang-6.0
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-6.0
packages:
- clang-6.0
- os: linux
compiler: clang-7
env:
- env_cmake_cxx_compiler=clang++-7
- env_cmake_c_compiler=clang-7
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-7
packages:
- clang-7
- os: linux
compiler: clang-8
env:
- env_cmake_cxx_compiler=clang++-8
- env_cmake_c_compiler=clang-8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-8
packages:
- clang-8
# older fbx sdk
- os: linux
compiler: gcc
env:
- fbx_download=http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_linux.tar.gz
- os: osx
compiler: clang
env:
- fbx_download=http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_clang_mac.pkg.tgz
before_install:
- echo before_install----------------------------------------------------------
install:
- echo install-----------------------------------------------------------------
# Download and install mesa dev
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev;
fi
# Download and install fbx sdk
# "|| true" because 2019 sdk would return code 130 when reading the readme
# chmod because fbx2019 will install with 700
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
if [ -z "$fbx_download" ]; then
FBX_DOWNLOAD=${fbx_download:-"http://www.autodesk.com/content/dam/autodesk/www/adn/fbx/20192/fbx20192_fbxsdk_linux.tar.gz"};
else
FBX_DOWNLOAD="$fbx_download";
fi;
mkdir fbx;
cd fbx;
sudo wget $FBX_DOWNLOAD -O fbx.tar.gz;
sudo tar -xf "fbx.tar.gz";
(yes yes | sudo ./*_fbxsdk_linux /usr/local) || true;
sudo chmod -R 755 /usr/local/lib;
sudo chmod -R 755 /usr/local/include;
cd ..;
fi
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then
if [ -z "$fbx_download" ]; then
FBX_DOWNLOAD=${fbx_download:-"http://www.autodesk.com/content/dam/autodesk/www/adn/fbx/20192/fbx20192_fbxsdk_clang_mac.pkg.tgz"};
else
FBX_DOWNLOAD="$fbx_download";
fi;
mkdir fbx;
cd fbx;
sudo wget $FBX_DOWNLOAD -O fbx.tgz;
sudo tar -xf "fbx.tgz";
sudo installer -pkg *_fbxsdk_clang_macos.pkg -target /;
cd ..;
fi
# Download and install emscripten sdk
- if [[ $env_build_emscripten ]]; then
sudo apt-get install software-properties-common -y;
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y;
sudo apt-get update;
sudo apt-get install --only-upgrade cmake -y;
git clone https://github.com/juj/emsdk.git;
cd emsdk;
sudo ./emsdk update-tags;
sudo ./emsdk install sdk-nightly-latest-64bit;
sudo ./emsdk activate --embedded sdk-nightly-latest-64bit;
source ./emsdk_env.sh;
cd ..;
fi
before_script:
- echo before_script-----------------------------------------------------------
# Setup default environment variables
- if [[ -z $env_src_root ]]; then export env_src_root=".."; fi
- if [[ -z $env_build_fbx ]]; then export env_build_fbx=1; fi
- if [[ -z $env_build_gltf ]]; then export env_build_gltf=1; fi
- if [[ -z $env_build_data ]]; then export env_build_data=1; fi
- if [[ -z $env_build_howtos ]]; then export env_build_howtos=1; fi
- if [[ -z $env_build_tools ]]; then export env_build_tools=1; fi
- if [[ -z $env_build_postfix ]]; then export env_build_postfix=1; fi
- if [[ -z $env_build_samples ]]; then export env_build_samples=1; fi
- if [[ -z $env_build_simd_ref ]]; then export env_build_simd_ref=0; fi
- if [[ -z $env_build_tests ]]; then export env_build_tests=1; fi
- if [[ -z $env_cmake_configuration ]]; then export env_cmake_configuration=Debug; fi
- if [[ -z $env_cmake_cxx_compiler ]]; then export env_cmake_cxx_compiler=$CXX; fi
- if [[ -z $env_cmake_c_compiler ]]; then export env_cmake_c_compiler=$CC; fi
- if [[ -z $env_cmake_generator ]]; then export env_cmake_generator="Unix Makefiles"; fi
- if [[ $env_cmake_generator == "Unix Makefiles" ]]; then export env_cmake_generator_specific="-j2"; fi
- if [[ $env_cmake_generator == "Unix Makefiles" ]]; then export env_ctest_generator_specific="-j16"; fi
- if [[ $EMSCRIPTEN ]]; then env_cmake_toolchain="-DCMAKE_TOOLCHAIN_FILE=$EMSCRIPTEN/cmake/Modules/Platform/Emscripten.cmake"; fi
# Display cmake version
- cmake --version
script:
- echo script------------------------------------------------------------------
# Configure build
- mkdir build
- cd build
- echo $env_cmake_toolchain
- cmake -G "$env_cmake_generator" $env_cmake_toolchain -DCMAKE_CXX_COMPILER=$env_cmake_cxx_compiler -DCMAKE_C_COMPILER=$env_cmake_c_compiler -DCMAKE_BUILD_TYPE=$env_cmake_configuration -Dozz_build_fbx=$env_build_fbx -Dozz_build_data=$env_build_data -Dozz_build_howtos=$env_build_howtos -Dozz_build_samples=$env_build_samples -Dozz_build_postfix=$env_build_postfix -Dozz_build_tools=$env_build_tools -Dozz_build_simd_ref=$env_build_simd_ref -Dozz_build_tests=$env_build_tests $env_src_root
# Build
- cmake --build ./ --config $env_cmake_configuration --use-stderr -- $env_cmake_generator_specific
# Test
- ctest --build-config $env_cmake_configuration --output-on-failure -- $env_ctest_generator_specific
after_success:
- echo after_success-----------------------------------------------------------
after_failure:
- echo after_failure-----------------------------------------------------------
before_deploy:
#- echo before_deploy-----------------------------------------------------------
deploy:
#- echo deploy------------------------------------------------------------------
after_deploy:
#- echo after_deploy------------------------------------------------------------
after_script:
#- echo after_script------------------------------------------------------------