ShannonDing closed pull request #46: add ci(travis) URL: https://github.com/apache/rocketmq-client-cpp/pull/46
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..dbb008e0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +language: cpp +sudo: required +dist: trusty + +install: + - sudo apt-get update + - sudo apt-get install -y git gcc-4.8 g++-4.8 autoconf cmake libtool wget unzip libbz2-dev zlib1g-dev + - echo 'MAVEN_OPTS="$MAVEN_OPTS -Xmx1024m -XX:MaxPermSize=512m -XX:+BytecodeVerificationLocal"' >> ~/.mavenrc + - cat ~/.mavenrc + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export JAVA_HOME=$(/usr/libexec/java_home); fi + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then jdk_switcher use "$CUSTOM_JDK"; fi + +before_script: + - wget http://us.mirrors.quenda.co/apache/rocketmq/4.3.2/rocketmq-all-4.3.2-bin-release.zip + - unzip rocketmq-all-4.3.2-bin-release.zip + - cd rocketmq-all-4.3.2-bin-release + - perl -i -pe's/-Xms8g -Xmx8g -Xmn4g/-Xms2g -Xmx2g -Xmn1g/g' bin/runbroker.sh + - nohup sh bin/mqnamesrv & + - nohup sh bin/mqbroker -n localhost:9876 & + - sleep 10 + - ./bin/mqadmin updateTopic -b '127.0.0.1:10911' –n '127.0.0.1:9876' -t test + - ./bin/mqadmin updateSubGroup -b '127.0.0.1:10911' –n '127.0.0.1:9876' -g testGroup + - cd .. + +script: + - ./build.sh test + + +matrix: + include: + - os: linux + env: CUSTOM_JDK="oraclejdk8" \ No newline at end of file diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index 2261238e..5407fac4 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/bin/env bash # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -156,7 +156,7 @@ BuildLibevent() else wget https://github.com/libevent/libevent/archive/${fname_libevent_down} -O libevent-${fname_libevent_down} fi - unzip -o ${fname_libevent} + unzip -o ${fname_libevent} > libevent.txt 2>&1 if [ $? -ne 0 ];then exit 1 fi @@ -198,7 +198,7 @@ BuildJsonCPP() else wget https://github.com/open-source-parsers/jsoncpp/archive/${fname_jsoncpp_down} -O jsoncpp-${fname_jsoncpp_down} fi - unzip -o ${fname_jsoncpp} + unzip -o ${fname_jsoncpp} > json.txt 2>&1 if [ $? -ne 0 ];then exit 1 fi @@ -242,7 +242,7 @@ BuildBoost() else wget http://sourceforge.net/projects/boost/files/boost/${fname_boost_down} fi - tar -zxvf ${fname_boost} + tar -zxvf ${fname_boost} > boost.txt 2>&1 boost_dir=`ls | grep boost | grep .*[^gz]$` cd ${boost_dir} if [ $? -ne 0 ];then @@ -253,7 +253,8 @@ BuildBoost() exit 1 fi echo "build boost static #####################" - ./b2 cflags=-fPIC cxxflags=-fPIC --with-atomic --with-thread --with-system --with-chrono --with-date_time --with-log --with-regex --with-serialization --with-filesystem --with-locale --with-iostreams threading=multi link=static runtime-link=static release install --prefix=${install_lib_dir} + pwd + ./b2 cflags=-fPIC cxxflags=-fPIC --with-atomic --with-thread --with-system --with-chrono --with-date_time --with-log --with-regex --with-serialization --with-filesystem --with-locale --with-iostreams threading=multi link=static release install --prefix=${install_lib_dir} 1>boostMakeLog.txt if [ $? -ne 0 ];then exit 1 fi @@ -296,7 +297,7 @@ BuildGoogleTest() wget https://github.com/abseil/googletest/archive/release-1.8.1.tar.gz fi if [ ! -d "googletest-release-1.8.1" ];then - tar -zxvf release-1.8.1.tar.gz + tar -zxvf release-1.8.1.tar.gz > googletest.txt 2>&1 fi cd googletest-release-1.8.1 mkdir build; cd build ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
