Skip to content

Commit

Permalink
Fix Rust installation on CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Jan 26, 2020
1 parent f1296ab commit a18f558
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions ci/azure-install-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,26 @@ steps:
if command -v rustup; then
echo `command -v rustup` `rustup -V` already installed
rustup self update
elif [ "$AGENT_OS" = "Windows_NT" ]; then
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --default-toolchain $TOOLCHAIN
echo "##vso[task.prependpath]$USERPROFILE/.cargo/bin"
if brew ls rustup &>/dev/null; then
brew upgrade rustup
else
rustup self update
fi
else
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN
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 -euo pipefail
rustup update $TOOLCHAIN
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
Expand Down

0 comments on commit a18f558

Please sign in to comment.