.travis.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. language: cpp
  2. sudo: required
  3. compiler:
  4. - clang
  5. - gcc
  6. env:
  7. - PURPOSE=compile
  8. - PURPOSE=unittest
  9. - PURPOSE=compile-with-bazel
  10. - PURPOSE=compile USE_MESALINK=yes
  11. - PURPOSE=unittest USE_MESALINK=yes
  12. before_script:
  13. - ulimit -c unlimited -S # enable core dumps
  14. before_install:
  15. - wget --no-clobber https://github.com/bazelbuild/bazel/releases/download/0.8.1/bazel_0.8.1-linux-x86_64.deb
  16. - sudo dpkg -i bazel_0.8.1-linux-x86_64.deb
  17. - 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-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 && make CPPFLAGS=-DFORCE_BOOST_SMART_PTR -j 3 -s && sudo make install && cd -
  18. install:
  19. - 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
  20. - sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo env "PATH=$PATH" cmake . && sudo make && sudo mv libgtest* /usr/lib/ && cd -
  21. - sudo apt-get install -y gdb # install gdb
  22. - 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
  23. script:
  24. - if [[ "$PURPOSE" == "compile-with-bazel" ]]; then bazel build -j 12 -c opt --copt -DHAVE_ZLIB=1 //... ; fi
  25. - sh build_in_travis_ci.sh