blob: 04616f7f73e7951204833df6d04d7ec7f20f50ab [file] [log] [blame]
franchuti68823f75f52015-04-01 12:35:37 +02001env:
franchuti68823f75f52015-04-01 12:35:37 +02002 global:
Stewart Milesa8923222017-07-13 06:27:39 -07003 # Set at the root level as this is ignored when set under matrix.env.
franchuti68823f75f52015-04-01 12:35:37 +02004 - GCC_VERSION="4.9"
Vladimir Glavnyy5f32f942018-11-17 00:24:06 +07005 # 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 Ries1f03bec2018-08-16 16:17:52 -030011
12conan-linux: &conan-linux
13 os: linux
Uilian Riesdd892282018-11-12 14:49:42 -020014 dist: xenial
Uilian Ries1f03bec2018-08-16 16:17:52 -030015 language: python
Uilian Riesdd892282018-11-12 14:49:42 -020016 python: "3.7"
Uilian Ries1f03bec2018-08-16 16:17:52 -030017 services:
18 - docker
19 install:
20 - ./conan/travis/install.sh
21 script:
22 - ./conan/travis/build.sh
23 if: tag IS present
24
25conan-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 Milesa8923222017-07-13 06:27:39 -070034matrix:
35 include:
Wouter van Oortmerssenb24f2012017-12-28 09:56:57 -080036 #- 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 Milesa8923222017-07-13 06:27:39 -070060 - language: cpp
61 os:
Vladimir Glavnyy5f32f942018-11-17 00:24:06 +070062 - linux
Wouter van Oortmerssenb24f2012017-12-28 09:56:57 -080063
Robert79cd55b2018-11-29 22:03:06 -080064 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 Milesa8923222017-07-13 06:27:39 -070075 compiler:
76 - gcc
Wouter van Oortmerssenb24f2012017-12-28 09:56:57 -080077
Stewart Milesa8923222017-07-13 06:27:39 -070078 env:
79 matrix:
Wouter van Oortmerssen9bab6262018-06-08 11:03:34 -070080 - BUILD_TYPE=Debug
81 - BUILD_TYPE=Release CONAN=true
Wouter van Oortmerssenb24f2012017-12-28 09:56:57 -080082
Stewart Milesa8923222017-07-13 06:27:39 -070083 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 Oortmerssenb24f2012017-12-28 09:56:57 -080090
Stewart Milesa8923222017-07-13 06:27:39 -070091 script:
Vladimir Glavnyy0eaaf182019-02-20 02:22:25 +070092 - bash .travis/check-sources.sh
Sumant Tambe4b864fd2018-10-01 15:59:04 -070093 - bash grpc/build_grpc.sh
Wouter van Oortmerssenf89badd2019-02-25 14:10:56 -080094 - cmake .
95 -DCMAKE_BUILD_TYPE=$BUILD_TYPE
96 -DFLATBUFFERS_BUILD_GRPCTEST=ON
97 -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install
Vladimir Glavnyy0fb1d442018-10-30 01:29:05 +070098 -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf
99 -DFLATBUFFERS_CODE_SANITIZE=ON
Vladimir Glavnyy5f32f942018-11-17 00:24:06 +0700100 - cmake --build . -- -j${JOBS}
101 - LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure
Frank Benksteinefbb11e2018-10-22 15:41:12 -0700102 - bash .travis/check-generate-code.sh
Uilian Riesdd892282018-11-12 14:49:42 -0200103 - 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
franchuti68823f75f52015-04-01 12:35:37 +0200104
Wouter van Oortmerssen10bdcef2018-06-08 11:10:41 -0700105 - language: cpp
106 os: osx
107 osx_image: xcode9.3
108 env:
109 matrix:
110 - BUILD_TYPE=Debug
111 - BUILD_TYPE=Release
Wouter van Oortmerssenf89badd2019-02-25 14:10:56 -0800112
Wouter van Oortmerssen10bdcef2018-06-08 11:10:41 -0700113 script:
Sumant Tambe4b864fd2018-10-01 15:59:04 -0700114 - bash grpc/build_grpc.sh
Vladimir Glavnyy0fb1d442018-10-30 01:29:05 +0700115 - cmake .
Wouter van Oortmerssenf89badd2019-02-25 14:10:56 -0800116 -DCMAKE_BUILD_TYPE=$BUILD_TYPE
117 -DFLATBUFFERS_BUILD_GRPCTEST=ON
118 -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install
Vladimir Glavnyy0fb1d442018-10-30 01:29:05 +0700119 -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf
120 -DFLATBUFFERS_CODE_SANITIZE=ON
Vladimir Glavnyy5f32f942018-11-17 00:24:06 +0700121 - cmake --build . -- -j${JOBS}
122 - DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure
Frank Benksteinefbb11e2018-10-22 15:41:12 -0700123 - bash .travis/check-generate-code.sh
Wouter van Oortmerssen10bdcef2018-06-08 11:10:41 -0700124
Uilian Ries1f03bec2018-08-16 16:17:52 -0300125 - <<: *conan-linux
Uilian Riesdd892282018-11-12 14:49:42 -0200126 env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=conanio/gcc49
Uilian Ries1f03bec2018-08-16 16:17:52 -0300127 - <<: *conan-linux
Uilian Riesdd892282018-11-12 14:49:42 -0200128 env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=conanio/gcc5
Uilian Ries1f03bec2018-08-16 16:17:52 -0300129 - <<: *conan-linux
Uilian Riesdd892282018-11-12 14:49:42 -0200130 env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=conanio/gcc6
Uilian Ries1f03bec2018-08-16 16:17:52 -0300131 - <<: *conan-linux
Uilian Riesdd892282018-11-12 14:49:42 -0200132 env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=conanio/gcc7
Uilian Ries1f03bec2018-08-16 16:17:52 -0300133 - <<: *conan-linux
Uilian Riesdd892282018-11-12 14:49:42 -0200134 env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8
Uilian Ries1f03bec2018-08-16 16:17:52 -0300135 - <<: *conan-linux
Uilian Riesdd892282018-11-12 14:49:42 -0200136 env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=conanio/clang39
Uilian Ries1f03bec2018-08-16 16:17:52 -0300137 - <<: *conan-linux
Uilian Riesdd892282018-11-12 14:49:42 -0200138 env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=conanio/clang40
Uilian Ries1f03bec2018-08-16 16:17:52 -0300139 - <<: *conan-linux
Uilian Riesdd892282018-11-12 14:49:42 -0200140 env: CONAN_CLANG_VERSIONS=5.0 CONAN_DOCKER_IMAGE=conanio/clang50
Uilian Ries1f03bec2018-08-16 16:17:52 -0300141 - <<: *conan-linux
Uilian Riesdd892282018-11-12 14:49:42 -0200142 env: CONAN_CLANG_VERSIONS=6.0 CONAN_DOCKER_IMAGE=conanio/clang60
Uilian Ries1f03bec2018-08-16 16:17:52 -0300143 - <<: *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 Riesdd892282018-11-12 14:49:42 -0200153 osx_image: xcode9.4
Uilian Ries1f03bec2018-08-16 16:17:52 -0300154 env: CONAN_APPLE_CLANG_VERSIONS=9.1
Uilian Riesdd892282018-11-12 14:49:42 -0200155 - <<: *conan-osx
156 osx_image: xcode10
157 env: CONAN_APPLE_CLANG_VERSIONS=10.0
Uilian Ries1f03bec2018-08-16 16:17:52 -0300158
Stewart Miles569492e2018-10-08 12:43:57 -0700159 - 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 Glavnyy5f32f942018-11-17 00:24:06 +0700170
Stewart Miles569492e2018-10-08 12:43:57 -0700171 before_install:
Wouter van Oortmerssenf89badd2019-02-25 14:10:56 -0800172 # Output something every 10 minutes or Travis kills the job
173 - while sleep 540; do echo "=====[ $SECONDS seconds still running ]====="; done &
Stewart Miles569492e2018-10-08 12:43:57 -0700174 - 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 Oortmerssenf89badd2019-02-25 14:10:56 -0800185 # Kill the sleep loop
186 - kill %1