forked from urho3d/urho3d
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
67 lines (66 loc) · 5.37 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
#
# Copyright (c) 2008-2014 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.
#
env:
global:
- secure: DE9IUM+pIV757GU0ccfDJhA752442pKu3DyBthrzHW9+GbsqbfuJOx045CYNN5vOWutFPC0A51B9WxhLNpXXqD3mfU8MhP1gkF7SskrHvcAPrCyfdqZf1Q8XDP5phm2KbHhhwxQMYmmicd6yj8DPNy2wRoSgPSDp/ZUDk51XZDU=
- secure: AfoHc5tpnYoI2TVGUeE9Xdru+15pd5N4YzO7EWvwmMnrHtNO3retrmKOGpnIyfbP2BeWRTW/z+BI4G0RrfvubjHu2us4wRh6Jq8+UZohBBkM+ldTnyqYHX97q+6ScWBWZGg7dpthd1x/7fmds8dSRzustHUhI7RzPbWEMQH1DGI=
- DISPLAY=:99.0
matrix:
- LINUX=1 URHO3D_64BIT=1 URHO3D_LIB_TYPE=STATIC SITE_UPDATE=1
- LINUX=1 URHO3D_64BIT=1 URHO3D_LIB_TYPE=SHARED
- WINDOWS=1 ARCH=x86_64 URHO3D_64BIT=1 URHO3D_LIB_TYPE=STATIC
- WINDOWS=1 ARCH=x86_64 URHO3D_64BIT=1 URHO3D_LIB_TYPE=SHARED
- LINUX=1 URHO3D_LIB_TYPE=STATIC
- LINUX=1 URHO3D_LIB_TYPE=SHARED
- WINDOWS=1 ARCH=i686 URHO3D_LIB_TYPE=STATIC
- WINDOWS=1 ARCH=i686 URHO3D_LIB_TYPE=SHARED
- ANDROID=1 URHO3D_LIB_TYPE=STATIC
- ANDROID=1 URHO3D_LIB_TYPE=SHARED
- RPI=1 URHO3D_LIB_TYPE=STATIC
- RPI=1 URHO3D_LIB_TYPE=SHARED
matrix:
fast_finish: true
# allow_failures:
# - env: RPI=1 URHO3D_LIB_TYPE=STATIC
# - env: RPI=1 URHO3D_LIB_TYPE=SHARED
language: cpp
compiler: gcc
before_install:
- bash -c "[ '$TRAVIS_BRANCH' == 'master' ] && [ '$TRAVIS_PULL_REQUEST' == 'false' ]" && export ON_MASTER_COMMIT=1 && bash -c "[ $SITE_UPDATE ]" && export SITE_UPDATE_ON_MASTER_COMMIT=1 || true
- bash -c "[ $ON_MASTER_COMMIT ]" && export COMMIT_MESSAGE=$(git log --format=%B -n 1 $TRAVIS_COMMIT) && echo $COMMIT_MESSAGE |grep -cq '\[ci package\]' && git fetch --depth=2000 --tags origin $TRAVIS_BRANCH && export PACKAGE_UPLOAD=1 || true
- bash -c "[ $ON_MASTER_COMMIT ]" && export RELEASE_TAG=$(git describe --tags --exact-match $TRAVIS_COMMIT 2>/dev/null) && bash -c "[ $RELEASE_TAG ]" && export PACKAGE_UPLOAD=1 || true
- bash -c "[ $ANDROID ]" && wget -q http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86_64.tar.bz2 && tar xjf *.bz2 && rm *.bz2 && ln -s android-ndk* android-ndk && export ANDROID_NDK=$(pwd)/android-ndk && bash -c "[ $PACKAGE_UPLOAD ]" && wget -q http://dl.google.com/android/android-sdk_r22.6.1-linux.tgz && tar xzf *.tgz && rm *.tgz && ln -s android-sdk* android-sdk && export ANDROID_SDK=$(pwd)/android-sdk || true
- bash -c "[ $RPI ]" && git clone --depth 1 https://github.com/raspberrypi/tools.git rpi-tools && export RASPI_TOOL=$(pwd)/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin && git clone --depth=1 https://github.com/urho3d/rpi-sysroot.git rpi-sysroot && export RASPI_ROOT=$(pwd)/rpi-sysroot || true
- bash -c "( [ $SITE_UPDATE_ON_MASTER_COMMIT ] || [ $PACKAGE_UPLOAD ] )" && sudo add-apt-repository ppa:george-edison55/precise-backports -y || true
- sudo apt-get update -q -y
install:
- sudo apt-get install -q -y --no-install-recommends libasound2-dev
- bash -c "[ x$URHO3D_64BIT == 'x' ]" && sudo apt-get remove -q -y gvfs-daemons && sudo apt-get install -q -y libxrandr-dev:i386 libglapi-mesa:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev:i386 libxext-dev:i386 libxrender-dev:i386 g++-multilib && export CMAKE_PREFIX_PATH=/usr/lib/i386-linux-gnu || true
- bash -c "( [ $SITE_UPDATE_ON_MASTER_COMMIT ] || [ $PACKAGE_UPLOAD ] )" && sudo apt-get install -q -y --no-install-recommends doxygen graphviz || true
- bash -c "[ $WINDOWS ]" && sudo apt-get install -q -y gcc-mingw-w64 gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 g++-mingw-w64 g++-mingw-w64-i686 g++-mingw-w64-x86-64 binutils-mingw-w64 binutils-mingw-w64-i686 binutils-mingw-w64-x86-64 && export MINGW_PREFIX=/usr/bin/${ARCH}-w64-mingw32 || true
- bash -c "( [ $LINUX ] || [ $RPI ] ) && [ $PACKAGE_UPLOAD ]" && sudo apt-get install -q -y rpm || true
- bash -c "[ $ANDROID ] && [ $PACKAGE_UPLOAD ]" && (while :; do echo 'y'; sleep 1; done) |android-sdk/tools/android update sdk --no-ui --filter platform-tool,build-tools-19.0.3,android-19,system-image,extra-android-support || true
- bash -e /etc/init.d/xvfb start
script: rake travis_ci
after_success:
- bash -c "[ $SITE_UPDATE_ON_MASTER_COMMIT ]" && rake travis_ci_site_update && rake travis_ci_rebase
- bash -c "[ $PACKAGE_UPLOAD ]" && rake travis_ci_package_upload