azure-install-rust.yml 779 B

1234567891011121314151617181920212223242526
  1. parameters:
  2. toolchain: 'nightly'
  3. steps:
  4. - bash: |
  5. set -e
  6. curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $TOOLCHAIN
  7. echo "##vso[task.prependpath]$HOME/.cargo/bin"
  8. displayName: Install rust
  9. condition: ne( variables['Agent.OS'], 'Windows_NT' )
  10. env:
  11. TOOLCHAIN: ${{ parameters.toolchain }}
  12. - script: |
  13. curl -sSf -o rustup-init.exe https://win.rustup.rs
  14. rustup-init.exe -y --default-toolchain %TOOLCHAIN%-%TARGET%
  15. echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
  16. displayName: Install rust
  17. condition: eq( variables['Agent.OS'], 'Windows_NT' )
  18. env:
  19. TOOLCHAIN: ${{ parameters.toolchain }}
  20. - script: |
  21. rustc -Vv
  22. cargo -V
  23. displayName: Query rust and cargo versions