jobs:
- job: style
displayName: Style linting
pool:
vmImage: ubuntu-latest
continueOnError: true
steps:
- template: install-rust.yml@templates
parameters:
rust: nightly-2020-05-15
components:
- rustfmt
- clippy
- script: cargo fmt --all -- --check
displayName: cargo fmt --check
- script: cargo clippy --all
displayName: cargo clippy -- -D warnings
- job: main
displayName: Compile and test
dependsOn: []
strategy:
matrix:
Linux:
vmImage: ubuntu-latest
rust: nightly-2020-05-15
MacOS:
vmImage: macOS-10.15
rust: nightly-2020-05-15
Windows:
vmImage: windows-2019
rust: nightly-2020-05-15
pool:
vmImage: $(vmImage)
continueOnError: true
steps:
- template: install-rust.yml@templates
parameters:
rust: $(rust)
- script: cargo install cargo-hack
displayName: install cargo-hack
- script: cargo hack check --feature-powerset --no-dev-deps
displayName: cargo hack
- script: cargo test --all-features
displayName: cargo test
- script: cargo doc --no-deps
displayName: cargo doc
resources:
repositories:
- repository: templates
type: github
name: crate-ci/azure-pipelines
ref: refs/heads/v0.4
endpoint: jonhoo