blob: 54a0c8a2297b3aa41a4313a77b2245128c628f4c [file] [log] [blame]
# NOTE(quickstep-team): In Travis-CI, jobs timeout if they take more than 120
# 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=Release VECTOR_COPY_ELISION_LEVEL=joinwithbinaryexpressions
- BUILD_TYPE=Debug VECTOR_COPY_ELISION_LEVEL=selection
- BUILD_TYPE=Release VECTOR_COPY_ELISION_LEVEL=selection
install:
- if [ "$CC" = "gcc" ]; then
export MAKE_JOBS=1;
else
export MAKE_JOBS=2;
fi
- 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
- (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/cpplint/lint_everything.py
- ./validate_cmakelists.py
- ./cyclic_dependency.py
- (cd build && make -j$MAKE_JOBS)
- (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
packages:
- gcc-5
- g++-5
- clang-3.7
- binutils-gold
- libprotobuf-dev
- protobuf-compiler
- libgtest-dev
- python-networkx
- libnuma-dev
cache:
apt: true