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 language: rust
cache: cache: cargo
directories: rust: stable
- $HOME/.cargo env:
- $HOME/.rustup global:
before_cache: - SHARD=test
- rm -rf /home/travis/.cargo/registry jobs:
rust: allow_failures:
- nightly - rust: nightly
- nightly-2019-06-18 - env:
- beta - SHARD=lint
- stable fast_finish: true
- 1.36.0 include:
matrix: - os: osx
allow_failures: - rust: 1.33
- rust: nightly - rust: beta
include: - rust: nightly
- rust: nightly-2019-06-18 - env:
before_script: - SHARD=lint
- rustup component add clippy before_script:
script: cargo clippy - rustup component add clippy
before_script: - rustup component add rustfmt
- | script:
pip install git+git://github.com/kbknapp/travis-cargo.git --user && - echo "Checking codebase with Clippy release `cargo clippy --version`."
export PATH=$HOME/.local/bin:$PATH - cargo clippy --all --all-targets --all-features -- -D warnings
- | - cargo fmt -- --check
if [[ "$TRAVIS_RUST_VERSION" == "1.13.0" ]]; then - env:
echo "Old Rust detected, removing version-sync dependency" - SHARD=bench
sed -i "/^version-sync =/d" Cargo.toml script:
rm "tests/version-numbers.rs" - cargo bench
fi
script: script:
- | - cargo test --all --no-default-features
travis-cargo --skip nightly test -- --all --verbose --no-default-features && - cargo test --all --features "yaml unstable"
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
addons: addons:
apt: apt:
packages: packages:
- libcurl4-openssl-dev - libcurl4-openssl-dev
- libelf-dev - libelf-dev
- libdw-dev - libdw-dev
- cmake - cmake
- gcc - gcc
- binutils-dev - binutils-dev
update: true
after_success: after_success:
- | - |
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&