Commit 876c45e4 authored by zhujiashun's avatar zhujiashun

1. add init_make_config in build_in_travis_ci.sh; 2. move compile-with-bazel into script

parent 46df9dde
......@@ -29,5 +29,4 @@ install:
#- if [[ "$USE_MESALINK" == "yes" ]]; then curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && wget https://github.com/mesalock-linux/mesalink/archive/v0.8.0.tar.gz && tar -xf v0.8.0.tar.gz && cd mesalink-0.8.0 && ./autogen.sh --prefix=/usr/ && make && sudo make install && cd - ; fi
script:
- if [[ "$PURPOSE" == "compile-with-bazel" ]]; then bazel build -j 12 -c opt --copt -DHAVE_ZLIB=1 //... ; fi
- sh build_in_travis_ci.sh
......@@ -21,6 +21,7 @@ runcmd(){
echo "build combination: PURPOSE=$PURPOSE CXX=$CXX CC=$CC"
init_make_config() {
#EXTRA_BUILD_OPTS=""
#if [ "$USE_MESALINK" = "yes" ]; then
# EXTRA_BUILD_OPTS="$EXTRA_BUILD_OPTS --with-mesalink"
......@@ -31,14 +32,19 @@ if ! sh config_brpc.sh --headers=/usr/include --libs=/usr/lib --nodebugsymbols -
echo "Fail to configure brpc"
exit 1
fi
}
if [ "$PURPOSE" = "compile" ]; then
init_make_config
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 .. && make -j4
elif [ "$PURPOSE" = "compile-with-bazel" ]; then
bazel build -j 12 -c opt --copt -DHAVE_ZLIB=1 //...
else
echo "Unknown purpose=\"$PURPOSE\""
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment