chore: Refactored travis config

This commit is contained in:
Pavan Kumar Sunkara 2020-01-31 10:02:41 +01:00
parent 752262ee9a
commit 9422677030

View file

@ -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 &&