language: rust
sudo: false
language: rust
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - g++-4.8
    - libsnappy-dev
    - zlib1g-dev
    - libbz2-dev

rust:
- stable
- beta
- nightly

cache:
  directories:
    - $HOME/.cargo
    - $HOME/lib
    - $HOME/include
    - target

install:
  - env
  - |
    if [ ! -f $HOME/lib/librocksdb.so ]; then
      git clone https://github.com/facebook/rocksdb.git /tmp/rocksdb
      pushd /tmp/rocksdb
      git checkout v4.2
      mkdir -vp $HOME/lib $HOME/include
      env CXX="g++-4.8" CC="gcc-4.8" make install-shared INSTALL_PATH=$HOME
      popd
    fi

before_script:
- |
    pip install 'travis-cargo<0.2' --user &&
    export PATH=$HOME/.local/bin:$PATH

env:
  global:
    - LIBRARY_PATH=$HOME/lib
    - LD_LIBRARY_PATH=$HOME/lib

script:
- |
    travis-cargo build &&
    travis-cargo test

language: rust
sudo: false
language: rust
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - g++-4.8
    - libsnappy-dev
    - zlib1g-dev
    - libbz2-dev

rust:
- stable
- beta
- nightly

cache:
  directories:
    - $HOME/.cargo
    - $HOME/lib
    - $HOME/include
    - target

install:
  - env
  - |
    if [ ! -f $HOME/lib/librocksdb.so ]; then
      git clone https://github.com/facebook/rocksdb.git /tmp/rocksdb
      pushd /tmp/rocksdb
      git checkout v4.2
      mkdir -vp $HOME/lib $HOME/include
      env CXX="g++-4.8" CC="gcc-4.8" make install-shared INSTALL_PATH=$HOME
      popd
    fi

before_script:
- |
    pip install 'travis-cargo<0.2' --user &&
    export PATH=$HOME/.local/bin:$PATH

env:
  global:
    - LIBRARY_PATH=$HOME/lib
    - LD_LIBRARY_PATH=$HOME/lib

script:
- |
    travis-cargo build &&
    travis-cargo test

matrix:
    allow_failures:
        - rust: nightly
        - rust: beta

Deal with deps not being up to date for nightly.
Deal with deps not being up to date for nightly.
