forked from xamarin/Urho3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
570 lines (548 loc) · 29.7 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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
#
# Copyright (c) 2008-2017 the Urho3D project.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
---
language: cpp
compiler: gcc
cache:
ccache: true
directories:
- $HOME/cmake-3.8.2-Linux-x86_64/bin
- $HOME/cmake-3.8.2-Linux-x86_64/share
dist: trusty
sudo: false
addons: {apt: {packages: &default_packages [doxygen, graphviz]}}
env:
global:
- secure: SLJCjkjDsTMbCIV9Wecz5JATnhk0fuzlnLMeZdvvFDv+8NL8cXyutkU0VfyRSLf3HSD1Js79a6fRMROyVGWj/w/BRrjqGnZzsB6+ZeJNnadiVIF5Gh+w90We5ccvSp2G4DyYgwkNnkKlJK7zNEWGu/K+bHL1EOCA+EIVrFMyA44=
- secure: ecj/PwpbHkH9AYFsc2TMeRuNm5E3xMM8A0x4AcGhzpwDuZWdFx3R1T4G9u45Z5aUyTJWGqOeX1JPaEVVFZuYnNBKRy0kmiUrM9EE0j7WsT57K48tP1ysn2ynyvHgbYkKOfYR0t8XAMWTBbulT9DVVk3DS69//2WgiXGDVUEJTyI=
- numjobs=4
- USE_CCACHE=1
- CCACHE_SLOPPINESS=pch_defines,time_macros
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=100M
- URHO3D_DEPLOYMENT_TARGET=generic
stage: build
before_script:
- rake ci_timer
# Upgrade CMake using tarball from its vendor and cache the installation
- if [[ ! -f $HOME/cmake-3.8.2-Linux-x86_64/bin/cmake ]]; then wget --no-check-certificate https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz -O $HOME/cmake.tar.gz && tar xf $HOME/cmake.tar.gz -C $HOME && rm $HOME/cmake.tar.gz; fi
- export PATH=$HOME/cmake-3.8.2-Linux-x86_64/bin:$PATH
# Rely on git directly to detect the commit message and the release tag instead of using the corresponding Travis's environment variable because we may be querying for different commit SHA
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then export COMMIT_MESSAGE=$(git log --format=%B -n 1 $TRAVIS_COMMIT); fi
- export TAG=$(git describe --exact-match $TRAVIS_COMMIT 2>/dev/null); if [[ $TAG =~ [[:digit:]]+\.[[:digit:]]+ ]]; then export RELEASE_TAG=$TAG; fi
# Travis-CI has a special case handling for release tag where it checks out directly from the tag branch instead of the default 'master' branch
- if [[ $RELEASE_TAG ]] || ([[ "$TRAVIS_BRANCH" == "master" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]); then if [[ ${TRAVIS_JOB_NUMBER##*.} == 1 ]]; then export SITE_UPDATE=1; fi; if [[ "$CC" == "gcc" ]] && ([[ $RELEASE_TAG ]] || echo $COMMIT_MESSAGE |grep -cq '\[ci package\]'); then export PACKAGE_UPLOAD=1; fi; fi
- if [[ $LINUX ]]; then
if [[ "$URHO3D_64BIT" == "0" ]]; then
export CMAKE_PREFIX_PATH=/usr/lib/i386-linux-gnu;
elif [[ ! $PACKAGE_UPLOAD ]]; then
export DISPLAY=:99.0; bash -e /etc/init.d/xvfb start;
fi;
elif [[ $WIN32 ]]; then
if [[ "$URHO3D_64BIT" == "0" ]]; then export ARCH=i686; else export ARCH=x86_64; fi;
export MINGW_PREFIX=/usr/bin/${ARCH}-w64-mingw32 DIRECTX_LIB_SEARCH_PATHS=/usr/${ARCH}-w64-mingw32/lib;
fi
- if [[ $URHO3D_BINDINGS ]]; then git clone --depth 1 https://github.com/urho3d/fastcomp-clang.git && export LLVM_CLANG_ROOT=$(pwd)/fastcomp-clang; fi
# For some reason clang compiler toolchain installation in Ubuntu does not have symlink in the ccache symlinks directory, so workaround it
- if [[ "$CC" == "clang" ]]; then ln -s $(which ccache) $HOME/clang && ln -s $(which ccache) $HOME/clang++ && export PATH=$HOME:$PATH; fi
- rake ci_setup_cache
script: rake ci && if [[ $SITE_UPDATE ]]; then rake ci_site_update; fi && if [[ $PACKAGE_UPLOAD ]]; then rake ci_package_upload && if [[ $LINUX ]] && [[ ! "$URHO3D_64BIT" == "0" ]]; then rake ci_package_upload URHO3D_USE_LIB64_RPM=1; fi; fi && rake ci_timer
after_script:
- rake ci_teardown_cache
- if [[ ${TRAVIS_JOB_NUMBER##*.} == 1 ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then rake ci_create_mirrors; fi
notifications: {email: {on_success: never, on_failure: change}}
# Below are our custom data to preset build stages for other documents in this YAML stream, we do this because YAML anchor cannot be referenced across document boundary
data:
stages:
base: &base
addons:
before_script:
after_script:
housekeep:
<<: *base
cache:
env:
before_script: export TAG=$(git describe --exact-match $TRAVIS_COMMIT~ 2>/dev/null); if [[ $TAG =~ [[:digit:]]+\.[[:digit:]]+ ]]; then export RELEASE_TAG=$TAG; fi
script: rake ci_delete_mirror
matrix:
fast_finish: true
exclude:
- compiler: gcc
include:
- &Linux-64bit
addons: {apt: {packages: &linux_packages [*default_packages, libpulse-dev, rpm]}}
env: LINUX=1 URHO3D_LIB_TYPE=STATIC URHO3D_UPDATE_SOURCE_TREE=1 SF_DEFAULT=linux:Linux-64bit-STATIC.tar.gz
- <<: *Linux-64bit
env: LINUX=1 URHO3D_LIB_TYPE=SHARED
- &Linux-64bit-clang
compiler: clang
addons: &pulseaudio {apt: {packages: libpulse-dev}}
env: LINUX=1 URHO3D_LIB_TYPE=STATIC
- <<: *Linux-64bit-clang
env: LINUX=1 URHO3D_LIB_TYPE=SHARED
- &Linux-32bit
addons: {apt: {packages: [*linux_packages, g++-multilib, "libxrandr-dev:i386", "libglapi-mesa:i386", "libgl1-mesa-glx:i386", "libgl1-mesa-dev:i386", "libxext-dev:i386", "libxrender-dev:i386", lib32readline6-dev]}}
env: LINUX=1 URHO3D_LIB_TYPE=STATIC URHO3D_64BIT=0
- &Linux-32bit-shared
<<: *Linux-32bit
env: LINUX=1 URHO3D_LIB_TYPE=SHARED URHO3D_64BIT=0
- <<: *Linux-32bit
compiler: clang
- <<: *Linux-32bit-shared
compiler: clang
- &MinGW-64bit
compiler: mingw-w64-x86_64
addons: {apt: {packages: [*default_packages, gcc-mingw-w64-x86-64, g++-mingw-w64-x86-64, binutils-mingw-w64-x86-64]}}
env: WIN32=1 URHO3D_LIB_TYPE=STATIC
- <<: *MinGW-64bit
env: WIN32=1 URHO3D_LIB_TYPE=SHARED
- <<: *MinGW-64bit
env: WIN32=1 URHO3D_LIB_TYPE=STATIC URHO3D_OPENGL=0
- <<: *MinGW-64bit
env: WIN32=1 URHO3D_LIB_TYPE=SHARED URHO3D_OPENGL=0
- &MinGW-32bit
compiler: mingw-w64-i686
addons: {apt: {packages: [*default_packages, gcc-mingw-w64-i686, g++-mingw-w64-i686, binutils-mingw-w64-i686]}}
env: WIN32=1 URHO3D_LIB_TYPE=STATIC URHO3D_64BIT=0
- <<: *MinGW-32bit
env: WIN32=1 URHO3D_LIB_TYPE=SHARED URHO3D_64BIT=0
- <<: *MinGW-32bit
env: WIN32=1 URHO3D_LIB_TYPE=STATIC URHO3D_64BIT=0 URHO3D_OPENGL=0
- <<: *MinGW-32bit
env: WIN32=1 URHO3D_LIB_TYPE=SHARED URHO3D_64BIT=0 URHO3D_OPENGL=0
- &debug-build-stage
stage: debug build
addons: *pulseaudio
env: LINUX=1 URHO3D_LIB_TYPE=STATIC CMAKE_BUILD_TYPE=Debug
script: rake ci && rake ci_timer
- <<: *debug-build-stage
env: LINUX=1 URHO3D_LIB_TYPE=SHARED CMAKE_BUILD_TYPE=Debug
- &debug-build-stage-clang
<<: *debug-build-stage
compiler: clang
- <<: *debug-build-stage-clang
env: LINUX=1 URHO3D_LIB_TYPE=SHARED CMAKE_BUILD_TYPE=Debug
# TODO - if/when Travis-CI later supports conditional build stages then move the 'scan' and 'annotate' stages here
- stage: lint (to be implemented)
<<: *base
script: true # Using clang-tidy or something like that or using CMake/clang-tidy integration (see <LANG>_CLANG_TIDY CMake property)
---
branch: {name: MinGW-CI, active: yes, appveyor: yes}
version: '{build}'
platform:
- x86
- x64
clone_depth: 50
cache:
# AppVeyor seems to restore caches based on the job ordering alone, it does not use the env-vars as the key like Travis
# Therefore, we are forced to list out all the cache items for our master CI and MinGW CI builds here
# Build
# mingw-Build
# Cache the MinGW compiler toolchains so that our CI builds do not chalk up their download stats
- C:\tools\mingw32
- C:\tools\mingw64
environment:
GIT_NAME:
secure: JatNbOZZZKMvMHL8sRq9XpHgESzJ13eh9NHbMK99rX8=
GIT_EMAIL:
secure: 7EAYZJ5nFqEhMKcPmUvnqPp81XAoJEILzDJJ2qZXrKA=
GH_TOKEN:
secure: xx7og+aLQbdBSsdVo79OTGtdfqedOpYpIJjduNlzjFSXsTkD8NX8fEPq0XE1KT5n
SF_KEY:
secure: 6Vuo+sNP2YT/iI4ilNDdyJbKpu1AYxSpkdwjJxeZ3BVXM0XQQnG7VS/6IspV9kgWXmYpeVnUTqpoxAg7GDf3MTN9SeXgwHuSsblIAHDaOJk=
SF_API:
secure: gEDrho4yNr5++SbgkWsxQiFA62GJfTLrZU9Dzjz9HCUcS7XwjTGg3XsFm84w6B1s
# Using neither-in-nor-out-of-source (Urho3D-legacy) build tree when on AppVeyor; using out-of-source (and in-the-source) build tree when on Travis-CI for test coverage
build_tree: mingw-Build
config: Release
# We cannot afford to have a large matrix on AppVeyor at the moment
URHO3D_D3D11: 1
MINGW: 1
# MinGW-w64 on Windows is NOT multilib capable but we are installing the ones that support C++14 standard
x86_64-posix-seh: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/6.3.0/threads-posix/seh/x86_64-6.3.0-release-posix-seh-rt_v5-rev1.7z
i686-posix-dwarf: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/6.3.0/threads-posix/dwarf/i686-6.3.0-release-posix-dwarf-rt_v5-rev1.7z
matrix:
- URHO3D_LIB_TYPE: STATIC
- URHO3D_LIB_TYPE: SHARED
before_build:
- rake ci_timer
- set "APPVEYOR_REPO_COMMIT=%APPVEYOR_REPO_COMMIT%~"
- ps: $env:COMMIT_MESSAGE = $(git log --format=%B -n 1 $env:APPVEYOR_REPO_COMMIT);
if ($env:APPVEYOR_REPO_TAG -eq "true") { $env:RELEASE_TAG = $env:APPVEYOR_REPO_TAG_NAME };
if ($env:RELEASE_TAG -or ($env:APPVEYOR_REPO_BRANCH -notmatch "[^-]+-[^-]+-CI" -and (select-string '\[ci package\]' -inputobject $env:COMMIT_MESSAGE)))
{
$env:PACKAGE_UPLOAD = "1";
do { "Installing doxygen and graphviz..."; choco install doxygen.portable graphviz.portable >$null } until ($?);
}
else
{
$env:URHO3D_TOOLS = "0";
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-desktop.ps1'))
}
- if "%PLATFORM%" == "x64" (set "URHO3D_64BIT=1" && set "MINGW_URL=%x86_64-posix-seh%" && set "ARCH=64") else (set "MINGW_URL=%i686-posix-dwarf%" && set "ARCH=32")
- if not exist "C:\tools\mingw%ARCH%" curl -fsSL -o "mingw.7z" -O "%MINGW_URL%" && 7z x -y -o"C:\tools" "mingw.7z" >nul && echo "Installed MinGW compiler toolchain to C:\tools"
- set "PATH=C:\tools\mingw%ARCH%\bin;%PATH%"
# rake ci_setup_cache
build_script:
- rake ci && if "%PACKAGE_UPLOAD%" == "1" (rake ci_package_upload && move %build_tree%\*.zip . && rd /S /Q %build_tree%\_CPack_Packages)
- rake ci_timer
after_build:
# rake ci_teardown_cache
- if "%PLATFORM%:%URHO3D_LIB_TYPE%" == "x64:SHARED" rake ci_delete_mirror
test: off
artifacts:
- path: .\*.zip
deploy: off
---
branch: {name: Coverity-Scan, active: no}
language: cpp
compiler: gcc
cache:
ccache: true
directories:
- $HOME/cmake-3.8.2-Linux-x86_64/bin
- $HOME/cmake-3.8.2-Linux-x86_64/share
dist: trusty
sudo: false
addons:
apt:
packages: libpulse-dev
coverity_scan:
project:
name: urho3d/Urho3D
description: Urho3D is a free lightweight, cross-platform 2D and 3D game engine implemented in C++ and released under the MIT license. Greatly inspired by OGRE and Horde3D.
notification_email: [email protected]
build_command_prepend: rake cmake URHO3D_LUAJIT=1 URHO3D_LUAJIT_AMALG=1 URHO3D_SAMPLES=1 URHO3D_TOOLS=1 URHO3D_EXTRAS=1 URHO3D_DATABASE_SQLITE=1 URHO3D_LIB_TYPE=SHARED
build_command: rake make numjobs=4
branch_pattern: .*Coverity-Scan$
env:
global:
- secure: SLJCjkjDsTMbCIV9Wecz5JATnhk0fuzlnLMeZdvvFDv+8NL8cXyutkU0VfyRSLf3HSD1Js79a6fRMROyVGWj/w/BRrjqGnZzsB6+ZeJNnadiVIF5Gh+w90We5ccvSp2G4DyYgwkNnkKlJK7zNEWGu/K+bHL1EOCA+EIVrFMyA44=
- secure: itgWNvH4Zj0hQpkUctVxMwJwVX3hIluVuvUbzO2XG7dxQaMMfcLGwVKgq8X1HOf4dJCUv5WL0jcSMWXbdc8tvqQJwBb5R2Z2JJYpTTAgtmLy7TNn6zgetZtGrYEJuTlxSItbS/NF4iPDO25ih7j5Ma0ffXRpBnlURQaytfYfFaQ=
- LINUX=1
- USE_CCACHE=1
- CCACHE_SLOPPINESS=pch_defines,time_macros
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=100M
stage: scan
before_script:
- if [[ ! -f $HOME/cmake-3.8.2-Linux-x86_64/bin/cmake ]]; then wget --no-check-certificate https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz -O $HOME/cmake.tar.gz && tar xf $HOME/cmake.tar.gz -C $HOME && rm $HOME/cmake.tar.gz; fi
- export PATH=$HOME/cmake-3.8.2-Linux-x86_64/bin:$PATH
- export TRAVIS_COMMIT=$TRAVIS_COMMIT~
- export COMMIT_MESSAGE=$(git log --format=%B -n 1 $TRAVIS_COMMIT)
- rake ci_setup_cache
script: true
after_script:
- rake ci_teardown_cache
- rake ci_delete_mirror
---
branch: {name: Annotate, active: no}
language: cpp
compiler: gcc
cache:
ccache: true
directories:
- $HOME/cmake-3.8.2-Linux-x86_64/bin
- $HOME/cmake-3.8.2-Linux-x86_64/share
addons: {apt: {packages: libpulse-dev}}
env:
global:
- secure: SLJCjkjDsTMbCIV9Wecz5JATnhk0fuzlnLMeZdvvFDv+8NL8cXyutkU0VfyRSLf3HSD1Js79a6fRMROyVGWj/w/BRrjqGnZzsB6+ZeJNnadiVIF5Gh+w90We5ccvSp2G4DyYgwkNnkKlJK7zNEWGu/K+bHL1EOCA+EIVrFMyA44=
- numjobs=4
- USE_CCACHE=1
- CCACHE_SLOPPINESS=pch_defines,time_macros
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=100M
stage: annotate
before_script:
- if [[ ! -f $HOME/cmake-3.8.2-Linux-x86_64/bin/cmake ]]; then wget --no-check-certificate https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz -O $HOME/cmake.tar.gz && tar xf $HOME/cmake.tar.gz -C $HOME && rm $HOME/cmake.tar.gz; fi
- export PATH=$HOME/cmake-3.8.2-Linux-x86_64/bin:$PATH
- export TRAVIS_COMMIT=$TRAVIS_COMMIT~
- export COMMIT_MESSAGE=$(git log --format=%B -n 1 $TRAVIS_COMMIT)
- git clone --depth 1 https://github.com/urho3d/fastcomp-clang.git && export LLVM_CLANG_ROOT=$(pwd)/fastcomp-clang
- rake ci_setup_cache
script: rake ci_annotate
after_script:
- rake ci_teardown_cache
- rake ci_delete_mirror
---
branch: {name: Android-CI, active: yes}
language: android
cache:
directories:
- $HOME/.ccache
- $HOME/cmake-3.8.2-Linux-x86_64/bin
- $HOME/cmake-3.8.2-Linux-x86_64/share
dist: trusty
sudo: false
addons: {apt: {packages: &default_packages [doxygen, graphviz, g++-multilib]}}
env:
global:
- secure: SLJCjkjDsTMbCIV9Wecz5JATnhk0fuzlnLMeZdvvFDv+8NL8cXyutkU0VfyRSLf3HSD1Js79a6fRMROyVGWj/w/BRrjqGnZzsB6+ZeJNnadiVIF5Gh+w90We5ccvSp2G4DyYgwkNnkKlJK7zNEWGu/K+bHL1EOCA+EIVrFMyA44=
- secure: ecj/PwpbHkH9AYFsc2TMeRuNm5E3xMM8A0x4AcGhzpwDuZWdFx3R1T4G9u45Z5aUyTJWGqOeX1JPaEVVFZuYnNBKRy0kmiUrM9EE0j7WsT57K48tP1ysn2ynyvHgbYkKOfYR0t8XAMWTBbulT9DVVk3DS69//2WgiXGDVUEJTyI=
- numjobs=4
- ANDROID=1
- ANDROID_TMP=~/tmp
- USE_CCACHE=1
- CCACHE_SLOPPINESS=pch_defines,time_macros
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=100M
matrix:
- ANDROID_ABI=armeabi-v7a ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang URHO3D_LIB_TYPE=STATIC # Using default native API Level android-9
- ANDROID_ABI=armeabi-v7a ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang URHO3D_LIB_TYPE=SHARED AVD=21
# x86 and x86_64 emulation currently requires hardware acceleration which Travis-CI cannot provide, so skip testing using AVD for now
- ANDROID_ABI=x86_64 ANDROID_TOOLCHAIN_NAME=x86_64-clang URHO3D_LIB_TYPE=STATIC INSTALL=sys-img-x86_64-android-21 # Using default native API level android-21
- ANDROID_ABI=x86_64 ANDROID_TOOLCHAIN_NAME=x86_64-clang URHO3D_LIB_TYPE=SHARED INSTALL=sys-img-x86_64-android-21
- ANDROID_ABI=x86 ANDROID_TOOLCHAIN_NAME=x86-clang URHO3D_LIB_TYPE=STATIC INSTALL=sys-img-x86-android-21 ANDROID_NATIVE_API_LEVEL=android-21 # At least android-12 is needed when LuaJIT is enabled
- ANDROID_ABI=x86 ANDROID_TOOLCHAIN_NAME=x86-clang URHO3D_LIB_TYPE=SHARED INSTALL=sys-img-x86-android-21 ANDROID_NATIVE_API_LEVEL=android-21
# ANDROID_ANDROID_ABI=arm64-v8a uses NEON by default, so the following two CI jobs also test NEON code path in the build
- ANDROID_ABI=arm64-v8a ANDROID_TOOLCHAIN_NAME=aarch64-linux-android-clang URHO3D_LIB_TYPE=STATIC NO_SDK_SYSIMG=1 # Using default native API level android-21
- ANDROID_ABI=arm64-v8a ANDROID_TOOLCHAIN_NAME=aarch64-linux-android-clang URHO3D_LIB_TYPE=SHARED NO_SDK_SYSIMG=1
stage: build
before_script:
# Temporarily disable the test to build the APK as Travis-CI Trusty beta VM has not yet setup the environment for Android properly
- export NO_SDK_SYSIMG=1; unset AVD INSTALL
- rake ci_timer
- if [[ ! -f $HOME/cmake-3.8.2-Linux-x86_64/bin/cmake ]]; then wget --no-check-certificate https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz -O $HOME/cmake.tar.gz && tar xf $HOME/cmake.tar.gz -C $HOME && rm $HOME/cmake.tar.gz; fi
- export PATH=$HOME/cmake-3.8.2-Linux-x86_64/bin:$PATH
- export TRAVIS_COMMIT=$TRAVIS_COMMIT~
- export COMMIT_MESSAGE=$(git log --format=%B -n1 $TRAVIS_COMMIT)
- export TAG=$(git describe --exact-match $TRAVIS_COMMIT 2>/dev/null); if [[ $TAG =~ [[:digit:]]+\.[[:digit:]]+ ]]; then export RELEASE_TAG=$TAG; fi
- if [[ $RELEASE_TAG ]] || (! [[ $TRAVIS_BRANCH =~ [^-]+-[^-]+-CI ]] && echo $COMMIT_MESSAGE |grep -cq '\[ci package\]'); then export PACKAGE_UPLOAD=1; fi
- git clone --depth 1 --branch strip https://github.com/urho3d/android-ndk.git && export ANDROID_NDK=$(pwd)/android-ndk && if ([[ $AVD ]] || [[ $PACKAGE_UPLOAD ]]) && [[ $INSTALL ]]; then (while :; do echo 'y'; sleep 1; done) |android update sdk --no-ui --all --filter $INSTALL; fi
- export C_PATH=$(pwd)/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin
- export PATH=$(whereis -b ccache |grep -o '\S*lib\S*'):$C_PATH:$PATH
- for compiler in $C_PATH/{clang,clang++}; do touch -d "2017-01-01 00:00:00 +0800" $compiler; done
- rake ci_setup_cache
script: rake ci && if [[ $PACKAGE_UPLOAD ]]; then rake ci_package_upload; fi && rake ci_timer
after_script: rake ci_teardown_cache
matrix:
fast_finish: true
include: [stage: housekeep]
---
branch: {name: RPI-CI, active: yes}
language: cpp
compiler: gcc
cache:
ccache: true
directories:
- $HOME/cmake-3.8.2-Linux-x86_64/bin
- $HOME/cmake-3.8.2-Linux-x86_64/share
dist: trusty
sudo: false
addons: {apt: {packages: [doxygen, graphviz, g++-multilib, rpm]}}
env:
global:
- secure: SLJCjkjDsTMbCIV9Wecz5JATnhk0fuzlnLMeZdvvFDv+8NL8cXyutkU0VfyRSLf3HSD1Js79a6fRMROyVGWj/w/BRrjqGnZzsB6+ZeJNnadiVIF5Gh+w90We5ccvSp2G4DyYgwkNnkKlJK7zNEWGu/K+bHL1EOCA+EIVrFMyA44=
- secure: ecj/PwpbHkH9AYFsc2TMeRuNm5E3xMM8A0x4AcGhzpwDuZWdFx3R1T4G9u45Z5aUyTJWGqOeX1JPaEVVFZuYnNBKRy0kmiUrM9EE0j7WsT57K48tP1ysn2ynyvHgbYkKOfYR0t8XAMWTBbulT9DVVk3DS69//2WgiXGDVUEJTyI=
- numjobs=4
- RPI=1
- USE_CCACHE=1
- CCACHE_SLOPPINESS=pch_defines,time_macros
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=100M
matrix:
# RPI 1
- URHO3D_LIB_TYPE=STATIC
- URHO3D_LIB_TYPE=SHARED
# RPI 2/3
- URHO3D_LIB_TYPE=STATIC RPI_ABI='armeabi-v7a with NEON'
- URHO3D_LIB_TYPE=SHARED RPI_ABI='armeabi-v7a with NEON'
stage: build
before_script:
- rake ci_timer
- if [[ ! -f $HOME/cmake-3.8.2-Linux-x86_64/bin/cmake ]]; then wget --no-check-certificate https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz -O $HOME/cmake.tar.gz && tar xf $HOME/cmake.tar.gz -C $HOME && rm $HOME/cmake.tar.gz; fi
- export PATH=$HOME/cmake-3.8.2-Linux-x86_64/bin:$PATH
- git clone --depth 1 https://github.com/raspberrypi/tools.git rpi-tools && export RPI_PREFIX=$(pwd)/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf && git clone --depth 1 https://github.com/urho3d/rpi-sysroot.git && export RPI_SYSROOT=$(pwd)/rpi-sysroot && for compiler in $RPI_PREFIX-{gcc,g++}; do touch -d "2017-01-01 00:00:00 +0800" $compiler; done
- export TRAVIS_COMMIT=$TRAVIS_COMMIT~
- export COMMIT_MESSAGE=$(git log --format=%B -n 1 $TRAVIS_COMMIT)
- export TAG=$(git describe --exact-match $TRAVIS_COMMIT 2>/dev/null); if [[ $TAG =~ [[:digit:]]+\.[[:digit:]]+ ]]; then export RELEASE_TAG=$TAG; fi
- if [[ $RELEASE_TAG ]] || (! [[ $TRAVIS_BRANCH =~ [^-]+-[^-]+-CI ]] && echo $COMMIT_MESSAGE |grep -cq '\[ci package\]'); then export PACKAGE_UPLOAD=1; fi
- export PATH=${RPI_PREFIX%/*}:$PATH
- rake ci_setup_cache
script: rake ci && if [[ $PACKAGE_UPLOAD ]]; then rake ci_package_upload; fi && rake ci_timer
after_script: rake ci_teardown_cache
matrix:
fast_finish: true
include: [stage: housekeep]
---
branch: {name: ARM-CI, active: yes}
language: cpp
compiler: gcc
cache:
ccache: true
directories:
- $HOME/cmake-3.8.2-Linux-x86_64/bin
- $HOME/cmake-3.8.2-Linux-x86_64/share
dist: trusty
sudo: false
addons: {apt: {packages: [doxygen, graphviz, g++-multilib, rpm]}}
env:
global:
- secure: SLJCjkjDsTMbCIV9Wecz5JATnhk0fuzlnLMeZdvvFDv+8NL8cXyutkU0VfyRSLf3HSD1Js79a6fRMROyVGWj/w/BRrjqGnZzsB6+ZeJNnadiVIF5Gh+w90We5ccvSp2G4DyYgwkNnkKlJK7zNEWGu/K+bHL1EOCA+EIVrFMyA44=
- secure: ecj/PwpbHkH9AYFsc2TMeRuNm5E3xMM8A0x4AcGhzpwDuZWdFx3R1T4G9u45Z5aUyTJWGqOeX1JPaEVVFZuYnNBKRy0kmiUrM9EE0j7WsT57K48tP1ysn2ynyvHgbYkKOfYR0t8XAMWTBbulT9DVVk3DS69//2WgiXGDVUEJTyI=
- numjobs=4
- ARM=1
- USE_CCACHE=1
- CCACHE_SLOPPINESS=pch_defines,time_macros
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=100M
matrix:
# ODROID-X2
- SYSROOT=armhf-sysroot URHO3D_LIB_TYPE=STATIC ARM_ABI_FLAGS='-mcpu=cortex-a9 -mfpu=neon-fp16'
- SYSROOT=armhf-sysroot URHO3D_LIB_TYPE=SHARED ARM_ABI_FLAGS='-mcpu=cortex-a9 -mfpu=neon-fp16'
# ODROID-C2
- SYSROOT=arm64-sysroot URHO3D_LIB_TYPE=STATIC ARM_ABI_FLAGS='-mcpu=cortex-a53'
- SYSROOT=arm64-sysroot URHO3D_LIB_TYPE=SHARED ARM_ABI_FLAGS='-mcpu=cortex-a53'
stage: build
before_script:
- rake ci_timer
- if [[ ! -f $HOME/cmake-3.8.2-Linux-x86_64/bin/cmake ]]; then wget --no-check-certificate https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz -O $HOME/cmake.tar.gz && tar xf $HOME/cmake.tar.gz -C $HOME && rm $HOME/cmake.tar.gz; fi
- export PATH=$HOME/cmake-3.8.2-Linux-x86_64/bin:$PATH
- if [[ $SYSROOT =~ arm64 ]]; then export triplet=aarch64-linux-gnu; else export triplet=arm-linux-gnueabihf; fi
- wget https://releases.linaro.org/components/toolchain/binaries/latest-5/$triplet/gcc-linaro-5.4.1-2017.05-x86_64_$triplet.tar.xz -O arm-tools.tar.xz && tar xf arm-tools.tar.xz && rm arm-tools.tar.xz && mv gcc-linaro* gcc-linaro && export ARM_PREFIX=$(pwd)/gcc-linaro/bin/$triplet
- for compiler in $ARM_PREFIX-{gcc,g++}; do touch -d "2017-01-01 00:00:00 +0800" $compiler; done
- git clone --depth 1 https://github.com/urho3d/$SYSROOT.git && export ARM_SYSROOT=$(pwd)/$SYSROOT
- export TRAVIS_COMMIT=$TRAVIS_COMMIT~
- export COMMIT_MESSAGE=$(git log --format=%B -n 1 $TRAVIS_COMMIT)
- export TAG=$(git describe --exact-match $TRAVIS_COMMIT 2>/dev/null); if [[ $TAG =~ [[:digit:]]+\.[[:digit:]]+ ]]; then export RELEASE_TAG=$TAG; fi
- if [[ $RELEASE_TAG ]] || (! [[ $TRAVIS_BRANCH =~ [^-]+-[^-]+-CI ]] && echo $COMMIT_MESSAGE |grep -cq '\[ci package\]'); then export PACKAGE_UPLOAD=1; fi
- export PATH=${ARM_PREFIX%/*}:$PATH
- rake ci_setup_cache
script: rake ci && if [[ $PACKAGE_UPLOAD ]]; then rake ci_package_upload && if [[ "$SYSROOT" == "arm64-sysroot" ]]; then rake ci_package_upload URHO3D_USE_LIB64_RPM=1; fi; fi && rake ci_timer
after_script: rake ci_teardown_cache
matrix:
fast_finish: true
include: [stage: housekeep]
---
branch: {name: Web-CI, active: yes}
language: cpp
compiler: gcc
cache:
ccache: true
directories:
- $HOME/cmake-3.8.2-Linux-x86_64/bin
- $HOME/cmake-3.8.2-Linux-x86_64/share
dist: trusty
sudo: false
addons: {apt: {packages: [doxygen, graphviz]}}
env:
global:
- secure: SLJCjkjDsTMbCIV9Wecz5JATnhk0fuzlnLMeZdvvFDv+8NL8cXyutkU0VfyRSLf3HSD1Js79a6fRMROyVGWj/w/BRrjqGnZzsB6+ZeJNnadiVIF5Gh+w90We5ccvSp2G4DyYgwkNnkKlJK7zNEWGu/K+bHL1EOCA+EIVrFMyA44=
- secure: ecj/PwpbHkH9AYFsc2TMeRuNm5E3xMM8A0x4AcGhzpwDuZWdFx3R1T4G9u45Z5aUyTJWGqOeX1JPaEVVFZuYnNBKRy0kmiUrM9EE0j7WsT57K48tP1ysn2ynyvHgbYkKOfYR0t8XAMWTBbulT9DVVk3DS69//2WgiXGDVUEJTyI=
- numjobs=2
- WEB=1
- EMSCRIPTEN_SHARE_DATA=1
- USE_CCACHE=1
- CCACHE_SLOPPINESS=pch_defines,time_macros
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=100M
matrix:
- URHO3D_LIB_TYPE=MODULE BRANCH=master numjobs=4
- URHO3D_LIB_TYPE=STATIC BRANCH=master
- URHO3D_LIB_TYPE=SHARED BRANCH=master
# URHO3D_LIB_TYPE=MODULE EMSCRIPTEN_WASM=1 BRANCH=incoming numjobs=4
- URHO3D_LIB_TYPE=STATIC EMSCRIPTEN_WASM=1 BRANCH=incoming
- URHO3D_LIB_TYPE=SHARED EMSCRIPTEN_WASM=1 BRANCH=incoming
stage: build
before_script:
- rake ci_timer
- if [[ ! -f $HOME/cmake-3.8.2-Linux-x86_64/bin/cmake ]]; then wget --no-check-certificate https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz -O $HOME/cmake.tar.gz && tar xf $HOME/cmake.tar.gz -C $HOME && rm $HOME/cmake.tar.gz; fi
- export PATH=$HOME/cmake-3.8.2-Linux-x86_64/bin:$PATH
- export TRAVIS_COMMIT=$TRAVIS_COMMIT~
- export COMMIT_MESSAGE=$(git log --format=%B -n 1 $TRAVIS_COMMIT)
- export TAG=$(git describe --exact-match $TRAVIS_COMMIT 2>/dev/null); if [[ $TAG =~ [[:digit:]]+\.[[:digit:]]+ ]]; then export RELEASE_TAG=$TAG; fi
- if [[ $RELEASE_TAG ]] || (! [[ $TRAVIS_BRANCH =~ [^-]+-[^-]+-CI ]] && echo $COMMIT_MESSAGE |grep -cq '\[ci package\]'); then export PACKAGE_UPLOAD=1; fi
- if [[ $EMSCRIPTEN_WASM ]]; then export BINARYEN=binaryen-master-64bit; fi
- git clone --depth 1 --branch $BRANCH https://github.com/urho3d/emscripten-sdk.git && emscripten-sdk/emsdk activate --build=Release sdk-${BRANCH}-64bit $BINARYEN && source emscripten-sdk/emsdk_env.sh
- for compiler in $EMSCRIPTEN/{emcc,em++}; do touch -d "2017-01-01 00:00:00 +0800" $compiler; done
- rake ci_setup_cache
script: rake ci && if [ $PACKAGE_UPLOAD ]; then rake ci_package_upload; fi && if [[ "$TRAVIS_BRANCH" == "Web-CI" ]] && [[ ! $EMSCRIPTEN_WASM ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$URHO3D_LIB_TYPE" == "SHARED" ]]; then rake ci_emscripten_samples_update; fi && rake ci_timer
after_script: rake ci_teardown_cache
matrix:
fast_finish: true
include: [stage: housekeep]
---
branch: {name: OSX-CI, active: yes}
language: objective-c
cache:
directories:
- $HOME/.ccache
- $TRAVIS_BUILD_DIR/CustomCache
osx_image: xcode8.3
env:
global:
- secure: SLJCjkjDsTMbCIV9Wecz5JATnhk0fuzlnLMeZdvvFDv+8NL8cXyutkU0VfyRSLf3HSD1Js79a6fRMROyVGWj/w/BRrjqGnZzsB6+ZeJNnadiVIF5Gh+w90We5ccvSp2G4DyYgwkNnkKlJK7zNEWGu/K+bHL1EOCA+EIVrFMyA44=
- secure: ecj/PwpbHkH9AYFsc2TMeRuNm5E3xMM8A0x4AcGhzpwDuZWdFx3R1T4G9u45Z5aUyTJWGqOeX1JPaEVVFZuYnNBKRy0kmiUrM9EE0j7WsT57K48tP1ysn2ynyvHgbYkKOfYR0t8XAMWTBbulT9DVVk3DS69//2WgiXGDVUEJTyI=
- numjobs=3
- OSX=1
- USE_CCACHE=1
- CCACHE_SLOPPINESS=pch_defines,time_macros
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=300M
matrix:
- &tvOS XCODE=1 TVOS=1 URHO3D_LIB_TYPE=STATIC APPLETVOS_DEPLOYMENT_TARGET=10.2 sdk=appletvsimulator
- &iOS XCODE=1 IOS=1 URHO3D_LIB_TYPE=STATIC IPHONEOS_DEPLOYMENT_TARGET=10.3 sdk=iphonesimulator
- &macOS-STATIC XCODE=1 URHO3D_LIB_TYPE=STATIC CMAKE_OSX_DEPLOYMENT_TARGET=10.12 SF_DEFAULT=mac:OSX-64bit-STATIC.tar.gz
- &macOS-SHARED XCODE=1 URHO3D_LIB_TYPE=SHARED CMAKE_OSX_DEPLOYMENT_TARGET=10.12
- MAKEFILE=1 URHO3D_LIB_TYPE=STATIC URHO3D_DEPLOYMENT_TARGET=generic
- MAKEFILE=1 URHO3D_LIB_TYPE=SHARED URHO3D_DEPLOYMENT_TARGET=generic
stage: build
before_script: &before_script
- rake ci_timer
- export TRAVIS_COMMIT=$TRAVIS_COMMIT~
- export COMMIT_MESSAGE=$(git log --format=%B -n 1 $TRAVIS_COMMIT)
- export TAG=$(git describe --exact-match $TRAVIS_COMMIT 2>/dev/null); if [[ $TAG =~ [[:digit:]]+\.[[:digit:]]+ ]]; then export RELEASE_TAG=$TAG; fi
- brew update
- which cmake >/dev/null 2>&1 || cmake=cmake
- travis_retry brew install ccache $cmake
- if [[ ! $cmake ]]; then brew outdated cmake || brew upgrade cmake; fi
- export PATH=$(brew info ccache |grep -o '\S*lib\S*'):$PATH
- if [[ $XCODE ]]; then pushd $(dirname $(xcodebuild -find-executable clang)) && sudo cp -p $(which ccache) . && for compiler in clang clang++; do sudo mv $compiler{,.orig} && sudo ln -sf $(pwd)/clang.orig /usr/local/bin/$compiler && sudo ln -sf ccache $compiler; done && popd && if [[ $IOS ]]; then redundant=AppleTV,Watch; elif [[ $TVOS ]]; then redundant=iPhone,Watch; else redundant=iPhone,AppleTV,Watch; fi && eval sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/{$redundant}{OS,Simulator}.platform; if echo $COMMIT_MESSAGE |egrep -cq '\[(cache clear|xcode 64bit only)\]' || [[ $(ccache -s |grep 'files in cache' |rev |cut -d' ' -f1 |rev) == '0' ]]; then export XCODE_64BIT_ONLY=1; fi; fi
- rake ci_setup_cache && if [[ -f CustomCache/CMakeCache.txt ]]; then mkdir -p ../Build && cp -p CustomCache/CMakeCache.txt ../Build; fi
script: rake ci && if [[ $PACKAGE_UPLOAD ]]; then rake ci_package_upload; fi && rake ci_timer
after_script: rake ci_teardown_cache && mkdir -p CustomCache && cp -p ../Build/CMakeCache.txt CustomCache
matrix:
fast_finish: true
include:
- &package-stage
stage: package
condition: PACKAGE_UPLOAD
env: *tvOS
before_script:
- *before_script
- export PACKAGE_UPLOAD=1
# Uncomment/readjust below when the packaging build is running out of disk space again
# whitelist='brew-cask ccache cmake doxygen graphviz libpng libyaml md5deep openssl pkg-config readline'
# for f in $(brew list); do [[ $whitelist =~ $f ]] || brew uninstall --force $f; done
# for f in $(brew cask list |grep -v Uninstalling); do [[ $whitelist =~ $f ]] || brew cask uninstall --force $f; done
- travis_retry brew cleanup
- travis_retry brew install doxygen graphviz
- <<: *package-stage
env: *iOS
- <<: *package-stage
env: *macOS-STATIC
- <<: *package-stage
env: *macOS-SHARED
- stage: housekeep
...
# vi: set ts=2 sw=2 expandtab: