You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB

steps:
- bash: |
set -e
toolchain=$TOOLCHAIN
if [ "$toolchain" = "" ]; then
toolchain=stable
fi
if command -v rustup; then
rustup update $toolchain
rustup default $toolchain
else
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
echo "##vso[task.prependpath]$HOME/.cargo/bin"
fi
displayName: Install rust (unix)
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- powershell: |
if (!$env:TOOLCHAIN) {
$env:TOOLCHAIN = "stable-${env:TARGET}";
}
if ($env:RUSTUP_HOME) {
rustup update --no-self-update $env:TOOLCHAIN
rustup default $env:TOOLCHAIN
} else {
curl.exe -sSf -o rustup-init.exe https://win.rustup.rs
./rustup-init.exe -y --default-toolchain $env:TOOLCHAIN
Write-Host "##vso[task.prependpath]${env:USERPROFILE}/.cargo/bin"
}
displayName: Install rust (windows)
failOnStderr: false
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: |
rustc -Vv
cargo -V
displayName: Query rust and cargo versions