os: linux language: rust cache: cargo before_cache: - find target/debug -type f -maxdepth 1 -delete - rm -rf target/.rustc_info.json - rm -rf target/debug/examples - rm -rf target/debug/incremental - rm -rf target/tests/target/debug/incremental - rm -rf target/tests/target/debug/deps/{clap*, trybuild*} - rm -rf target/debug/{deps,.fingerpint}/clap* - find target/debug/deps -name "clap*" -exec rm -rf {} + - ls -1 examples/ | sed -e 's/\.rs$//' | xargs -I "{{}}" find target/debug/deps -name "{{}}*" -exec rm -rf {} + - ls -1 clap_derive/examples/ | sed -e 's/\.rs$//' | xargs -I "{{}}" find target/debug/deps -name "{{}}*" -exec rm -rf {} + - ls -1 tests/ | sed -e 's/\.rs$//' | xargs -I "{{}}" find target/debug/deps -name "{{}}*" -exec rm -rf {} + - ls -1 clap_derive/tests/ | sed -e 's/\.rs$//' | xargs -I "{{}}" find target/debug/deps -name "{{}}*" -exec rm -rf {} + rust: stable branches: only: # This is where pull requests from "bors r+" are built. - staging # This is where pull requests from "bors try" are built. - trying # Always build master & Enable building pull requests. - master jobs: allow_failures: - rust: nightly fast_finish: true include: - {} - rust: beta - rust: nightly cache: false script: - cargo test --no-default-features --features "std cargo" -p clap:3.0.0-beta.1 - cargo test --features "yaml unstable doc" - name: Linting (fmt + clippy) before_script: - rustup component add clippy - rustup component add rustfmt script: - echo "Checking codebase with Clippy release `cargo clippy --version`." - cargo clippy --lib --features "yaml unstable" -- -D warnings - cargo clippy --tests --examples --features "yaml unstable" -- -D warnings - cargo fmt -- --check - name: Coverage addons: apt: packages: - libssl-dev - cmake - pkg-config - zlib1g-dev update: true before_script: - cargo install cargo-tarpaulin script: - cargo tarpaulin --workspace --features "yaml unstable" --ciserver travis-ci --coveralls $TRAVIS_JOB_ID --timeout 300 script: - cargo test --no-default-features --features "std cargo" -p clap:3.0.0-beta.1 - cargo test --features "yaml unstable" notifications: email: false env: global: - secure: JLBlgHY6OEmhJ8woewNJHmuBokTNUv7/WvLkJGV8xk0t6bXBwSU0jNloXwlH7FiQTc4TccX0PumPDD4MrMgxIAVFPmmmlQOCmdpYP4tqZJ8xo189E5zk8lKF5OyaVYCs5SMmFC3cxCsKjfwGIexNu3ck5Uhwe9jI0tqgkgM3URA=