diff --git a/.travis.yml b/.travis.yml index d81ab5dd..026c942d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,38 @@ language: "rust" cache: "cargo" +rust: + - 1.34.2 + - stable + - beta + - nightly +jobs: + allow_failures: + - rust: nightly + fast_finish: true + before_script: - - "rustup component add rustfmt" - - "rustup component add clippy" - - "cargo install --force cargo-audit" - - "cargo generate-lockfile" + - rustup component add rustfmt + - | + if [ "$TRAVIS_RUST_VERSION" != "1.34.2" ]; then + rustup component add clippy + fi + - | + if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then + cargo install --force cargo-audit + fi + - cargo generate-lockfile script: - - "cargo audit" - - "cargo fmt --all -- --check" - - "cargo clippy --all --all-targets --all-features -- -D warnings" - - "cargo build --all --verbose" - - "cargo test --all --verbose" + - | + if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then + cargo audit + fi + - cargo fmt --all -- --check + - | + if [ "$TRAVIS_RUST_VERSION" != "1.34.2" ]; then + cargo clippy --all --all-targets --all-features -- -D warnings + fi + - cargo build --all --verbose + - cargo test --all --verbose if: "type != push OR (tag IS blank AND branch = master)" notifications: email: false diff --git a/README.md b/README.md index 2258759a..eea65d54 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ These types can be shared by client and server code for all Matrix APIs. ## Minimum Rust version -ruma-api requires Rust 1.34 or later. +ruma-api requires Rust 1.34.2 or later. ## Documentation