You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2018/12/17 13:03:09 UTC
[pulsar] branch master updated: Fixes to get the travis build
running again (#3204)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 68b5dd5 Fixes to get the travis build running again (#3204)
68b5dd5 is described below
commit 68b5dd5e1f45fcac0eb052ae3426329ae84bda78
Author: Jai Asher <ja...@ccs.neu.edu>
AuthorDate: Mon Dec 17 05:03:04 2018 -0800
Fixes to get the travis build running again (#3204)
Travis build was broken for some time now, made some fixes to get it working again.
---
.travis.yml | 15 ++++++++++-----
pulsar-client-cpp/tests/CMakeLists.txt | 3 ++-
pulsar-client-cpp/travis-build.sh | 14 +++++++-------
3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 48e79f5..e86faf2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,7 +17,12 @@
# under the License.
#
-language: java C++ ruby
+dist: trusty
+
+language: java cpp
+
+compiler: gcc
+
jdk:
- oraclejdk8
@@ -44,16 +49,16 @@ before_install:
- export PATH=$M2_HOME/bin:$PATH
install:
- - sudo bash -x $TRAVIS_BUILD_DIR/pulsar-client-cpp/travis-build.sh $HOME/pulsar-dep $TRAVIS_BUILD_DIR dep
+ - (sudo bash -x $TRAVIS_BUILD_DIR/pulsar-client-cpp/travis-build.sh $HOME/pulsar-dep $TRAVIS_BUILD_DIR dep) || exit -1
- (cd site && make travis_setup)
script:
# Build Java and C++
- - mvn license:check test package && sudo bash -x $TRAVIS_BUILD_DIR/pulsar-client-cpp/travis-build.sh $HOME/pulsar-dep $TRAVIS_BUILD_DIR compile
+ - (mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn license:check test package && sudo bash -x $TRAVIS_BUILD_DIR/pulsar-client-cpp/travis-build.sh $HOME/pulsar-dep $TRAVIS_BUILD_DIR compile) || exit -1
# Build docker images
- - docker/build.sh
+ - docker/build.sh || exit -1
# Generate website
- - (cd site && make travis_build)
+ - (cd site && make travis_build) || exit -1
deploy:
-
diff --git a/pulsar-client-cpp/tests/CMakeLists.txt b/pulsar-client-cpp/tests/CMakeLists.txt
index 8f3905b..b3bb77b 100644
--- a/pulsar-client-cpp/tests/CMakeLists.txt
+++ b/pulsar-client-cpp/tests/CMakeLists.txt
@@ -18,6 +18,7 @@
#
find_library(GMOCK_LIBRARY_PATH gmock)
+find_library(GTEST_LIBRARY_PATH gtest)
file(GLOB TEST_SOURCES *.cc)
@@ -25,4 +26,4 @@ add_executable(main ${TEST_SOURCES})
target_include_directories(main PRIVATE ${CMAKE_SOURCE_DIR}/lib)
-target_link_libraries(main ${CLIENT_LIBS} pulsarShared ${GMOCK_LIBRARY_PATH})
+target_link_libraries(main ${CLIENT_LIBS} pulsarShared ${GMOCK_LIBRARY_PATH} ${GTEST_LIBRARY_PATH})
diff --git a/pulsar-client-cpp/travis-build.sh b/pulsar-client-cpp/travis-build.sh
index 83aa1e1..ee06642 100755
--- a/pulsar-client-cpp/travis-build.sh
+++ b/pulsar-client-cpp/travis-build.sh
@@ -57,12 +57,12 @@ exec_cmd() {
}
if [ "$3" = "all" -o "$3" = "dep" ]; then
+ sudo find / -name cmake
+ sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
# Install dependant packages
- exec_cmd "apt-get update && apt-get install -y cmake libssl-dev libcurl4-openssl-dev liblog4cxx10-dev protobuf-compiler libprotobuf-dev libboost1.55-all-dev libgtest-dev libxml2-utils libjsoncpp-dev";
- if [ ! -f "$1/libgtest.a" ]; then
- echo "Not Found: $1/libgtest.a"
- exec_cmd "pushd /usr/src/gtest && cmake . && make && cp libgtest.a $1/ && popd";
- fi
+ exec_cmd "apt-get update && apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cxx10-dev protobuf-compiler libprotobuf-dev libboost1.55-all-dev libxml2-utils libjsoncpp-dev";
+ exec_cmd "apt-get remove -y cmake cmake-data && apt-get install -y cmake cmake-data"
+ exec_cmd "pushd $1/ && git clone https://github.com/google/googletest.git && pushd googletest && cmake . && make && sudo make install && popd && popd";
if [ ! -d "$1/gtest-parallel/" ]; then
echo "Not Found: $1/gtest-parallel/"
exec_cmd "pushd $1/ && git clone https://github.com/google/gtest-parallel.git && popd";
@@ -73,7 +73,7 @@ if [ "$3" = "all" -o "$3" = "compile" ]; then
export PATH=$PATH:$1/
# Compile and run unit tests
pushd $2/pulsar-client-cpp
- cmake . && make
+ cmake -DBUILD_PYTHON_WRAPPER=OFF . && make VERBOSE=1
if [ $? -ne 0 ]; then
echo "Failed to compile CPP client library"
exit 1
@@ -88,7 +88,7 @@ if [ "$3" = "all" -o "$3" = "compile" ]; then
data2/standalone/zookeeper > broker-tls.log &
auth_pid=$!;
sleep 10
- PULSAR_CLIENT_CONF=$2/pulsar-client-cpp/tests/client.conf $2/bin/pulsar-admin clusters create --url http://localhost:9765/ --url-secure https://localhost:9766/ --broker-url pulsar://localhost:9885/ --broker-url-secure pulsar+ssl://localhost:9886/ cluster
+ PULSAR_CLIENT_CONF=$2/pulsar-client-cpp/tests/client.conf $2/bin/pulsar-admin clusters create --url http://localhost:4080/ --url-secure https://localhost:8443/ --broker-url pulsar://localhost:6650/ --broker-url-secure pulsar+ssl://localhost:6651/ cluster
sleep 5
pushd $2/pulsar-client-cpp/tests
$1/gtest-parallel/gtest-parallel ./main --workers=10