Skip to content

Commit

Permalink
Merge branch 'release/v0.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
flier committed Jun 29, 2017
2 parents e628091 + ead8073 commit 15e060c
Show file tree
Hide file tree
Showing 13 changed files with 156 additions and 71 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.sconf_temp
.vscode
.idea
bin
build
dist
Expand Down
104 changes: 66 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,99 @@
sudo: required

dist: trusty
os:
- linux
- osx
osx_image: xcode8.2

addons:
apt:
packages: &default_packages
- automake
- autoconf
- automake
- binutils-dev
- bison
- flex
- libtool
- libc++-dev
- build-essential
- flex
- libboost-all-dev
- libevent-dev
- libssl-dev
- libc++-dev
- libcurl4-openssl-dev
- libdouble-conversion-dev
- thrift-compiler
- libdwarf-dev
- libelf-dev
- libevent-dev
- libgflags-dev
- libgoogle-glog-dev
- libiberty-dev
- libjemalloc-dev
- liblz4-dev
- liblzma-dev
- libsnappy-dev
- libssl-dev
- libtool
- libunwind8-dev
- make
- pkg-config
- thrift-compiler
- tree
- zlib1g-dev
sources: &sources
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
- llvm-toolchain-precise-3.6
- llvm-toolchain-precise-3.7
- llvm-toolchain-precise-3.8
- llvm-toolchain-precise

language: cpp
cache: ccache

cache:
directories:
- cmake-$CMAKE_VERSION-Linux-x86_64

python:
- "2.7"

env:
global:
- CMAKE_VERSION=3.7.2
- CMAKE_VERSION=3.8.2

matrix:
include:
- os: osx
- os: linux
env: COMPILER_NAME=gcc CXX=g++-5 CC=gcc-5
addons:
apt:
packages:
- *default_packages
- g++-5
sources: &sources
- llvm-toolchain-precise-3.8
- ubuntu-toolchain-r-test
- os: linux
env: COMPILER_NAME=clang CXX=clang++-3.8 CC=clang-3.8
addons:
apt:
packages:
- *default_packages
- clang-3.8
sources: *sources
fast_finish: true
include:
-
os: osx
osx_image: xcode8

-
os: linux
addons:
apt:
sources: *sources
packages:
- *default_packages
- g++-5
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"

# -
# os: linux
# addons:
# apt:
# sources: *sources
# packages:
# - *default_packages
# - clang-3.8
# env:
# - MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8 && CMAKE_CXX_FLAGS=-stdlib=libc++"

before_script:
- .travis/install-dependencies.sh

before_install:
- eval "${MATRIX_EVAL}"

script:
- which $CC
- which $CXX
- $CC --version
- $CXX --version
- mkdir build && cd build && rm -rf *
- echo travis_fold:start:cmake CMake configure
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ../cmake-$CMAKE_VERSION-Linux-x86_64/bin/cmake .. ;fi
Expand All @@ -73,8 +106,3 @@ after_failure:
- cat externals/src/Folly/folly/config.log
- cat externals/src/Thrift/config.log
- tree -h

cache:
ccache: true
directories:
- cmake-$CMAKE_VERSION-Linux-x86_64
6 changes: 3 additions & 3 deletions .travis/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ set -e

if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
brew update
brew install ccache curl double-conversion gflags glog google-benchmark gperftools rapidjson folly thrift librdkafka grpc doxygen
brew install ccache curl double-conversion gflags glog google-benchmark gperftools rapidjson folly thrift librdkafka grpc doxygen tree jemalloc
else
if [[ ! -f "cmake-$CMAKE_VERSION-Linux-x86_64/bin/cmake" ]]
then
wget --no-check-certificate https://cmake.org/files/v3.7/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
wget --no-check-certificate https://cmake.org/files/v3.8/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
tar -xvf cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
fi
fi
fi
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 3.0.0)

project(zipkin-cpp
VERSION 0.3.0
VERSION 0.3.1
LANGUAGES C CXX)

include(CTest)
Expand Down Expand Up @@ -34,9 +34,7 @@ endif()

set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

