Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit fd94a1e

Browse files
authored
Merge branch 'master' into foreign-key-final
2 parents aa9f314 + 46b44be commit fd94a1e

File tree

4 files changed

+270
-42
lines changed

4 files changed

+270
-42
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ script:
133133
# create build directory
134134
- mkdir build
135135
- cd build
136-
# run cmake
136+
# run cmake. NOTE: the PATH is made explicit to avoid automatic selection of the preinstalled llvm version in the Travis trusty image
137137
- 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 ..
138138
# build
139139
- make -j4

Jenkinsfile

Lines changed: 237 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,251 @@
11
pipeline {
22
agent any
33
stages {
4-
stage('Debug Build') {
5-
steps {
6-
sh 'rm -rf build && mkdir build'
7-
dir('build') {
8-
sh 'cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address ..'
9-
sh 'make -j4'
4+
stage('Build') {
5+
parallel {
6+
// begin gcc builds
7+
// NOTE: this next stage is special because it copies the test results out of the container
8+
stage('Ubuntu Xenial/gcc-5.4.0/llvm-3.7.1 (Debug/Test)') {
9+
agent {
10+
docker {
11+
image 'ubuntu:xenial'
12+
args '-v ${WORKSPACE}/../builds/${BUILD_ID}:/job:rw'
13+
}
14+
}
15+
steps {
16+
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
17+
sh 'python ./script/validators/source_validator.py'
18+
sh 'mkdir build'
19+
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False -DUSE_SANITIZER=Address .. && make -j4'
20+
sh 'cd build && make check -j4 || true'
21+
sh 'cd build && cp -pr test /job/'
22+
sh 'cd build && make benchmark -j4'
23+
sh 'cd build && make install'
24+
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
25+
sh 'cd build && python ../script/validators/jdbc_validator.py'
26+
}
1027
}
11-
}
12-
}
1328

14-
stage('Test') {
15-
steps {
16-
dir('build') {
17-
// the LD_PRELOADs are necessary because our Jenkins uses its own which will otherwise disrupt ASan
18-
sh 'LD_PRELOAD="" make -j4 check > /dev/null'
19-
step([$class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1, thresholds: [[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: ''], [$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']], tools: [[$class: 'GoogleTestType', deleteOutputFiles: true, failIfNotNew: true, pattern: 'test/*_test.xml', skipNoTestFiles: false, stopProcessingIfError: true]]])
20-
sh 'make install'
21-
sh 'LD_PRELOAD="" bash ../script/testing/psql/psql_test.sh || echo "failed, continuing"' // sometimes core dumps
22-
sh 'LD_PRELOAD="" python ../script/validators/jdbc_validator.py'
29+
stage('Ubuntu Xenial/gcc-5.4.0/llvm-3.7.1 (Release)') {
30+
agent { docker { image 'ubuntu:xenial' } }
31+
steps {
32+
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
33+
sh 'python ./script/validators/source_validator.py'
34+
sh 'mkdir build'
35+
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
36+
}
2337
}
24-
}
25-
}
2638

27-
stage('Release target builds') {
28-
parallel {
29-
stage('Ubuntu Trusty') {
30-
agent { dockerfile { filename 'script/docker/ubuntu-trusty/Dockerfile-jenkins' } }
31-
steps { sh 'echo Ubuntu Trusty' }
32-
}
33-
34-
stage('Fedora 26') {
35-
agent { dockerfile { filename 'script/docker/fedora26/Dockerfile-jenkins' } }
36-
steps { sh 'echo Fedora 26' }
39+
stage('Ubuntu Trusty/gcc-4.8.4/llvm-3.7.1 (Debug/Test/LOG_LEVEL_TRACE)') {
40+
agent { docker { image 'ubuntu:trusty' } }
41+
steps {
42+
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
43+
sh 'python ./script/validators/source_validator.py'
44+
sh 'mkdir build'
45+
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False -DUSE_SANITIZER=Address -DCMAKE_CXX_FLAGS="-DLOG_LEVEL=LOG_LEVEL_TRACE" .. && make -j4'
46+
// redirect output to /dev/null because it is voluminous
47+
// sh 'cd build && make check -j4 > /dev/null || true'
48+
// sh 'cd build && make benchmark -j4'
49+
// sh 'cd build && make install'
50+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
51+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
52+
}
3753
}
3854

39-
stage('Fedora 27') {
40-
agent { dockerfile { filename 'script/docker/fedora27/Dockerfile-jenkins' } }
41-
steps { sh 'echo Fedora 27' }
55+
stage('Ubuntu Trusty/gcc-4.8.4/llvm-3.7.1 (Release)') {
56+
agent { docker { image 'ubuntu:trusty' } }
57+
steps {
58+
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
59+
sh 'python ./script/validators/source_validator.py'
60+
sh 'mkdir build'
61+
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
62+
}
4263
}
4364

44-
stage('CentOS 7') {
45-
agent { dockerfile { filename 'script/docker/centos7/Dockerfile-jenkins' } }
46-
steps { sh 'echo CentOS 7' }
47-
}
65+
// stage('Debian Stretch/gcc-6.3.0/llvm-3.8.1 (Debug/Test)') {
66+
// agent { docker { image 'debian:stretch' } }
67+
// steps {
68+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
69+
// sh 'python ./script/validators/source_validator.py'
70+
// sh 'mkdir build'
71+
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False -DUSE_SANITIZER=Address .. && make -j4'
72+
// sh 'cd build && make check -j4 || true'
73+
// sh 'cd build && make benchmark -j4'
74+
// sh 'cd build && make install'
75+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
76+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
77+
// }
78+
// }
79+
80+
// stage('Debian Stretch/gcc-6.3.0/llvm-3.8.1 (Release)') {
81+
// agent { docker { image 'debian:stretch' } }
82+
// steps {
83+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
84+
// sh 'python ./script/validators/source_validator.py'
85+
// sh 'mkdir build'
86+
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
87+
// }
88+
// }
89+
90+
// stage('Fedora 26/gcc-7.1.1/llvm-4.0.1 (Debug)') {
91+
// agent { docker { image 'fedora:26' } }
92+
// steps {
93+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
94+
// sh 'python ./script/validators/source_validator.py'
95+
// sh 'mkdir build'
96+
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
97+
// }
98+
// }
99+
100+
// stage('Fedora 26/gcc-7.1.1/llvm-4.0.1 (Release)') {
101+
// agent { docker { image 'fedora:26' } }
102+
// steps {
103+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
104+
// sh 'python ./script/validators/source_validator.py'
105+
// sh 'mkdir build'
106+
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
107+
// }
108+
// }
109+
110+
// stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Debug)') {
111+
// agent { docker { image 'fedora:27' } }
112+
// steps {
113+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
114+
// sh 'python ./script/validators/source_validator.py'
115+
// sh 'mkdir build'
116+
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
117+
// }
118+
// }
119+
120+
// stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Release)') {
121+
// agent { docker { image 'fedora:27' } }
122+
// steps {
123+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
124+
// sh 'python ./script/validators/source_validator.py'
125+
// sh 'mkdir build'
126+
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
127+
// }
128+
// }
129+
130+
// stage('CentOS 7/gcc-4.8.5/llvm-3.9.1 (Debug)') {
131+
// agent { docker { image 'centos:7' } }
132+
// steps {
133+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
134+
// sh 'python ./script/validators/source_validator.py'
135+
// sh 'mkdir build'
136+
// sh 'cd build && cmake3 -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
137+
// }
138+
// }
139+
140+
// stage('CentOS 7/gcc-4.8.5/llvm-3.9.1 (Release)') {
141+
// agent { docker { image 'centos:7' } }
142+
// steps {
143+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
144+
// sh 'python ./script/validators/source_validator.py'
145+
// sh 'mkdir build'
146+
// sh 'cd build && cmake3 -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
147+
// }
148+
// }
149+
// end gcc builds
150+
151+
// begin clang builds
152+
// stage('Ubuntu Xenial/clang-3.7.1/llvm-3.7.1 (Debug)') {
153+
// agent { docker { image 'ubuntu:xenial' } }
154+
// steps {
155+
// sh 'sudo /bin/bash -c "source ./peloton/script/installation/packages.sh"'
156+
// sh 'python ./script/validators/source_validator.py'
157+
// sh 'mkdir build'
158+
// sh 'cd build && CC=clang-3.7 CXX=clang++-3.7 cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4 && make install'
159+
// }
160+
// }
161+
162+
// stage('Ubuntu Xenial/clang-3.7.1/llvm-3.7.1 (Release)') {
163+
// agent { docker { image 'ubuntu:xenial' } }
164+
// steps {
165+
// sh 'sudo /bin/bash -c "source ./peloton/script/installation/packages.sh"'
166+
// sh 'python ./script/validators/source_validator.py'
167+
// sh 'mkdir build'
168+
// sh 'cd build && CC=clang-3.7 CXX=clang++-3.7 cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install'
169+
// }
170+
// }
171+
172+
// stage('Ubuntu Trusty/clang-3.7.1/llvm-3.7.1 (Debug)') {
173+
// agent { docker { image 'ubuntu:trusty' } }
174+
// steps {
175+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
176+
// sh 'python ./script/validators/source_validator.py'
177+
// sh 'mkdir build'
178+
// sh 'cd build && CC=clang-3.7 CXX=clang++-3.7 cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
179+
// }
180+
// }
181+
182+
// stage('Ubuntu Trusty/clang-3.7.1/llvm-3.7.1 (Release)') {
183+
// agent { docker { image 'ubuntu:trusty' } }
184+
// steps {
185+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
186+
// sh 'python ./script/validators/source_validator.py'
187+
// sh 'mkdir build'
188+
// sh 'cd build && CC=clang-3.7 CXX=clang++-3.7 cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
189+
// }
190+
// }
191+
192+
// stage('Fedora 26/clang-4.0.1/llvm-4.0.1 (Debug)') {
193+
// agent { docker { image 'fedora:26' } }
194+
// steps {
195+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
196+
// sh 'python ./script/validators/source_validator.py'
197+
// sh 'mkdir build'
198+
// sh 'cd build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
199+
// }
200+
// }
201+
202+
// stage('Fedora 26/clang-4.0.1/llvm-4.0.1 (Release)') {
203+
// agent { docker { image 'fedora:26' } }
204+
// steps {
205+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
206+
// sh 'python ./script/validators/source_validator.py'
207+
// sh 'mkdir build'
208+
// sh 'cd build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
209+
// }
210+
// }
211+
212+
// stage('Fedora 27/clang-4.0.1/llvm-4.0.1 (Debug)') {
213+
// agent { docker { image 'fedora:27' } }
214+
// steps {
215+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
216+
// sh 'python ./script/validators/source_validator.py'
217+
// sh 'mkdir build'
218+
// sh 'cd build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
219+
// }
220+
// }
221+
222+
// stage('Fedora 27/clang-4.0.1/llvm-4.0.1 (Release)') {
223+
// agent { docker { image 'fedora:27' } }
224+
// steps {
225+
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
226+
// sh 'python ./script/validators/source_validator.py'
227+
// sh 'mkdir build'
228+
// sh 'cd build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
229+
// }
230+
// }
231+
232+
// Omit this configuration for now since the corresponding version of clang does not seem to be available on this platform
233+
// stage('CentOS 7/clang-??/llvm-3.9.1') {
234+
// agent { docker { image 'centos:7' } }
235+
// steps {
236+
// sh 'lsb_release -a'
237+
// }
238+
// }
239+
// end clang builds
240+
}
241+
}
242+
}
243+
244+
// Process test results from the first build stage
245+
post {
246+
always {
247+
dir("${WORKSPACE}/../builds/${BUILD_ID}") {
248+
step([$class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1, thresholds: [[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: ''], [$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']], tools: [[$class: 'GoogleTestType', deleteOutputFiles: true, failIfNotNew: true, pattern: 'test/*_test.xml', skipNoTestFiles: false, stopProcessingIfError: true]]])
48249
}
49250
}
50251
}

script/docker/debian-stretch/Dockerfile-jenkins

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ RUN mkdir /peloton/build && cd /peloton/build && cmake -DCMAKE_BUILD_TYPE=Debug
1212
RUN echo -n "Peloton Release build with "; g++ --version | head -1
1313
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install
1414

15-
RUN echo -n "Peloton Debug build with "; clang++-3.7 --version | head -1
16-
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && CC=clang-3.7 CXX=clang++-3.7 cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4 && make install
15+
RUN echo -n "Peloton Debug build with "; clang++ --version | head -1
16+
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4 && make install
1717

18-
RUN echo -n "Peloton Release build with "; clang++-3.7 --version | head -1
19-
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && CC=clang-3.7 CXX=clang++-3.7 cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install
18+
RUN echo -n "Peloton Release build with "; clang++ --version | head -1
19+
RUN rm -rf /peloton/build && mkdir /peloton/build && cd /peloton/build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install

script/installation/packages.sh

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,33 @@ if [ "$DISTRO" = "UBUNTU" ]; then
8686
libedit-dev \
8787
postgresql-client
8888

89+
## ------------------------------------------------
90+
## DEBIAN
91+
## ------------------------------------------------
92+
elif [ "$DISTRO" = "DEBIAN OS" ]; then
93+
sudo apt-get -qq --ignore-missing -y install \
94+
git \
95+
g++ \
96+
clang \
97+
cmake \
98+
libgflags-dev \
99+
libprotobuf-dev \
100+
protobuf-compiler \
101+
bison \
102+
flex \
103+
libevent-dev \
104+
libboost-dev \
105+
libboost-thread-dev \
106+
libboost-filesystem-dev \
107+
libjemalloc-dev \
108+
libssl-dev \
109+
valgrind \
110+
lcov \
111+
libpqxx-dev \
112+
llvm-dev \
113+
libedit-dev \
114+
postgresql-client
115+
89116
## ------------------------------------------------
90117
## FEDORA
91118
## ------------------------------------------------
@@ -156,7 +183,7 @@ elif [[ "$DISTRO" == *"REDHAT"* ]] && [[ "${DISTRO_VER%.*}" == "7" ]]; then
156183
git \
157184
gcc-c++ \
158185
make \
159-
cmake \
186+
cmake3 \
160187
flex \
161188
bison \
162189
libevent-devel \

0 commit comments

Comments
 (0)