2019-04-02 22:57:02 +08:00
|
|
|
parameters:
|
|
|
|
toolchain: 'nightly'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- bash: |
|
2019-04-02 22:58:12 +08:00
|
|
|
set -e
|
2019-04-02 22:57:02 +08:00
|
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN
|
2019-04-02 22:58:12 +08:00
|
|
|
echo "##vso[task.prependpath]$HOME/.cargo/bin"
|
2019-04-02 22:57:02 +08:00
|
|
|
displayName: Install rust
|
|
|
|
condition: ne( variables['Agent.OS'], 'Windows_NT' )
|
|
|
|
env:
|
|
|
|
TOOLCHAIN: ${{ parameters.toolchain }}
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
curl -sSf -o rustup-init.exe https://win.rustup.rs
|
2019-04-03 03:12:19 +08:00
|
|
|
rustup-init.exe -y --default-toolchain %TOOLCHAIN%-%TARGET%
|
2019-04-02 22:58:12 +08:00
|
|
|
echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
|
2019-04-02 22:57:02 +08:00
|
|
|
displayName: Install rust
|
|
|
|
condition: eq( variables['Agent.OS'], 'Windows_NT' )
|
|
|
|
env:
|
|
|
|
TOOLCHAIN: ${{ parameters.toolchain }}
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
rustc -Vv
|
|
|
|
cargo -V
|
|
|
|
displayName: Query rust and cargo versions
|