Fixed prod PyPI URL and deploy block list.
[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: python
8       python: "2.7"
9       install:
10         - "pip install wheel twine"
11       script:
12         - "cd python/"
13         - 'VERSION="$TRAVIS_TAG" python setup.py sdist bdist_wheel'
14         - "cd ../"
15       deploy:
16         # Checkpointed release builds.
17         - provider: script
18           script: .travis/deploy-python.sh
19           skip_cleanup: true
20           on:
21             tags: true
22             # all_branches must be set with tags: true. See below post:
23             # https://stackoverflow.com/a/27775257/1076585
24             all_branches: true
25         # Produce a new build for the cutting edge when master changes.
26         - provider: script
27           script: .travis/deploy-python.sh
28           skip_cleanup: true
29           on:
30             branch: master
31     - language: cpp
32       os:
33       - linux
34       - osx
35       
36       compiler:
37         - gcc
38         #- clang
39       
40       env:
41         matrix:
42           - BUILD_TYPE=Debug BIICODE=false
43           - BUILD_TYPE=Release BIICODE=false
44           # biicode .deb files no longer available.
45           # - BUILD_TYPE=Release BIICODE=true
46           # - BUILD_TYPE=Debug BIICODE=true
47       
48       before_install:
49       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
50       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
51       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi
52       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi
53       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi
54       - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi
55       
56       script:
57       - if [ "$BIICODE" == "false" ]; then cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make && make test; fi
58       - if [ "$BIICODE" == "true" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then ./biicode/support/bii-travis.sh $BUILD_TYPE; fi
59
60     - language: android
61       sudo: true
62       android:
63         components:
64           - tools
65           - platform-tools
66           - build-tools-25.0.2
67           - android-25
68           - extra-android-m2repository
69       compiler:
70         - gcc
71       before_install:
72         - git clone https://github.com/urho3d/android-ndk.git $HOME/android-ndk-root
73         - export ANDROID_NDK_HOME=$HOME/android-ndk-root
74         # Setup environment for Linux build which is required to build the sample.
75         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
76         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
77         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi
78         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi
79         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi
80         - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi
81       script:
82         - failed=0; for build_gradle in $(git ls-files | grep build.gradle); do ( cd "$(dirname "${build_gradle}")" && ./gradlew build ) || failed=1; done; exit $((failed))