Skip to content

Commit a18f558

Browse files
committed
Fix Rust installation on CI.
1 parent f1296ab commit a18f558

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

ci/azure-install-rust.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,26 @@ steps:
66
77
if command -v rustup; then
88
echo `command -v rustup` `rustup -V` already installed
9-
rustup self update
10-
elif [ "$AGENT_OS" = "Windows_NT" ]; then
11-
curl -sSf -o rustup-init.exe https://win.rustup.rs
12-
rustup-init.exe -y --default-toolchain $TOOLCHAIN
13-
echo "##vso[task.prependpath]$USERPROFILE/.cargo/bin"
9+
10+
if brew ls rustup &>/dev/null; then
11+
brew upgrade rustup
12+
else
13+
rustup self update
14+
fi
1415
else
15-
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN
16+
curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain="$TOOLCHAIN" --profile=minimal
1617
echo "##vso[task.prependpath]$HOME/.cargo/bin"
1718
fi
1819
displayName: Install rustup
1920
2021
- bash: |
2122
set -euo pipefail
22-
23-
rustup update $TOOLCHAIN
23+
rustup set profile minimal
24+
rustup component remove --toolchain=$TOOLCHAIN rust-docs || echo "already removed"
25+
rustup update --no-self-update $TOOLCHAIN
26+
if [ "$TOOLCHAIN" = "nightly" ]; then
27+
rustup component add --toolchain=$TOOLCHAIN rustc-dev
28+
fi
2429
rustup default $TOOLCHAIN
2530
displayName: Install rust
2631

0 commit comments

Comments
 (0)