Merge pull request #4459 from stewartmiles/master
[platform/upstream/flatbuffers.git] / .travis.yml
1 env:
2   global:
3     # Set at the root level as this is ignored when set under matrix.env.
4     - GCC_VERSION="4.9"
5 matrix:
6   include:
7     - language: cpp
8       os:
9       - linux
10       - osx
11       
12       compiler:
13         - gcc
14         #- clang
15       
16       env:
17         matrix:
18           - BUILD_TYPE=Debug BIICODE=false
19           - BUILD_TYPE=Release BIICODE=false
20           # biicode .deb files no longer available.
21           # - BUILD_TYPE=Release BIICODE=true
22           # - BUILD_TYPE=Debug BIICODE=true
23       
24       before_install:
25       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
26       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
27       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi
28       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi
29       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi
30       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi
31       
32       script:
33       - if [ "$BIICODE" == "false" ]; then cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make && make test; fi
34       - if [ "$BIICODE" == "true" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then ./biicode/support/bii-travis.sh $BUILD_TYPE; fi
35
36     - language: android
37       sudo: true
38       android:
39         components:
40           - tools
41           - platform-tools
42           - build-tools-25.0.2
43           - android-25
44           - extra-android-m2repository
45       compiler:
46         - gcc
47       before_install:
48         - git clone https://github.com/urho3d/android-ndk.git $HOME/android-ndk-root
49         - export ANDROID_NDK_HOME=$HOME/android-ndk-root
50         # Setup environment for Linux build which is required to build the sample.
51         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
52         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
53         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi
54         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi
55         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi
56         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi
57       script:
58         - failed=0; for build_gradle in $(git ls-files | grep build.gradle); do ( cd "$(dirname "${build_gradle}")" && ./gradlew build ) || failed=1; done; exit $((failed))