mirror of
https://github.com/rust-lang/cargo
synced 2024-07-05 01:19:13 +00:00
30 lines
860 B
YAML
30 lines
860 B
YAML
steps:
|
|
- bash: |
|
|
set -e
|
|
if command -v rustup; then
|
|
echo `command -v rustup` `rustup -V` already installed
|
|
rustup self update
|
|
else
|
|
curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain="$TOOLCHAIN" --profile=minimal
|
|
echo "##vso[task.prependpath]$HOME/.cargo/bin"
|
|
fi
|
|
displayName: Install rustup
|
|
|
|
- bash: |
|
|
set -e
|
|
rustup set profile minimal
|
|
rustup component remove --toolchain=$TOOLCHAIN rust-docs || echo "already removed"
|
|
rustup update --no-self-update $TOOLCHAIN
|
|
if [ "$TOOLCHAIN" = "nightly" ]; then
|
|
rustup component add --toolchain=$TOOLCHAIN rustc-dev
|
|
fi
|
|
rustup default $TOOLCHAIN
|
|
displayName: Install rust
|
|
|
|
- bash: |
|
|
set -ex
|
|
rustup -V
|
|
rustc -Vv
|
|
cargo -V
|
|
displayName: Query rust and cargo versions
|