forked from suafeng/peloton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (113 loc) · 4.69 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
language: c++
python: 3.6
matrix:
fast_finish: true
include:
# Mac build
- os: osx
osx_image: xcode8.3
compiler: clang
env:
# NAME has no actual use, just to make the travis jobs overview more clear
- NAME="clang Debug"
- PELOTON_BUILD_TYPE=Debug
- COVERALLS=Off
# Linux builds for gcc 5
- os: linux
sudo: required
dist: trusty
compiler: gcc
addons:
apt:
sources:
- llvm-toolchain-precise-3.7
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
# NAME has no actual use, just to make the travis jobs overview more clear
- NAME="gcc5 Debug/Tests/AddressSanitizer/Coveralls"
- CXX=g++-5
- CC=gcc-5
- PELOTON_BUILD_TYPE=Debug
- COVERALLS=On
# override script value to run also tests and benchmarks
script:
# create build directory
- mkdir build
- cd build
# run cmake. NOTE: the PATH is made explicit to avoid automatic selection of the preinstalled llvm version in the Travis trusty image
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=Address ..
# build
- make -j4
# run tests
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then make check -j4; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 make check -j4; fi
# build benchmarks
- make benchmark -j4
# install peloton
- make install
# run psql tests
- bash ../script/testing/psql/psql_test.sh
# run jdbc tests
- python ../script/validators/jdbc_validator.py
# run junit tests
- python ../script/testing/junit/run_junit.py
# upload coverage info
- make coveralls
- os: linux
sudo: required
dist: trusty
compiler: gcc
addons:
apt:
sources:
- llvm-toolchain-precise-3.7
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
# NAME has no actual use, just to make the travis jobs overview more clear
- NAME="gcc5 Release/Tests/AddressSanitizer"
- CXX=g++-5
- CC=gcc-5
- PELOTON_BUILD_TYPE=Release
- COVERALLS=Off
# override script value to run also tests and benchmarks
script:
# create build directory
- mkdir build
- cd build
# run cmake. NOTE: the PATH is made explicit to avoid automatic selection of the preinstalled llvm version in the Travis trusty image
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=Address ..
# build
- make -j4
# run tests
- if [[ $TRAVIS_OS_NAME != 'osx' ]]; then make check -j4; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then ASAN_OPTIONS=detect_container_overflow=0 make check -j4; fi
# build benchmarks
- make benchmark -j4
# install peloton
- make install
# run psql tests
- bash ../script/testing/psql/psql_test.sh
# run jdbc tests
- python ../script/validators/jdbc_validator.py
# run junit tests
- python ../script/testing/junit/run_junit.py
install:
# setup environment
- ./script/installation/packages.sh
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then pip install --user cpp-coveralls; fi
before_script:
# first, run source_validator
- python script/validators/source_validator.py
# build peloton (override this value to execute tests)
script:
# create build directory
- mkdir build
- cd build
# run cmake. NOTE: the PATH is made explicit to avoid automatic selection of the preinstalled llvm version in the Travis trusty image
- PATH=/usr/lib/llvm-3.7/bin:/usr/bin:$PATH cmake -DCOVERALLS=$COVERALLS -DCMAKE_PREFIX_PATH=`llvm-config-3.7 --prefix` -DCMAKE_BUILD_TYPE=$PELOTON_BUILD_TYPE -DUSE_SANITIZER=Address ..
# build
- make -j4