language: rust
cache: cargo
rust:
- 1.48.0
- stable
- beta
env:
- FEATURES=
- FEATURES="--all-features"
jobs:
include:
- name: "Format"
rust: 1.48.0
before_install:
- rustup component add rustfmt && cargo fmt --version
script:
- cargo fmt --all -- --check
- name: "minimal versions, all features"
rust: 1.48.0
env: TEST_MINIMAL_VERSIONS=1 FEATURES="--all-features"
- name: "stable, minimal features"
rust: stable
env: FEATURES="--no-default-features"
- name: "stable, alloc"
rust: stable
env: FEATURES="--no-default-features --features=alloc"
- name: "stable, serde"
rust: stable
env: FEATURES="--no-default-features --features=serde"
- name: "stable, alloc+serde"
rust: stable
env: FEATURES="--no-default-features --features=serde-alloc"
exclude:
- rust: beta
env: FEATURES=
before_install:
- rustup component add clippy && cargo clippy --version
- |
if [ "${TEST_MINIMAL_VERSIONS:-0}" -ne 0 ] ; then
rustup install nightly
fi
before_script:
- |
if [ "${TEST_MINIMAL_VERSIONS:-0}" -ne 0 ] ; then
cargo +nightly update -Z minimal-versions
fi
script:
- cargo clippy ${FEATURES:-} -- --deny warnings
- cargo build --verbose --workspace ${FEATURES:-} && cargo test --verbose --workspace ${FEATURES:-}
notifications:
email: false