| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| # NOTE(quickstep-team): In Travis-CI, jobs timeout if they take more than 50 |
| # mins or if there is no log output for more than 10 mins. Hence, we use -O0 to |
| # speed up compilation in release build. Also, jobs can only use upto 20GB of |
| # disk space. Hence, we minimize the amount of debug symbol using -g0 (DEBUG |
| # builds were taking > 20GB of space with clang). |
| # Also, to reduce the total CI time, we explicitly run the most time-consuming |
| # build first, using gcc in debug build with joinwithbinaryexpressions. |
| |
| language: cpp |
| |
| cache: ccache |
| |
| compiler: |
| - gcc |
| - clang |
| |
| env: |
| - BUILD_TYPE=Debug VECTOR_COPY_ELISION_LEVEL=joinwithbinaryexpressions |
| - BUILD_TYPE=Debug VECTOR_COPY_ELISION_LEVEL=selection |
| - BUILD_TYPE=Release VECTOR_COPY_ELISION_LEVEL=joinwithbinaryexpressions |
| - BUILD_TYPE=Release VECTOR_COPY_ELISION_LEVEL=selection |
| |
| matrix: |
| exclude: # Due to time-out. |
| - compiler: gcc |
| env: BUILD_TYPE=Debug VECTOR_COPY_ELISION_LEVEL=joinwithbinaryexpressions |
| - compiler: gcc |
| env: BUILD_TYPE=Debug VECTOR_COPY_ELISION_LEVEL=selection |
| |
| install: |
| - export TEST_JOBS=2; |
| - if [ "$CC" = "gcc" ]; then |
| export CC="gcc-5"; |
| export CXX="g++-5"; |
| elif [ "$CC" = "clang" ]; then |
| export CC="clang-3.7"; |
| export CXX="clang++-3.7"; |
| fi |
| - export CLINKER=`which gold` |
| - export DEBUG_FLAGS="-g0"; |
| - export RELEASE_FLAGS="-O0 -DNDEBUG"; |
| - export LINKER_FLAGS="-s" |
| |
| before_script: |
| - $CC --version |
| - $CXX --version |
| - $CLINKER --version |
| - cmake --version |
| - (cd third_party && ./download_and_patch_prerequisites.sh && cd ../) |
| - (cd build && |
| cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE |
| -D BUILD_SHARED_LIBS=On |
| -D CMAKE_C_FLAGS_DEBUG="$DEBUG_FLAGS" |
| -D CMAKE_CXX_FLAGS_DEBUG="$DEBUG_FLAGS" |
| -D CMAKE_C_FLAGS_RELEASE="$RELEASE_FLAGS" |
| -D CMAKE_CXX_FLAGS_RELEASE="$RELEASE_FLAGS" |
| -D CMAKE_EXE_LINKER_FLAGS="$LINKER_FLAGS" |
| -D CMAKE_C_COMPILER=$CC |
| -D CMAKE_CXX_COMPILER=$CXX |
| -D CMAKE_LINKER=$CLINKER |
| -D USE_TCMALLOC=0 |
| -D VECTOR_COPY_ELISION_LEVEL=$VECTOR_COPY_ELISION_LEVEL ..) |
| |
| script: |
| - ./third_party/src/cpplint/lint_everything.py |
| - ./validate_cmakelists.py |
| - ./cyclic_dependency.py |
| - (cd build && make) |
| - (cd build && ctest --output-on-failure -j$TEST_JOBS) |
| |
| after_failure: |
| - df -h |
| - free -m |
| - dmesg |
| |
| # Besides pull requests, we want to continuously test pushes/merges to master. |
| branches: |
| only: |
| - master |
| |
| addons: |
| apt: |
| sources: |
| - ubuntu-toolchain-r-test |
| - llvm-toolchain-precise-3.7 |
| - george-edison55-precise-backports # For cmake 3.x |
| packages: |
| - gcc-5 |
| - g++-5 |
| - clang-3.7 |
| - binutils-gold |
| - libprotobuf-dev |
| - protobuf-compiler |
| - libgtest-dev |
| - python-networkx |
| - libnuma-dev |
| - cmake-data |
| - cmake |
| |
| cache: |
| apt: true |