mirror of
https://github.com/rust-lang/cargo
synced 2024-10-02 14:04:23 +00:00
30 lines
884 B
YAML
30 lines
884 B
YAML
steps:
|
|
- bash: |
|
|
set -e
|
|
if command -v rustup; then
|
|
echo `command -v rustup` `rustup -V` already installed
|
|
rustup self update
|
|
rustup set profile minimal
|
|
elif [ "$AGENT_OS" = "Windows_NT" ]; then
|
|
curl -sSf -o rustup-init.exe https://win.rustup.rs
|
|
rustup-init.exe -y --default-toolchain $TOOLCHAIN --profile=minimal
|
|
echo "##vso[task.prependpath]$USERPROFILE/.cargo/bin"
|
|
else
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN --profile=minimal
|
|
echo "##vso[task.prependpath]$HOME/.cargo/bin"
|
|
fi
|
|
displayName: Install rustup
|
|
|
|
- bash: |
|
|
set -e
|
|
rustup update $TOOLCHAIN
|
|
rustup default $TOOLCHAIN
|
|
displayName: Install rust
|
|
|
|
- bash: |
|
|
set -ex
|
|
rustup -V
|
|
rustc -Vv
|
|
cargo -V
|
|
displayName: Query rust and cargo versions
|