-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bfcd74
commit 31f31e4
Showing
1 changed file
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
trigger: | ||
branches: | ||
include: ['*'] | ||
tags: | ||
include: ['*'] | ||
|
||
jobs: | ||
- job: 'Clippy' | ||
strategy: | ||
matrix: | ||
mac-stable: | ||
imageName: 'macos-10.13' | ||
rustup_toolchain: stable | ||
linux-stable: | ||
imageName: 'ubuntu-16.04' | ||
rustup_toolchain: stable | ||
pool: | ||
vmImage: $(imageName) | ||
steps: | ||
- script: | | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN | ||
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" | ||
displayName: Install rust | ||
condition: ne( variables['Agent.OS'], 'Windows_NT' ) | ||
- script: | | ||
curl -sSf -o rustup-init.exe https://win.rustup.rs | ||
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% | ||
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" | ||
displayName: Windows install rust | ||
condition: eq( variables['Agent.OS'], 'Windows_NT' ) | ||
- script: rustup component add clippy | ||
displayName: Install clippy | ||
- script: cargo clippy --all --all-targets --all-features -- -D warnings $(source ".clippy.args") | ||
displayName: Run Clippy | ||
|
||
- job: 'Rustfmt' | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
container: 'rustlang/rust:nightly' | ||
steps: | ||
- script: rustup component add rustfmt | ||
displayName: Install Rustfmt | ||
- script: cargo fmt --all -- --check | ||
displayName: Run fmt | ||
|
||
- job: 'Audit' | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
container: 'rust:latest' | ||
steps: | ||
- script: cargo install cargo-audit | ||
displayName: Install Cargo Audit | ||
- script: cargo audit | ||
displayName: Run Cargo Audit | ||
|
||
- job: 'Test' | ||
strategy: | ||
matrix: | ||
mac-minimum: | ||
imageName: 'macos-10.13' | ||
rustup_toolchain: 1.36.0 | ||
mac-stable: | ||
imageName: 'macos-10.13' | ||
rustup_toolchain: stable | ||
linux-minimum: | ||
imageName: 'ubuntu-16.04' | ||
rustup_toolchain: 1.36.0 | ||
linux-stable: | ||
imageName: 'ubuntu-16.04' | ||
rustup_toolchain: stable | ||
linux-beta: | ||
imageName: 'ubuntu-16.04' | ||
rustup_toolchain: beta | ||
pool: | ||
vmImage: $(imageName) | ||
steps: | ||
- script: | | ||
curl -sSf -o rustup-init.exe https://win.rustup.rs | ||
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% | ||
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" | ||
- script: cargo check --all --tests --examples --benches | ||
displayName: Cargo check | ||
- script: cargo build --all --tests --examples --benches | ||
displayName: Cargo build | ||
- script: cargo test --all | ||
displayName: Cargo test | ||
|