dtmt/ci/azure-install-rust.yml
2019-08-15 19:31:31 -04:00

33 lines
No EOL
1.1 KiB
YAML

steps:
- bash: |
set -e -x
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN
source $HOME/.cargo/env
echo "##vso[task.prependpath]$HOME/.cargo/bin"
rustup --version
displayName: Install rustup
condition: eq(variables['Agent.OS'], 'Darwin')
# - script: |
# echo %TOOLCHAIN%
# curl -sSf -o rustup-init.exe https://win.rustup.rs
# rustup-init.exe -v -y --default-toolchain %TOOLCHAIN%
# echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
# rustup default %TOOLCHAIN%
# rustup component add rustfmt
# displayName: Install rust (windows)
# condition: eq(variables['Agent.OS'], 'Windows_NT')
- bash: |
set -x
rustup --version
rustup component remove --toolchain $TOOLCHAIN rust-docs || true
rustup default $TOOLCHAIN
rustup update --no-self-update $TOOLCHAIN
rustup toolchain install stable
rustup component add rustfmt --toolchain stable
displayName: Configure rust
- bash: |
set -x
rustc -Vv
cargo -Vv
cargo +stable fmt --version
displayName: Query rustc, cargo, and rustfmt versions