Skip to content

Commit fbd5c92

Browse files
githublaohuShannonDing
authored andcommitted
add ci(travis) (#46)
* add ci(travis) * add permission
1 parent 476a219 commit fbd5c92

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

.travis.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
language: cpp
2+
sudo: required
3+
dist: trusty
4+
5+
install:
6+
- sudo apt-get update
7+
- sudo apt-get install -y git gcc-4.8 g++-4.8 autoconf cmake libtool wget unzip libbz2-dev zlib1g-dev
8+
- echo 'MAVEN_OPTS="$MAVEN_OPTS -Xmx1024m -XX:MaxPermSize=512m -XX:+BytecodeVerificationLocal"' >> ~/.mavenrc
9+
- cat ~/.mavenrc
10+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export JAVA_HOME=$(/usr/libexec/java_home); fi
11+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then jdk_switcher use "$CUSTOM_JDK"; fi
12+
13+
before_script:
14+
- wget http://us.mirrors.quenda.co/apache/rocketmq/4.3.2/rocketmq-all-4.3.2-bin-release.zip
15+
- unzip rocketmq-all-4.3.2-bin-release.zip
16+
- cd rocketmq-all-4.3.2-bin-release
17+
- perl -i -pe's/-Xms8g -Xmx8g -Xmn4g/-Xms2g -Xmx2g -Xmn1g/g' bin/runbroker.sh
18+
- nohup sh bin/mqnamesrv &
19+
- nohup sh bin/mqbroker -n localhost:9876 &
20+
- sleep 10
21+
- ./bin/mqadmin updateTopic -b '127.0.0.1:10911' –n '127.0.0.1:9876' -t test
22+
- ./bin/mqadmin updateSubGroup -b '127.0.0.1:10911' –n '127.0.0.1:9876' -g testGroup
23+
- cd ..
24+
25+
script:
26+
- ./build.sh test
27+
28+
29+
matrix:
30+
include:
31+
- os: linux
32+
env: CUSTOM_JDK="oraclejdk8"

build.sh

100644100755
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/bash
1+
#!/usr/bin/env bash
22

33
# Licensed to the Apache Software Foundation (ASF) under one or more
44
# contributor license agreements. See the NOTICE file distributed with
@@ -156,7 +156,7 @@ BuildLibevent()
156156
else
157157
wget https://github.com/libevent/libevent/archive/${fname_libevent_down} -O libevent-${fname_libevent_down}
158158
fi
159-
unzip -o ${fname_libevent}
159+
unzip -o ${fname_libevent} > libevent.txt 2>&1
160160
if [ $? -ne 0 ];then
161161
exit 1
162162
fi
@@ -198,7 +198,7 @@ BuildJsonCPP()
198198
else
199199
wget https://github.com/open-source-parsers/jsoncpp/archive/${fname_jsoncpp_down} -O jsoncpp-${fname_jsoncpp_down}
200200
fi
201-
unzip -o ${fname_jsoncpp}
201+
unzip -o ${fname_jsoncpp} > json.txt 2>&1
202202
if [ $? -ne 0 ];then
203203
exit 1
204204
fi
@@ -242,7 +242,7 @@ BuildBoost()
242242
else
243243
wget http://sourceforge.net/projects/boost/files/boost/${fname_boost_down}
244244
fi
245-
tar -zxvf ${fname_boost}
245+
tar -zxvf ${fname_boost} > boost.txt 2>&1
246246
boost_dir=`ls | grep boost | grep .*[^gz]$`
247247
cd ${boost_dir}
248248
if [ $? -ne 0 ];then
@@ -253,7 +253,8 @@ BuildBoost()
253253
exit 1
254254
fi
255255
echo "build boost static #####################"
256-
./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}
256+
pwd
257+
./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
257258
if [ $? -ne 0 ];then
258259
exit 1
259260
fi
@@ -296,7 +297,7 @@ BuildGoogleTest()
296297
wget https://github.com/abseil/googletest/archive/release-1.8.1.tar.gz
297298
fi
298299
if [ ! -d "googletest-release-1.8.1" ];then
299-
tar -zxvf release-1.8.1.tar.gz
300+
tar -zxvf release-1.8.1.tar.gz > googletest.txt 2>&1
300301
fi
301302
cd googletest-release-1.8.1
302303
mkdir build; cd build

0 commit comments

Comments
 (0)