franchuti688 | 23f75f5 | 2015-04-01 12:35:37 +0200 | [diff] [blame] | 1 | env: |
franchuti688 | 23f75f5 | 2015-04-01 12:35:37 +0200 | [diff] [blame] | 2 | global: |
Stewart Miles | a892322 | 2017-07-13 06:27:39 -0700 | [diff] [blame] | 3 | # Set at the root level as this is ignored when set under matrix.env. |
franchuti688 | 23f75f5 | 2015-04-01 12:35:37 +0200 | [diff] [blame] | 4 | - GCC_VERSION="4.9" |
Vladimir Glavnyy | 5f32f94 | 2018-11-17 00:24:06 +0700 | [diff] [blame] | 5 | # Fail on first error if UBSAN or ASAN enabled for a target |
| 6 | - UBSAN_OPTIONS=halt_on_error=1 |
| 7 | - ASAN_OPTIONS=halt_on_error=1 |
| 8 | # Travis machines have 2 cores |
| 9 | - JOBS=2 |
| 10 | - MAKEFLAGS="-j 2" |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 11 | |
| 12 | conan-linux: &conan-linux |
| 13 | os: linux |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 14 | dist: xenial |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 15 | language: python |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 16 | python: "3.7" |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 17 | services: |
| 18 | - docker |
| 19 | install: |
| 20 | - ./conan/travis/install.sh |
| 21 | script: |
| 22 | - ./conan/travis/build.sh |
| 23 | if: tag IS present |
| 24 | |
| 25 | conan-osx: &conan-osx |
| 26 | os: osx |
| 27 | language: generic |
| 28 | install: |
| 29 | - ./conan/travis/install.sh |
| 30 | script: |
| 31 | - ./conan/travis/build.sh |
| 32 | if: tag IS present |
| 33 | |
Stewart Miles | a892322 | 2017-07-13 06:27:39 -0700 | [diff] [blame] | 34 | matrix: |
| 35 | include: |
Wouter van Oortmerssen | b24f201 | 2017-12-28 09:56:57 -0800 | [diff] [blame] | 36 | #- language: python |
| 37 | # python: "2.7" |
| 38 | # install: |
| 39 | # - "pip install wheel twine" |
| 40 | # script: |
| 41 | # - "cd python/" |
| 42 | # - 'VERSION="$TRAVIS_TAG" python setup.py sdist bdist_wheel' |
| 43 | # - "cd ../" |
| 44 | # deploy: |
| 45 | # # Checkpointed release builds. |
| 46 | # - provider: script |
| 47 | # script: .travis/deploy-python.sh |
| 48 | # skip_cleanup: true |
| 49 | # on: |
| 50 | # tags: true |
| 51 | # # all_branches must be set with tags: true. See below post: |
| 52 | # # https://stackoverflow.com/a/27775257/1076585 |
| 53 | # all_branches: true |
| 54 | # # Produce a new build for the cutting edge when master changes. |
| 55 | # - provider: script |
| 56 | # script: .travis/deploy-python.sh |
| 57 | # skip_cleanup: true |
| 58 | # on: |
| 59 | # branch: master |
Stewart Miles | a892322 | 2017-07-13 06:27:39 -0700 | [diff] [blame] | 60 | - language: cpp |
| 61 | os: |
Vladimir Glavnyy | 5f32f94 | 2018-11-17 00:24:06 +0700 | [diff] [blame] | 62 | - linux |
Wouter van Oortmerssen | b24f201 | 2017-12-28 09:56:57 -0800 | [diff] [blame] | 63 | |
Robert | 79cd55b | 2018-11-29 22:03:06 -0800 | [diff] [blame] | 64 | addons: |
| 65 | apt: |
| 66 | packages: |
| 67 | - docker-ce |
| 68 | script: |
| 69 | - bash .travis/build-and-run-docker-test-containers.sh |
| 70 | |
| 71 | - language: cpp |
| 72 | os: |
| 73 | - linux |
| 74 | |
Stewart Miles | a892322 | 2017-07-13 06:27:39 -0700 | [diff] [blame] | 75 | compiler: |
| 76 | - gcc |
Wouter van Oortmerssen | b24f201 | 2017-12-28 09:56:57 -0800 | [diff] [blame] | 77 | |
Stewart Miles | a892322 | 2017-07-13 06:27:39 -0700 | [diff] [blame] | 78 | env: |
| 79 | matrix: |
Wouter van Oortmerssen | 9bab626 | 2018-06-08 11:03:34 -0700 | [diff] [blame] | 80 | - BUILD_TYPE=Debug |
| 81 | - BUILD_TYPE=Release CONAN=true |
Wouter van Oortmerssen | b24f201 | 2017-12-28 09:56:57 -0800 | [diff] [blame] | 82 | |
Stewart Miles | a892322 | 2017-07-13 06:27:39 -0700 | [diff] [blame] | 83 | before_install: |
| 84 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi |
| 85 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi |
| 86 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi |
| 87 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi |
| 88 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi |
| 89 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi |
Wouter van Oortmerssen | b24f201 | 2017-12-28 09:56:57 -0800 | [diff] [blame] | 90 | |
Stewart Miles | a892322 | 2017-07-13 06:27:39 -0700 | [diff] [blame] | 91 | script: |
Vladimir Glavnyy | 0eaaf18 | 2019-02-20 02:22:25 +0700 | [diff] [blame] | 92 | - bash .travis/check-sources.sh |
Sumant Tambe | 4b864fd | 2018-10-01 15:59:04 -0700 | [diff] [blame] | 93 | - bash grpc/build_grpc.sh |
Wouter van Oortmerssen | f89badd | 2019-02-25 14:10:56 -0800 | [diff] [blame] | 94 | - cmake . |
| 95 | -DCMAKE_BUILD_TYPE=$BUILD_TYPE |
| 96 | -DFLATBUFFERS_BUILD_GRPCTEST=ON |
| 97 | -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install |
Vladimir Glavnyy | 0fb1d44 | 2018-10-30 01:29:05 +0700 | [diff] [blame] | 98 | -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf |
| 99 | -DFLATBUFFERS_CODE_SANITIZE=ON |
Vladimir Glavnyy | 5f32f94 | 2018-11-17 00:24:06 +0700 | [diff] [blame] | 100 | - cmake --build . -- -j${JOBS} |
| 101 | - LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure |
Frank Benkstein | efbb11e | 2018-10-22 15:41:12 -0700 | [diff] [blame] | 102 | - bash .travis/check-generate-code.sh |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 103 | - if [ "$CONAN" == "true" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo pip install conan && conan create . flatbuffers/${TRAVIS_BRANCH}@google/testing -s build_type=$BUILD_TYPE -tf conan/test_package; fi |
franchuti688 | 23f75f5 | 2015-04-01 12:35:37 +0200 | [diff] [blame] | 104 | |
Wouter van Oortmerssen | 10bdcef | 2018-06-08 11:10:41 -0700 | [diff] [blame] | 105 | - language: cpp |
| 106 | os: osx |
| 107 | osx_image: xcode9.3 |
| 108 | env: |
| 109 | matrix: |
| 110 | - BUILD_TYPE=Debug |
| 111 | - BUILD_TYPE=Release |
Wouter van Oortmerssen | f89badd | 2019-02-25 14:10:56 -0800 | [diff] [blame] | 112 | |
Wouter van Oortmerssen | 10bdcef | 2018-06-08 11:10:41 -0700 | [diff] [blame] | 113 | script: |
Sumant Tambe | 4b864fd | 2018-10-01 15:59:04 -0700 | [diff] [blame] | 114 | - bash grpc/build_grpc.sh |
Vladimir Glavnyy | 0fb1d44 | 2018-10-30 01:29:05 +0700 | [diff] [blame] | 115 | - cmake . |
Wouter van Oortmerssen | f89badd | 2019-02-25 14:10:56 -0800 | [diff] [blame] | 116 | -DCMAKE_BUILD_TYPE=$BUILD_TYPE |
| 117 | -DFLATBUFFERS_BUILD_GRPCTEST=ON |
| 118 | -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install |
Vladimir Glavnyy | 0fb1d44 | 2018-10-30 01:29:05 +0700 | [diff] [blame] | 119 | -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf |
| 120 | -DFLATBUFFERS_CODE_SANITIZE=ON |
Vladimir Glavnyy | 5f32f94 | 2018-11-17 00:24:06 +0700 | [diff] [blame] | 121 | - cmake --build . -- -j${JOBS} |
| 122 | - DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure |
Frank Benkstein | efbb11e | 2018-10-22 15:41:12 -0700 | [diff] [blame] | 123 | - bash .travis/check-generate-code.sh |
Wouter van Oortmerssen | 10bdcef | 2018-06-08 11:10:41 -0700 | [diff] [blame] | 124 | |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 125 | - <<: *conan-linux |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 126 | env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=conanio/gcc49 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 127 | - <<: *conan-linux |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 128 | env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=conanio/gcc5 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 129 | - <<: *conan-linux |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 130 | env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=conanio/gcc6 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 131 | - <<: *conan-linux |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 132 | env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=conanio/gcc7 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 133 | - <<: *conan-linux |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 134 | env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 135 | - <<: *conan-linux |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 136 | env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=conanio/clang39 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 137 | - <<: *conan-linux |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 138 | env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=conanio/clang40 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 139 | - <<: *conan-linux |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 140 | env: CONAN_CLANG_VERSIONS=5.0 CONAN_DOCKER_IMAGE=conanio/clang50 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 141 | - <<: *conan-linux |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 142 | env: CONAN_CLANG_VERSIONS=6.0 CONAN_DOCKER_IMAGE=conanio/clang60 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 143 | - <<: *conan-osx |
| 144 | osx_image: xcode7.3 |
| 145 | env: CONAN_APPLE_CLANG_VERSIONS=7.3 |
| 146 | - <<: *conan-osx |
| 147 | osx_image: xcode8.3 |
| 148 | env: CONAN_APPLE_CLANG_VERSIONS=8.1 |
| 149 | - <<: *conan-osx |
| 150 | osx_image: xcode9 |
| 151 | env: CONAN_APPLE_CLANG_VERSIONS=9.0 |
| 152 | - <<: *conan-osx |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 153 | osx_image: xcode9.4 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 154 | env: CONAN_APPLE_CLANG_VERSIONS=9.1 |
Uilian Ries | dd89228 | 2018-11-12 14:49:42 -0200 | [diff] [blame] | 155 | - <<: *conan-osx |
| 156 | osx_image: xcode10 |
| 157 | env: CONAN_APPLE_CLANG_VERSIONS=10.0 |
Uilian Ries | 1f03bec | 2018-08-16 16:17:52 -0300 | [diff] [blame] | 158 | |
Stewart Miles | 569492e | 2018-10-08 12:43:57 -0700 | [diff] [blame] | 159 | - language: android |
| 160 | sudo: true |
| 161 | android: |
| 162 | components: |
| 163 | - tools |
| 164 | - platform-tools |
| 165 | - build-tools-25.0.2 |
| 166 | - android-25 |
| 167 | - extra-android-m2repository |
| 168 | compiler: |
| 169 | - gcc |
Vladimir Glavnyy | 5f32f94 | 2018-11-17 00:24:06 +0700 | [diff] [blame] | 170 | |
Stewart Miles | 569492e | 2018-10-08 12:43:57 -0700 | [diff] [blame] | 171 | before_install: |
Wouter van Oortmerssen | f89badd | 2019-02-25 14:10:56 -0800 | [diff] [blame] | 172 | # Output something every 10 minutes or Travis kills the job |
| 173 | - while sleep 540; do echo "=====[ $SECONDS seconds still running ]====="; done & |
Stewart Miles | 569492e | 2018-10-08 12:43:57 -0700 | [diff] [blame] | 174 | - git clone https://github.com/urho3d/android-ndk.git $HOME/android-ndk-root |
| 175 | - export ANDROID_NDK_HOME=$HOME/android-ndk-root |
| 176 | # Setup environment for Linux build which is required to build the sample. |
| 177 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi |
| 178 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi |
| 179 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi |
| 180 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi |
| 181 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi |
| 182 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi |
| 183 | script: |
| 184 | - failed=0; for build_gradle in $(git ls-files | grep build.gradle); do ( cd "$(dirname "${build_gradle}")" && ./gradlew build ) || failed=1; done; exit $((failed)) |
Wouter van Oortmerssen | f89badd | 2019-02-25 14:10:56 -0800 | [diff] [blame] | 185 | # Kill the sleep loop |
| 186 | - kill %1 |