-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
120 lines (106 loc) · 3.61 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# 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.
dist: trusty
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-5.0";
export CXX="clang++-5.0";
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
-D ENABLE_COMPARISON_INLINE_EXPANSION=OFF ..)
script:
- ./lint_everything.py
- ./validate_cmakelists.py
- ./cyclic_dependency.py
- (cd build && make)
- (cd build && ctest --output-on-failure -E NetworkUtil_unittest -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-trusty-5.0
packages:
- gcc-5
- g++-5
- clang-5.0
- binutils-gold
- libprotobuf-dev
- protobuf-compiler
- libgtest-dev
- python-networkx
- libnuma-dev
- cmake-data
- cmake
cache:
apt: true