language: rust
cache: cargo
rust:
- stable
- beta
- nightly
os: linux
script:
- cargo check
if: type != push OR (tag IS blank AND branch = master)
jobs:
allow_failures:
- rust: nightly
include:
- stage: test
rust: 1.31.1 - rust: stable
os: osx - stage: lint name: "Rust: beta, rustfmt"
rust: beta
os: linux
script:
- rustup component add rustfmt-preview
- cargo fmt -v -- --check
- name: "Rust: nightly, rustfmt" rust: nightly
os: linux
script:
- rustup component add rustfmt-preview
- cargo fmt -v -- --check
- name: "Rust: beta, clippy"
rust: beta
os: linux
script:
- rustup component add clippy-preview
- touch ./src/lib.rs && cargo clippy -- -D warnings
- name: "Rust: nightly, clippy"
rust: nightly
os: linux
script:
- rustup component add clippy-preview
- touch ./src/lib.rs && cargo clippy -- -D warnings
stages:
- test
- lint