3 # Set at the root level as this is ignored when set under matrix.env.
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
12 conan-linux: &conan-linux
20 - ./conan/travis/install.sh
22 - ./conan/travis/build.sh
25 conan-linux-master: &conan-linux-master
33 - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./conan/travis/install.sh; fi'
35 - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./conan/travis/build.sh; fi'
44 - ./conan/travis/install.sh
46 - ./conan/travis/build.sh
54 # - "pip install wheel twine"
57 # - 'VERSION="$TRAVIS_TAG" python setup.py sdist bdist_wheel'
60 # # Checkpointed release builds.
62 # script: .travis/deploy-python.sh
66 # # all_branches must be set with tags: true. See below post:
67 # # https://stackoverflow.com/a/27775257/1076585
69 # # Produce a new build for the cutting edge when master changes.
71 # script: .travis/deploy-python.sh
84 - bash .travis/build-and-run-docker-test-containers.sh
99 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
100 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
101 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi
102 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi
103 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi
104 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi
107 - bash .travis/check-sources.sh
108 - bash grpc/build_grpc.sh
110 -DCMAKE_BUILD_TYPE=$BUILD_TYPE
111 -DFLATBUFFERS_BUILD_GRPCTEST=ON
112 -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install
113 -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf
114 -DFLATBUFFERS_CODE_SANITIZE=ON
115 - cmake --build . -- -j${JOBS}
116 - LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure
117 - bash .travis/check-generate-code.sh
128 - bash grpc/build_grpc.sh
130 -DCMAKE_BUILD_TYPE=$BUILD_TYPE
131 -DFLATBUFFERS_BUILD_GRPCTEST=ON
132 -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install
133 -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf
134 -DFLATBUFFERS_CODE_SANITIZE=ON
135 - cmake --build . -- -j${JOBS}
136 - DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure
137 - bash .travis/check-generate-code.sh
139 - <<: *conan-linux-master
140 env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8
142 env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=conanio/gcc49
144 env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=conanio/gcc5
146 env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=conanio/gcc6
148 env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=conanio/gcc7
150 env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8
152 env: CONAN_GCC_VERSIONS=9 CONAN_DOCKER_IMAGE=conanio/gcc9
154 env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=conanio/clang39
156 env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=conanio/clang40
158 env: CONAN_CLANG_VERSIONS=5.0 CONAN_DOCKER_IMAGE=conanio/clang50
160 env: CONAN_CLANG_VERSIONS=6.0 CONAN_DOCKER_IMAGE=conanio/clang60
162 env: CONAN_CLANG_VERSIONS=7.0 CONAN_DOCKER_IMAGE=conanio/clang7
164 env: CONAN_CLANG_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/clang8
167 env: CONAN_APPLE_CLANG_VERSIONS=7.3
170 env: CONAN_APPLE_CLANG_VERSIONS=8.1
173 env: CONAN_APPLE_CLANG_VERSIONS=9.0
176 env: CONAN_APPLE_CLANG_VERSIONS=9.1
179 env: CONAN_APPLE_CLANG_VERSIONS=10.0
190 - extra-android-m2repository
195 # Output something every 10 minutes or Travis kills the job
196 - while sleep 540; do echo "=====[ $SECONDS seconds still running ]====="; done &
197 # Install the r17c version of the NDK that still so that we can continue to test with gnustl
199 - export ANDROID_NDK_HOME=$HOME/android-ndk
200 - NDK_ZIP=$ANDROID_NDK_HOME/ndk.zip
201 - mkdir -p $ANDROID_NDK_HOME
202 - curl -o $NDK_ZIP https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip
203 - unzip -q -d $ANDROID_NDK_HOME $NDK_ZIP
205 - mv $ANDROID_NDK_HOME/android-ndk-*/* $ANDROID_NDK_HOME
206 - rmdir $ANDROID_NDK_HOME/android-ndk-*
207 - export CMAKE=$(which cmake)
208 # libc required for prebuilt llvm toolchain the NDK r17c.
209 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
210 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq libc6; fi
211 # Setup environment for Linux build which is required to build the sample.
212 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
213 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
214 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi
215 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi
216 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi
217 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi
219 - failed=0; for build_gradle in $(git ls-files | grep build.gradle); do ( cd "$(dirname "${build_gradle}")" && ./gradlew build ) || failed=1; done; exit $((failed))
220 # Kill the sleep loop