language: rust

rust:
  - stable

cache: cargo

sudo: false

# Dependencies of kcov, used for cargo-travis
addons:
  apt:
    packages:
      - libcurl4-openssl-dev
      - libelf-dev
      - libdw-dev
      - binutils-dev
      - cmake
    sources:
      - kalakris-cmake

before_script:
  - cargo install --force cargo-travis
  - export PATH=$HOME/.cargo/bin:$PATH
  - rustup component add rustfmt-preview

script:
  - cargo fmt --all -- --write-mode=diff
  - cargo build
  - cargo test

after_success:
  - cargo coveralls

env:
  global:
    - RUST_BACKTRACE=1
