strategy:
matrix:
windows-stable:
imageName: 'windows-latest'
rustup_toolchain: stable
windows-beta:
imageName: 'windows-latest'
rustup_toolchain: beta
windows-nightly:
imageName: 'windows-latest'
rustup_toolchain: nightly
mac-stable:
imageName: 'macos-latest'
rustup_toolchain: stable
mac-beta:
imageName: 'macos-latest'
rustup_toolchain: beta
mac-nightly:
imageName: 'macos-latest'
rustup_toolchain: nightly
linux-stable:
imageName: 'ubuntu-latest'
rustup_toolchain: stable
linux-beta:
imageName: 'ubuntu-latest'
rustup_toolchain: beta
linux-nightly:
imageName: 'ubuntu-latest'
rustup_toolchain: nightly
pool:
vmImage: $(imageName)
steps:
- script: |
rm rust-toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
source $HOME/.cargo/env
rustc --version --verbose
displayName: install
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
rm rust-toolchain
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"
rustc --version --verbose
displayName: install (windows)
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: |
rustc --version --verbose
cargo build --verbose --all
cargo test --verbose --all --features "test" --no-run
env: { RUSTFLAGS: "-D warnings" }
displayName: build
- script: |
cargo run --verbose --example runtest
displayName: "smoke test"
enabled: false
- script: |
cargo test --verbose --features "test" --all
displayName: test
- script: |
cargo doc --no-deps --verbose --all
displayName: docs