blob: fd438613fc9b9980dbda26c811297c9e7a94e1e9 [file] [log] [blame]
steps:
- ${{ if not(startsWith(parameters.platform, 'Windows')) }}:
# Linux and macOS.
- script: |
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: ${{parameters.rust_version}}
displayName: Install rust
- ${{ if startsWith(parameters.platform, 'Windows') }}:
# Windows.
- script: |
echo "windows"
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: ${{parameters.rust_version}}
displayName: Install rust (windows)
# All platforms.
- bash: |
rustc -Vv
cargo -V
displayName: Query rust and cargo versions