From 94226770302be8ae9e2d4268d81f8f1d2bc5fa88 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Sunkara Date: Fri, 31 Jan 2020 10:02:41 +0100 Subject: [PATCH] chore: Refactored travis config --- .travis.yml | 82 +++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 43 deletions(-) diff --git a/.travis.yml b/.travis.yml index a4271992..c6862ddc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,51 +1,47 @@ -sudo: true +os: linux language: rust -cache: - directories: - - $HOME/.cargo - - $HOME/.rustup -before_cache: - - rm -rf /home/travis/.cargo/registry -rust: - - nightly - - nightly-2019-06-18 - - beta - - stable - - 1.36.0 -matrix: - allow_failures: - - rust: nightly - include: - - rust: nightly-2019-06-18 - before_script: - - rustup component add clippy - script: cargo clippy -before_script: - - | - pip install git+git://github.com/kbknapp/travis-cargo.git --user && - export PATH=$HOME/.local/bin:$PATH - - | - if [[ "$TRAVIS_RUST_VERSION" == "1.13.0" ]]; then - echo "Old Rust detected, removing version-sync dependency" - sed -i "/^version-sync =/d" Cargo.toml - rm "tests/version-numbers.rs" - fi +cache: cargo +rust: stable +env: + global: + - SHARD=test +jobs: + allow_failures: + - rust: nightly + - env: + - SHARD=lint + fast_finish: true + include: + - os: osx + - rust: 1.33 + - rust: beta + - rust: nightly + - env: + - SHARD=lint + before_script: + - rustup component add clippy + - rustup component add rustfmt + script: + - echo "Checking codebase with Clippy release `cargo clippy --version`." + - cargo clippy --all --all-targets --all-features -- -D warnings + - cargo fmt -- --check + - env: + - SHARD=bench + script: + - cargo bench script: - - | - travis-cargo --skip nightly test -- --all --verbose --no-default-features && - travis-cargo --only nightly test -- --verbose --no-default-features && - travis-cargo --skip nightly test -- --verbose --features "yaml unstable" && - travis-cargo --only nightly test -- --verbose --features "yaml unstable nightly" && - travis-cargo --only nightly bench + - cargo test --all --no-default-features + - cargo test --all --features "yaml unstable" addons: apt: packages: - - libcurl4-openssl-dev - - libelf-dev - - libdw-dev - - cmake - - gcc - - binutils-dev + - libcurl4-openssl-dev + - libelf-dev + - libdw-dev + - cmake + - gcc + - binutils-dev + update: true after_success: - | wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&