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
29 - ./conan/travis/install.sh
31 - ./conan/travis/build.sh
39 # - "pip install wheel twine"
42 # - 'VERSION="$TRAVIS_TAG" python setup.py sdist bdist_wheel'
45 # # Checkpointed release builds.
47 # script: .travis/deploy-python.sh
51 # # all_branches must be set with tags: true. See below post:
52 # # https://stackoverflow.com/a/27775257/1076585
54 # # Produce a new build for the cutting edge when master changes.
56 # script: .travis/deploy-python.sh
69 - bash .travis/build-and-run-docker-test-containers.sh
81 - BUILD_TYPE=Release CONAN=true
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
92 - bash grpc/build_grpc.sh
94 -DCMAKE_BUILD_TYPE=$BUILD_TYPE
95 -DFLATBUFFERS_BUILD_GRPCTEST=ON
96 -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install
97 -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf
98 -DFLATBUFFERS_CODE_SANITIZE=ON
99 - cmake --build . -- -j${JOBS}
100 - LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure
101 - bash .travis/check-generate-code.sh
102 - 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
113 - bash grpc/build_grpc.sh
115 -DCMAKE_BUILD_TYPE=$BUILD_TYPE
116 -DFLATBUFFERS_BUILD_GRPCTEST=ON
117 -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install
118 -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf
119 -DFLATBUFFERS_CODE_SANITIZE=ON
120 - cmake --build . -- -j${JOBS}
121 - DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure
122 - bash .travis/check-generate-code.sh
125 env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=conanio/gcc49
127 env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=conanio/gcc5
129 env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=conanio/gcc6
131 env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=conanio/gcc7
133 env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8
135 env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=conanio/clang39
137 env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=conanio/clang40
139 env: CONAN_CLANG_VERSIONS=5.0 CONAN_DOCKER_IMAGE=conanio/clang50
141 env: CONAN_CLANG_VERSIONS=6.0 CONAN_DOCKER_IMAGE=conanio/clang60
144 env: CONAN_APPLE_CLANG_VERSIONS=7.3
147 env: CONAN_APPLE_CLANG_VERSIONS=8.1
150 env: CONAN_APPLE_CLANG_VERSIONS=9.0
153 env: CONAN_APPLE_CLANG_VERSIONS=9.1
156 env: CONAN_APPLE_CLANG_VERSIONS=10.0
166 - extra-android-m2repository
171 - git clone https://github.com/urho3d/android-ndk.git $HOME/android-ndk-root
172 - export ANDROID_NDK_HOME=$HOME/android-ndk-root
173 # Setup environment for Linux build which is required to build the sample.
174 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
175 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
176 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq g++-$GCC_VERSION; fi
177 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq gcc-$GCC_VERSION; fi
178 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++; fi
179 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc; fi
181 - failed=0; for build_gradle in $(git ls-files | grep build.gradle); do ( cd "$(dirname "${build_gradle}")" && ./gradlew build ) || failed=1; done; exit $((failed))