language: cpp

os: linux
dist: trusty
sudo: required

cache:
   directories:
     - $HOME/deps

addons:
   apt:
     sources:
       - ubuntu-toolchain-r-test
     packages:
       - libssl-dev
       - yasm
       - libgmp-dev
       - libgflags-dev
       - libsnappy-dev
       - zlib1g-dev
       - libbz2-dev
       - liblz4-dev
       - autoconf
       - libtool
       - lcov
env:
  global:
    - ENABLE_COVERAGE=Off
    - BUILD_TYPE=Debug

matrix:
   include:
    - env:
        - STATIC_ANALYSIS=false
        - RUN_CHECKS=true
        - COMPILER=gcc
        - ENABLE_COVERAGE=On
      after_success:
        - ./ci/gen_coverage.sh # get the code coverage
        - ./ci/upload_report.sh # upload the report to coveralls


before_install:
  - INSTALL_DIR=$HOME/deps
  - CPATH=$CPATH:$INSTALL_DIR/include
  - LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_DIR/lib
  - PATH=$PATH:$INSTALL_DIR/bin
  - echo $CPATH
  - echo $LD_LIBRARY_PATH
  - echo $PATH

install:
  - ./ci/install_crypto_tk_deps.sh
  - ./ci/install_grpc.sh
  - ./ci/install_rocksdb.sh
  - gem install coveralls-lcov

script:
  - ./ci/build.sh
  - if [ "${RUN_CHECKS}" == "true" ]; then ./build/test/check; fi


language: cpp

os: linux
dist: trusty
sudo: required

cache:
   directories:
     - $HOME/deps

addons:
   apt:
     sources:
       - ubuntu-toolchain-r-test
     packages:
       - libssl-dev
       - yasm
       - libgmp-dev
       - libgflags-dev
       - libsnappy-dev
       - zlib1g-dev
       - libbz2-dev
       - liblz4-dev
       - autoconf
       - libtool
       - lcov
env:
  global:
    - ENABLE_COVERAGE=Off
    - BUILD_TYPE=Debug

matrix:
   include:
    - env:
        - STATIC_ANALYSIS=false
        - RUN_CHECKS=true
        - COMPILER=gcc
        - ENABLE_COVERAGE=On
      after_success:
        - ./ci/gen_coverage.sh # get the code coverage
        - ./ci/upload_report.sh # upload the report to coveralls


before_install:
  - INSTALL_DIR=$HOME/deps
  - CPATH=$CPATH:$INSTALL_DIR/include
  - LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_DIR/lib
  - PATH=$PATH:$INSTALL_DIR/bin
  - echo $CPATH
  - echo $LD_LIBRARY_PATH
  - echo $PATH

install:
  - ./ci/install_crypto_tk_deps.sh
  - ./ci/install_grpc.sh
  - ./ci/install_rocksdb.sh
  - gem install coveralls-lcov

script:
  - ./ci/build.sh
  - if [ "${RUN_CHECKS}" == "true" ]; then cd build && ./test/check; fi


Move to the build directory when running the tests on the CI server.
Move to the build directory when running the tests on the CI server.
