Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated CPP Travis build script to use cached dependencies. #278

Merged
merged 1 commit into from
Mar 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions pulsar-client-cpp/travis-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,22 @@ exec_cmd() {
if [ "$3" = "all" -o "$3" = "dep" ]; then
# Install dependant packages
exec_cmd "apt-get update && apt-get install -y cmake gcc-4.4 cpp-4.4 gcc-4.4-base libssl-dev libcurl4-openssl-dev liblog4cxx10-dev libprotobuf-dev libboost1.55-all-dev libgtest-dev libxml2-utils g++-4.4";
exec_cmd "pushd $1/ && wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz && popd";
exec_cmd "pushd /usr/src/gtest && CC=gcc-4.4 CXX=g++-4.4 cmake . && make && cp *.a /usr/lib && popd";
exec_cmd "pushd $1/ && tar xvfz $1/protobuf-2.6.1.tar.gz && pushd $1/protobuf-2.6.1 && ./configure && make && make install && popd && popd";
if [ ! -f "$1/libgtest.a" ]; then
echo "Not Found: $1/libgtest.a"
exec_cmd "pushd /usr/src/gtest && CC=gcc-4.4 CXX=g++-4.4 cmake . && make && cp libgtest.a $1/ && popd";
fi
if [ ! -d "$1/protobuf-2.6.1/" ]; then
echo "Not Found: $1/protobuf-2.6.1/"
exec_cmd "pushd $1/ && wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz && popd";
exec_cmd "pushd $1/ && tar xvfz $1/protobuf-2.6.1.tar.gz && pushd $1/protobuf-2.6.1 && ./configure && make && make install && popd && popd";
else
echo "Found: $1/protobuf-2.6.1/"
exec_cmd "pushd $1/protobuf-2.6.1 && make install && popd"
fi
fi

if [ "$3" = "all" -o "$3" = "compile" ]; then
export PATH=$PATH:$1/
# Compile and run unit tests
exec_cmd "pushd $2/pulsar-client-cpp && CC=gcc-4.4 CXX=g++-4.4 cmake . && make && popd";
PULSAR_STANDALONE_CONF=$2/pulsar-client-cpp/tests/standalone.conf $2/bin/pulsar standalone &
Expand Down