sudo: false
dist: trusty
language: rust
rust:
  - nightly
  - stable
matrix:
  allow_failures:
    - rust: stable


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

cache: cargo

before_script:
  # Install tools if not already installed
  - cargo install --list | grep clippy || cargo install clippy
  - cargo install --list | grep rustfmt || cargo install rustfmt
  - cargo install --list | grep cargo-update || cargo install cargo-update
  - cargo install --list | grep argo-travis || cargo install cargo-travis
  # Update all tools
  - cargo install-update -a || true # sometimes nightly breaks stuff, that's okay
  # Lint
  - cd core
  - cargo fmt -- --write-mode=diff
  - cargo clippy -- -Z no-trans -D clippy 


after_success:
  - cargo coveralls

sudo: false
dist: trusty
language: rust
rust:
  - nightly
  - stable
matrix:
  allow_failures:
    - rust: stable


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

cache: cargo

before_script:
  # Install tools if not already installed
  - cargo install --list | grep clippy || cargo install clippy
  - cargo install --list | grep rustfmt || cargo install rustfmt
  - cargo install --list | grep cargo-update || cargo install cargo-update
  - cargo uninstall cargo-travis
  # Update all tools
  - cargo install-update -a || true # sometimes nightly breaks stuff, that's okay
  # Lint
  - cd core
  - cargo fmt -- --write-mode=diff
  - cargo clippy -- -Z no-trans -D clippy 


after_success:
  - wget https://github.com/SimonKagstrom/kcov/archive/master.zip &&
    unzip master.zip && mv kcov-master kcov && mkdir kcov/build && cd kcov/build &&
    cmake .. && make && make install DESTDIR=../built && cd ../.. &&
    for file in ./target/debug/*; do ./kcov/built/usr/local/bin/kcov --verify --exclude-pattern=/.cargo,$PWD/target/debug/build,$PWD/tests ./target/kcov ${file}; done &&
    ./kcov/built/usr/local/bin/kcov --coveralls-id=${TRAVIS_JOB_ID} --merge ./target/kcov-merge ./target/kcov

Change code coverage upload strategy
Repo: Change code coverage upload strategy
