Commit 412143ed authored by gejun's avatar gejun

try build matrix in .travis.yml

parent 7fd78cc0
language: cpp
compiler:
- clang
- gcc
env:
- PURPOSE=compile
- PURPOSE=unittest
sudo: required
install:
- sudo apt-get install -qq realpath libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev libgoogle-perftools-dev
- sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libgtest* /usr/lib/ && cd -
- sh config_brpc.sh --headers=/usr/include --libs=/usr/lib --nodebugsymbols
- make -j4
- sudo apt-get install -qq realpath libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev libgoogle-perftools-dev
- sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libgtest* /usr/lib/ && cd -
script:
- cd test && sh ./run_tests.sh
- sh build_in_travis_ci.sh
if [ -z "$PURPOSE" ]; then
echo "PURPOSE must be set"
exit 1
fi
if [ -z "$CXX" ]; then
echo "CXX must be set"
exit 1
fi
if [ -z "$CC" ]; then
echo "CC must be set"
exit 1
fi
echo "build combination: PURPOSE=$PURPOSE CXX=$CXX CC=$CC"
# 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
make -j4
elif [ "$PURPOSE" = "unittest" ]; then
cd test && sh ./run_tests.sh
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