-
Notifications
You must be signed in to change notification settings - Fork 28
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
Showing
1 changed file
with
57 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,57 @@ | ||
trigger: | ||
branches: | ||
include: ['master', 'v2-dev'] | ||
tags: | ||
include: ['*'] | ||
|
||
jobs: | ||
- job: cargo_test | ||
strategy: | ||
matrix: | ||
Linux: | ||
vmImage: ubuntu-18.04 | ||
MacOS: | ||
vmImage: macOS-10.14 | ||
Windows: | ||
vmImage: windows-2019 | ||
pool: | ||
vmImage: $(vmImage) | ||
steps: | ||
# Linux and macOS. | ||
- script: | | ||
set -e | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN | ||
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" | ||
env: | ||
RUSTUP_TOOLCHAIN: stable | ||
displayName: "Install rust (*nix)" | ||
condition: not(eq(variables['Agent.OS'], 'Windows_NT')) | ||
# Windows. | ||
- script: | | ||
curl -sSf -o rustup-init.exe https://win.rustup.rs | ||
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN% | ||
set PATH=%PATH%;%USERPROFILE%\.cargo\bin | ||
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" | ||
env: | ||
RUSTUP_TOOLCHAIN: stable | ||
displayName: "Install rust (windows)" | ||
condition: eq(variables['Agent.OS'], 'Windows_NT') | ||
- script: | | ||
set -e | ||
echo "Rust up version" | ||
rustup -V | ||
echo "rustup installed commponents list" | ||
rustup component list --installed | ||
echo "rustup show:" | ||
rustup show | ||
echo "rustc -Vv" | ||
rustc -Vv | ||
echo "cargo -V" | ||
cargo -V | ||
displayName: Query rustup, rust and cargo versions | ||
- script: cargo test | ||
displayName: cargo test | ||
|