1env: 2 global: 3 # Set at the root level as this is ignored when set under matrix.env. 4 - GCC_VERSION="4.9" 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" 11 12conan-linux: &conan-linux 13 os: linux 14 dist: xenial 15 language: python 16 python: "3.7" 17 services: 18 - docker 19 install: 20 - ./conan/travis/install.sh 21 script: 22 - ./conan/travis/build.sh 23 if: tag IS present 24 25conan-linux-master: &conan-linux-master 26 os: linux 27 dist: xenial 28 language: python 29 python: "3.7" 30 services: 31 - docker 32 install: 33 - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./conan/travis/install.sh; fi' 34 script: 35 - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./conan/travis/build.sh; fi' 36 branches: 37 only: 38 - master 39 40conan-osx: &conan-osx 41 os: osx 42 language: generic 43 install: 44 - ./conan/travis/install.sh 45 script: 46 - ./conan/travis/build.sh 47 if: tag IS present 48 49matrix: 50 include: 51 #- language: python 52 # python: "2.7" 53 # install: 54 # - "pip install wheel twine" 55 # script: 56 # - "cd python/" 57 # - 'VERSION="$TRAVIS_TAG" python setup.py sdist bdist_wheel' 58 # - "cd ../" 59 # deploy: 60 # # Checkpointed release builds. 61 # - provider: script 62 # script: .travis/deploy-python.sh 63 # skip_cleanup: true 64 # on: 65 # tags: true 66 # # all_branches must be set with tags: true. See below post: 67 # # https://stackoverflow.com/a/27775257/1076585 68 # all_branches: true 69 # # Produce a new build for the cutting edge when master changes. 70 # - provider: script 71 # script: .travis/deploy-python.sh 72 # skip_cleanup: true 73 # on: 74 # branch: master 75 - language: cpp 76 os: 77 - linux 78 79 addons: 80 apt: 81 packages: 82 - docker-ce 83 script: 84 - bash .travis/build-and-run-docker-test-containers.sh 85 86 - language: cpp 87 os: 88 - linux 89 90 compiler: 91 - gcc 92 93 env: 94 matrix: 95 - BUILD_TYPE=Debug 96 - BUILD_TYPE=Release 97 98 before_install: 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 105 106 script: 107 - pip install cmake 108 - bash .travis/check-sources.sh 109 - bash grpc/build_grpc.sh 110 - cmake . 111 -DCMAKE_BUILD_TYPE=$BUILD_TYPE 112 -DFLATBUFFERS_BUILD_GRPCTEST=ON 113 -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install 114 -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf 115 -DFLATBUFFERS_CODE_SANITIZE=ON 116 - cmake --build . --target all --clean-first -- -j${JOBS} 117 - LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure 118 119 - language: cpp 120 os: osx 121 osx_image: xcode9.3 122 env: 123 matrix: 124 - BUILD_TYPE=Debug 125 - BUILD_TYPE=Release 126 127 script: 128 - pip install --user cmake 129 - mkdir ~/cmake_path 130 - ln -s $(find ~/Library/Python -name cmake -type f | head -n 1) ~/cmake_path/cmake 131 - ln -s $(find ~/Library/Python -name ctest -type f | head -n 1) ~/cmake_path/ctest 132 - export PATH=~/cmake_path:${PATH} 133 - bash grpc/build_grpc.sh 134 - cmake . 135 -DCMAKE_BUILD_TYPE=$BUILD_TYPE 136 -DFLATBUFFERS_BUILD_GRPCTEST=ON 137 -DGRPC_INSTALL_PATH=$TRAVIS_BUILD_DIR/google/grpc/install 138 -DPROTOBUF_DOWNLOAD_PATH=$TRAVIS_BUILD_DIR/google/grpc/third_party/protobuf 139 -DFLATBUFFERS_CODE_SANITIZE=ON 140 - cmake --build . -- -j${JOBS} 141 - DYLD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/google/grpc/install/lib ctest --extra-verbose --output-on-failure 142 143 - <<: *conan-linux-master 144 env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8 145 - <<: *conan-linux 146 env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=conanio/gcc49 147 - <<: *conan-linux 148 env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=conanio/gcc5 149 - <<: *conan-linux 150 env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=conanio/gcc6 151 - <<: *conan-linux 152 env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=conanio/gcc7 153 - <<: *conan-linux 154 env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8 155 - <<: *conan-linux 156 env: CONAN_GCC_VERSIONS=9 CONAN_DOCKER_IMAGE=conanio/gcc9 157 - <<: *conan-linux 158 env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=conanio/clang39 159 - <<: *conan-linux 160 env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=conanio/clang40 161 - <<: *conan-linux 162 env: CONAN_CLANG_VERSIONS=5.0 CONAN_DOCKER_IMAGE=conanio/clang50 163 - <<: *conan-linux 164 env: CONAN_CLANG_VERSIONS=6.0 CONAN_DOCKER_IMAGE=conanio/clang60 165 - <<: *conan-linux 166 env: CONAN_CLANG_VERSIONS=7.0 CONAN_DOCKER_IMAGE=conanio/clang7 167 - <<: *conan-linux 168 env: CONAN_CLANG_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/clang8 169 - <<: *conan-osx 170 osx_image: xcode7.3 171 env: CONAN_APPLE_CLANG_VERSIONS=7.3 172 - <<: *conan-osx 173 osx_image: xcode8.3 174 env: CONAN_APPLE_CLANG_VERSIONS=8.1 175 - <<: *conan-osx 176 osx_image: xcode9 177 env: CONAN_APPLE_CLANG_VERSIONS=9.0 178 - <<: *conan-osx 179 osx_image: xcode9.4 180 env: CONAN_APPLE_CLANG_VERSIONS=9.1 181 - <<: *conan-osx 182 osx_image: xcode10.2 183 env: CONAN_APPLE_CLANG_VERSIONS=10.0 184 185 - language: android 186 sudo: true 187 dist: trusty 188 android: 189 components: 190 - tools 191 - platform-tools 192 - extra-android-m2repository 193 licenses: 194 - 'android-sdk-preview-license-52d11cd2' 195 - 'android-sdk-license-.+' 196 - 'google-gdk-license-.+' 197 compiler: 198 - gcc 199 before_install: 200 - echo y | sdkmanager "platforms;android-30" 201 - echo y | sdkmanager "build-tools;30.0.2" 202 - echo y | sdkmanager "ndk-bundle" 203 - echo y | sdkmanager "cmake;3.6.4111459" 204 script: 205 - cmake -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF .; make; export PATH="$PATH:${PWD}" 206 - cd android; ./gradlew clean build 207 208 - language: generic 209 if: type IN (pull_request) 210 os: linux 211 install: 212 - bash .travis/format_install.sh 213 214 script: 215 - bash .travis/format_check.sh 216