os:
- linux
- osx
sudo: true
language: rust
rust:
- 1.0.0-beta
- nightly
before_install:
    - sudo apt-get update -qq
    - sudo apt-get install -qq libcurl4-openssl-dev libelf-dev libdw-dev binutils-dev
install:
- wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
- tar xzf master.tar.gz
- mkdir kcov-master/build
- cd kcov-master/build
- cmake ..
- make
- sudo make install
- cd ../..
script:
- cargo build --verbose
- cargo test --verbose
after_success: |
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&
  cargo doc &&
  echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 2`/index.html>" > target/doc/index.html &&
  sudo pip install ghp-import &&
  ghp-import -n target/doc &&
  git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages;
  cargo clean;
  cargo test --no-run;
  kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/message_filter-*;
env:
  global:
    secure: fCU0zX/BW0MlzTcIFtVI8Ipn69ECh7iix0YFZ01H2GTpQujOieyL2lFo92rlryNKxc5ghhvcBfIOLwO42LY+hO81RiMJm1mG+SSSK/S8q4Do+WIXZei2THUx1T8tNw0E5eUGVrncXITnTSqsTA9+2GLeyQKaoPtbaPf9nQkCr8I=
