language: rust

os:
  - linux
  - osx

rust:
  - stable
  - beta
  - nightly

addons:
  apt:
    packages:
      # Dependencies needed to build kcov.
      # TODO Remove when kcov >= 34 is available in the official repositories.
      - libelf-dev
      - libdw-dev
      - binutils-dev
      - libiberty-dev

      # Dependencies of the code coverage tool.
      - jq

install:
  # needed for rustfmt
  # TODO Remove when all features used in `.rustfmt.toml` are stable.
  - rustup toolchain install nightly
  - rustup component add --toolchain nightly rustfmt-preview
  - cargo install cargo-deadlinks

script:
  - ./tools/check.sh

# TODO Do not build kcov when version >= 34 is available in the official repositories.
after_success:
  test $TRAVIS_OS_NAME = linux
  && test $TRAVIS_RUST_VERSION = stable
  && wget https://github.com/SimonKagstrom/kcov/archive/v35.tar.gz
  && tar xf v35.tar.gz
  && cd kcov-35
  && mkdir build
  && cd build
  && cmake ..
  && make
  && sudo make install
  && cd ../../
  && rm -rf kcov-35 v35.tar.gz
  && travis_wait ./tools/codecov.sh
  && bash <(curl -s https://codecov.io/bash)

language: rust

os:
  - linux
  - osx

rust:
  - stable
  - beta
  - nightly

addons:
  apt:
    packages:
      # Dependencies needed to build kcov.
      # TODO Remove when kcov >= 34 is available in the official repositories.
      - libelf-dev
      - libdw-dev
      - binutils-dev
      - libiberty-dev

      # Dependencies of the code coverage tool.
      - jq

install:
  # needed for rustfmt
  # TODO Remove when all features used in `.rustfmt.toml` are stable.
  - rustup toolchain install nightly
  - rustup component add --toolchain nightly rustfmt-preview
  - cargo install cargo-deadlinks

script:
  - ./tools/check.sh

# TODO Do not build kcov when version >= 34 is available in the official repositories.
after_success:
  test $TRAVIS_OS_NAME = linux
  && test $TRAVIS_RUST_VERSION = stable
  && wget https://github.com/SimonKagstrom/kcov/archive/v36.tar.gz
  && tar xf v36.tar.gz
  && cd kcov-36
  && mkdir build
  && cd build
  && cmake ..
  && make
  && sudo make install
  && cd ../../
  && rm -rf kcov-36 v36.tar.gz
  && travis_wait ./tools/codecov.sh
  && bash <(curl -s https://codecov.io/bash)

Update kcov version to 36.
Update kcov version to 36.
