Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
d101f3cb
Commit
d101f3cb
authored
Aug 15, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add separate PURPOSE for all options in ci
parent
024c9698
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
23 deletions
+23
-23
.travis.yml
.travis.yml
+8
-10
build_in_travis_ci.sh
build_in_travis_ci.sh
+15
-13
No files found.
.travis.yml
View file @
d101f3cb
...
...
@@ -7,29 +7,27 @@ compiler:
-
gcc
env
:
-
PURPOSE=compile
-
PURPOSE=unittest
-
PURPOSE=compile-with-make
-
PURPOSE=compile-with-cmake
-
PURPOSE=compile-with-bazel
-
PURPOSE=
compile USE_MESALINK=true
-
PURPOSE=
unittest USE_MESALINK=true
-
PURPOSE=compile-with-cmake
USE_MESALINK=true
-
PURPOSE=compile-with-bazel
USE_MESALINK=true
-
PURPOSE=
unittest
-
PURPOSE=
compile-with-make-all-options
-
PURPOSE=compile-with-cmake
-all-options
-
PURPOSE=compile-with-bazel
-all-options
before_script
:
-
ulimit -c unlimited -S
# enable core dumps
before_install
:
-
wget --no-clobber https://github.com/bazelbuild/bazel/releases/download/0.25.1/bazel_0.25.1-linux-x86_64.deb
-
sudo dpkg -i bazel_0.25.1-linux-x86_64.deb
-
wget --no-clobber https://github.com/bazelbuild/bazel/releases/download/0.25.1/bazel_0.25.1-linux-x86_64.deb && sudo dpkg -i bazel_0.25.1-linux-x86_64.deb
-
sudo apt-get install automake bison flex g++ git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config
# thrift dependencies
-
wget http://www.us.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz && tar -xf thrift-0.11.0.tar.gz && cd thrift-0.11.0/ && ./configure --prefix=/usr --with-rs=no --with-ruby=no --with-python=no --with-java=no --with-go=no --with-perl=no --with-php=no --with-csharp=no --with-erlang=no --with-lua=no --with-nodejs=no CXXFLAGS="-Wno-unused-variable" && make -j4 && sudo make install && cd -
install
:
-
sudo apt-get install -qq realpath libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev libgoogle-perftools-dev libboost-dev libssl-dev libevent-dev libboost-test-dev
-
sudo apt-get install -qq realpath libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev libgoogle-perftools-dev libboost-dev libssl-dev libevent-dev libboost-test-dev
libgoogle-glog-dev
-
sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo env "PATH=$PATH" cmake . && sudo make && sudo mv libgtest* /usr/lib/ && cd -
-
sudo apt-get install -y gdb
# install gdb
-
if [[ "$USE_MESALINK" == "true" ]]; then wget https://mesalink.s3-us-west-1.amazonaws.com/MesaLink-1.0.0-x86_64_trusty.deb && sudo dpkg -i MesaLink-1.0.0-x86_64_trusty.deb ; fi
# install MesaLink for trusty
-
wget https://mesalink.s3-us-west-1.amazonaws.com/MesaLink-1.0.0-x86_64_trusty.deb && sudo dpkg -i MesaLink-1.0.0-x86_64_trusty.deb
# install MesaLink for trusty
script
:
-
sh build_in_travis_ci.sh
build_in_travis_ci.sh
View file @
d101f3cb
...
...
@@ -22,27 +22,29 @@ runcmd(){
echo
"build combination: PURPOSE=
$PURPOSE
CXX=
$CXX
CC=
$CC
"
init_make_config
()
{
EXTRA_BUILD_OPTS
=
""
if
[
"
$USE_MESALINK
"
=
"true"
]
;
then
EXTRA_BUILD_OPTS
=
"
$EXTRA_BUILD_OPTS
--with-mesalink"
fi
# The default env in travis-ci is Ubuntu.
if
!
sh config_brpc.sh
--headers
=
/usr/include
--libs
=
/usr/lib
--nodebugsymbols
--cxx
=
$CXX
--cc
=
$CC
$EXTRA_BUILD_OPTS
$1
;
then
echo
"Fail to configure brpc"
exit
1
fi
# The default env in travis-ci is Ubuntu.
if
!
sh config_brpc.sh
--headers
=
/usr/include
--libs
=
/usr/lib
--nodebugsymbols
--cxx
=
$CXX
--cc
=
$CC
$@
;
then
echo
"Fail to configure brpc"
exit
1
fi
}
if
[
"
$PURPOSE
"
=
"compile"
]
;
then
if
[
"
$PURPOSE
"
=
"compile
-with-make
"
]
;
then
# In order to run thrift example, we need to add the corresponding flag
init_make_config
"--with-thrift"
&&
make
-j4
&&
sh tools/make_all_examples
elif
[
"
$PURPOSE
"
=
"unittest"
]
;
then
init_make_config
&&
cd test
&&
make
-j4
&&
sh ./run_tests.sh
elif
[
"
$PURPOSE
"
=
"compile-with-cmake"
]
;
then
rm
-rf
bld
&&
mkdir
bld
&&
cd
bld
&&
cmake
-DWITH_MESALINK
=
"
$USE_MESALINK
"
..
&&
make
-j4
rm
-rf
bld
&&
mkdir
bld
&&
cd
bld
&&
cmake ..
&&
make
-j4
elif
[
"
$PURPOSE
"
=
"compile-with-bazel"
]
;
then
bazel build
-j
12
-c
opt
--define
with_mesalink
=
"
$USE_MESALINK
"
--copt
-DHAVE_ZLIB
=
1 //...
bazel build
-j
12
-c
opt
--copt
-DHAVE_ZLIB
=
1 //...
elif
[
"
$PURPOSE
"
=
"compile-with-make-all-options"
]
;
then
init_make_config
"--with-thrift --with-glog --with-mesalink"
&&
\
make
-j4
&&
sh tools/make_all_examples
elif
[
"
$PURPOSE
"
=
"compile-with-cmake-all-options"
]
;
then
rm
-rf
bld
&&
mkdir
bld
&&
cd
bld
&&
cmake
-DWITH_MESALINK
=
ON
-DWITH_GLOG
=
ON
-DWITH_THRIFT
=
ON ..
&&
make
-j4
elif
[
"
$PURPOSE
"
=
"compile-with-bazel-all-options"
]
;
then
bazel build
-j
12
-c
opt
--define
with_mesalink
=
true
with_glog
=
true
with_thrift
=
true
--copt
-DHAVE_ZLIB
=
1 //...
else
echo
"Unknown purpose=
\"
$PURPOSE
\"
"
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment