Commit 46df9dde authored by zhujiashun's avatar zhujiashun

comment mesalink

parent 8dccbb9c
...@@ -9,9 +9,10 @@ compiler: ...@@ -9,9 +9,10 @@ compiler:
env: env:
- PURPOSE=compile - PURPOSE=compile
- PURPOSE=unittest - PURPOSE=unittest
- PURPOSE=compile-with-cmake
- PURPOSE=compile-with-bazel - PURPOSE=compile-with-bazel
- PURPOSE=compile USE_MESALINK=yes #- PURPOSE=compile USE_MESALINK=yes
- PURPOSE=unittest USE_MESALINK=yes #- PURPOSE=unittest USE_MESALINK=yes
before_script: before_script:
- ulimit -c unlimited -S # enable core dumps - ulimit -c unlimited -S # enable core dumps
...@@ -25,7 +26,7 @@ install: ...@@ -25,7 +26,7 @@ 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
- 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 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 - sudo apt-get install -y gdb # install gdb
- 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 #- 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: script:
- if [[ "$PURPOSE" == "compile-with-bazel" ]]; then bazel build -j 12 -c opt --copt -DHAVE_ZLIB=1 //... ; fi - if [[ "$PURPOSE" == "compile-with-bazel" ]]; then bazel build -j 12 -c opt --copt -DHAVE_ZLIB=1 //... ; fi
......
...@@ -21,39 +21,24 @@ runcmd(){ ...@@ -21,39 +21,24 @@ runcmd(){
echo "build combination: PURPOSE=$PURPOSE CXX=$CXX CC=$CC" echo "build combination: PURPOSE=$PURPOSE CXX=$CXX CC=$CC"
EXTRA_BUILD_OPTS="" #EXTRA_BUILD_OPTS=""
if [ "$USE_MESALINK" = "yes" ]; then #if [ "$USE_MESALINK" = "yes" ]; then
EXTRA_BUILD_OPTS="$EXTRA_BUILD_OPTS --with-mesalink" # EXTRA_BUILD_OPTS="$EXTRA_BUILD_OPTS --with-mesalink"
fi #fi
# The default env in travis-ci is Ubuntu. # 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; then if ! sh config_brpc.sh --headers=/usr/include --libs=/usr/lib --nodebugsymbols --cxx=$CXX --cc=$CC $EXTRA_BUILD_OPTS; then
echo "Fail to configure brpc" echo "Fail to configure brpc"
exit 1 exit 1
fi fi
if [ "$PURPOSE" = "compile" ]; then
make -j4 && sh tools/make_all_examples
elif [ "$PURPOSE" = "unittest" ]; then
# pass the unittest from default Makefile to accelerate build process
:
else
echo "Unknown purpose=\"$PURPOSE\""
fi
echo "start building by cmake"
rm -rf bld && mkdir bld && cd bld
if [ "$PURPOSE" = "compile" ]; then if [ "$PURPOSE" = "compile" ]; then
if ! cmake ..; then make -j4 && sh tools/make_all_examples
echo "Fail to generate Makefile by cmake"
exit 1
fi
make -j4
elif [ "$PURPOSE" = "unittest" ]; then elif [ "$PURPOSE" = "unittest" ]; then
if ! cmake -DBUILD_UNIT_TESTS=ON ..; then cd test
echo "Fail to generate Makefile by cmake" make -j4 && sh ./run_tests.sh
exit 1 elif [ "$PURPOSE" = "compile-with-cmake" ]; then
fi rm -rf bld && mkdir bld && cd bld && cmake .. && make -j4
make -j4 && cd test && sh ./run_tests.sh && cd ../
else else
echo "Unknown purpose=\"$PURPOSE\"" echo "Unknown purpose=\"$PURPOSE\""
fi 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