set(Boost_USE_STATIC_LIBS ON) # only find static libs
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)

find_package(Boost REQUIRED COMPONENTS regex system thread)
if(Boost_FOUND)
Expand Down Expand Up @@ -217,4 +215,4 @@ add_subdirectory(docs)
add_subdirectory(src)
add_subdirectory(test)
add_subdirectory(bench)
add_subdirectory(examples)
add_subdirectory(examples)
54 changes: 54 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!groovy

pipeline {
agent any

stages {
stage('Checkout') {
steps {
echo "Checkout branch `${env.GIT_BRANCH}` @ ${env.GIT_URL}"

checkout scm
}
}

stage('Build') {
steps {
echo "Build ${env.JOB_NAME} #${env.BUILD_ID} on ${env.JENKINS_URL}"

sh 'mkdir -p build'

dir('build') {
sh "cmake .. -DCMAKE_INSTALL_PREFIX=${env.WORKSPACE}/dist"
sh 'make'
}
}
}

stage('Test') {
steps {
echo "Test ${env.JOB_NAME} #${env.BUILD_ID}"

dir('build') {
sh 'make test'
}
}
}

stage('Deploy') {
steps {
echo "Deploy ${env.JOB_NAME} #${env.BUILD_ID}"

dir('build') {
sh 'make install'
}
}
}

stage('Cleanup') {
steps {
echo "Cleanup ${env.JOB_NAME} #${env.BUILD_ID}"
}
}
}
}
6 changes: 3 additions & 3 deletions cmake/InstallCURL.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (NOT CURL_FOUND OR USE_BUNDLED_CURL)
if (NOT CURL_VERSION_STRING OR USE_BUNDLED_CURL)
set (CURL_VERSION_STRING 7.53.1)
set (CURL_URL_MD5 9e49bb4cb275bf4464e7b69eb48613c0)
set (CURL_VERSION_STRING 7.54.1)
set (CURL_URL_MD5 21a6e5658fd55103a90b11de7b2a8a8c)
endif ()

ExternalProject_Add(CURL
Expand All @@ -28,4 +28,4 @@ if (NOT CURL_FOUND OR USE_BUNDLED_CURL)
mark_as_advanced(CURL_LIBRARIES CURL_INCLUDE_DIRS)

message(STATUS "Use bundled curl v${CURL_VERSION_STRING}")
endif ()
endif ()
14 changes: 9 additions & 5 deletions cmake/InstallFolly.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (NOT FOLLY_FOUND OR USE_BUNDLED_FOLLY)
if (NOT FOLLY_VERSION OR USE_BUNDLED_FOLLY)
set (FOLLY_VERSION 2017.03.13.00)
set (FOLLY_URL_MD5 3ba9d455edcf6e930b6f43e93e9f99f7)
set (FOLLY_VERSION 2017.06.26.01)
set (FOLLY_URL_MD5 cf7a05081adb16913b5d7039ac62d46b)
endif()

ExternalProject_Add(Folly
Expand All @@ -10,18 +10,22 @@ if (NOT FOLLY_FOUND OR USE_BUNDLED_FOLLY)
URL_MD5 ${FOLLY_URL_MD5}
CONFIGURE_COMMAND cd <SOURCE_DIR>/folly &&
autoreconf -vi &&
<SOURCE_DIR>/folly/configure
--prefix=<INSTALL_DIR>
--with-pic
--with-jemalloc
${WITH_OPENSSL}
LD_LIBRARY_PATH=<INSTALL_DIR>/lib
LD_RUN_PATH=<INSTALL_DIR>/lib
LIBRARY_PATH=<INSTALL_DIR>/lib
LDFLAGS=-L<INSTALL_DIR>/lib
PKG_CONFIG_PATH=<INSTALL_DIR>/lib/pkgconfig
CFLAGS=-I<INSTALL_DIR>/include
CXXFLAGS=-I<INSTALL_DIR>/include
CPPFLAGS=-I<INSTALL_DIR>/include
LIBS=${CMAKE_THREAD_LIBS_INIT}
OPENSSL_CFLAGS=-I${OPENSSL_INCLUDE_DIR}
OPENSSL_LIBS=-L${OPENSSL_LIBRARY_DIR}
<SOURCE_DIR>/folly/configure
--prefix=<INSTALL_DIR>
${WITH_OPENSSL}
BUILD_COMMAND cd <SOURCE_DIR>/folly &&
make
INSTALL_COMMAND cd <SOURCE_DIR>/folly &&
Expand Down
6 changes: 3 additions & 3 deletions cmake/InstallGLog.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (NOT GLOG_FOUND OR USE_BUNDLED_GLOG)
if (NOT GLOG_VERSION OR USE_BUNDLED_GLOG)
set (GLOG_VERSION 0.3.4)
set (GLOG_URL_MD5 df92e05c9d02504fb96674bc776a41cb)
set (GLOG_VERSION 0.3.5)
set (GLOG_URL_MD5 5df6d78b81e51b90ac0ecd7ed932b0d4)
endif ()

ExternalProject_Add(GLog
Expand All @@ -26,4 +26,4 @@ if (NOT GLOG_FOUND OR USE_BUNDLED_GLOG)
mark_as_advanced(GLOG_LIBRARY GLOG_INCLUDE_PATH)

message(STATUS "Use bundled glog v${GLOG_VERSION}")
endif ()
endif ()
6 changes: 3 additions & 3 deletions cmake/InstallLibRDKafka.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (NOT LIBRDKAFKA_FOUND OR USE_BUNDLED_LIBRDKAFKA)
if (NOT LibRDKafka_VERSION OR USE_BUNDLED_LIBRDKAFKA)
set (LibRDKafka_VERSION 0.9.4)
set (LibRDKafka_URL_MD5 6f40198e6068475c34ae8c9faafa6e8a)
set (LibRDKafka_VERSION 0.9.5)
set (LibRDKafka_URL_MD5 8e5685baa01554108ae8c8e9c97dc495)
endif ()

ExternalProject_Add(LibRDKafka
Expand Down Expand Up @@ -47,4 +47,4 @@ if (NOT LIBRDKAFKA_FOUND OR USE_BUNDLED_LIBRDKAFKA)
mark_as_advanced(LibRDKafka_LIBRARIES LibRDKafka_C_LIBRARIES LibRDKafka_INCLUDE_DIR)

message(STATUS "Use bundled librdkafka v${LibRDKafka_VERSION}")
endif ()
endif ()
4 changes: 2 additions & 2 deletions src/HttpCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ HttpConf::HttpConf(folly::Uri &uri)
{
if (param.first == "format")
{
message_codec = MessageCodec::parse(param.second.toStdString());
message_codec = MessageCodec::parse(folly::toStdString(param.second));
}
else if (param.first == "batch_size")
{
Expand Down Expand Up @@ -318,4 +318,4 @@ int HttpCollector::debug_callback(CURL *handle,
return 0;
}

} // namespace zipkin
} // namespace zipkin
8 changes: 4 additions & 4 deletions src/KafkaCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ KafkaConf::KafkaConf(folly::Uri &uri)
}
else
{
initial_brokers = uri.host().toStdString();
initial_brokers = folly::toStdString(uri.host());
}

folly::split("/", uri.path(), parts);
Expand All @@ -105,11 +105,11 @@ KafkaConf::KafkaConf(folly::Uri &uri)
{
if (param.first == "compression")
{
compression_codec = parse_compression_codec(param.second.toStdString());
compression_codec = parse_compression_codec(folly::toStdString(param.second));
}
else if (param.first == "format")
{
message_codec = MessageCodec::parse(param.second.toStdString());
message_codec = MessageCodec::parse(folly::toStdString(param.second));
}
else if (param.first == "batch_num_messages")
{
Expand Down Expand Up @@ -274,4 +274,4 @@ KafkaCollector *KafkaConf::create(void) const
return new KafkaCollector(producer, topic, std::move(reporter), std::move(partitioner), topic_partition, message_codec);
}

} // namespace zipkin
} // namespace zipkin
Loading

0 comments on commit 15e060c

Please sign in to comment.