mirror of https://github.com/ctz/rustls
Import rustup.yml and deal with preexisting rustup
This commit is contained in:
parent
425d609c7d
commit
6a47cd5cb4
|
@ -17,14 +17,14 @@ jobs:
|
|||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
steps:
|
||||
- template: az-pipeline/unstable/rustup.yml@templates
|
||||
- template: admin/pipelines/rustup.yml
|
||||
- template: admin/pipelines/cargo-steps.yml
|
||||
- template: admin/pipelines/bench.yml
|
||||
- job: MacOS
|
||||
pool:
|
||||
vmImage: macOS-10.13
|
||||
steps:
|
||||
- template: az-pipeline/unstable/rustup.yml@templates
|
||||
- template: admin/pipelines/rustup.yml
|
||||
- template: admin/pipelines/cargo-steps.yml
|
||||
- template: admin/pipelines/bench.yml
|
||||
- job: Linux
|
||||
|
@ -41,7 +41,7 @@ jobs:
|
|||
minimum:
|
||||
rustup_toolchain: ${{ variables.minimum_toolchain }}
|
||||
steps:
|
||||
- template: az-pipeline/unstable/rustup.yml@templates
|
||||
- template: admin/pipelines/rustup.yml
|
||||
parameters:
|
||||
rustup_toolchain: $(rustup_toolchain)
|
||||
- template: admin/pipelines/cargo-steps.yml
|
||||
|
@ -54,7 +54,7 @@ jobs:
|
|||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
steps:
|
||||
- template: az-pipeline/unstable/rustup.yml@templates
|
||||
- template: admin/pipelines/rustup.yml
|
||||
parameters:
|
||||
rustup_toolchain: nightly
|
||||
- template: admin/pipelines/coverage.yml
|
||||
|
@ -65,7 +65,7 @@ jobs:
|
|||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
steps:
|
||||
- template: az-pipeline/unstable/rustup.yml@templates
|
||||
- template: admin/pipelines/rustup.yml
|
||||
parameters:
|
||||
rustup_toolchain: nightly
|
||||
- template: admin/pipelines/min-versions.yml
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
parameters:
|
||||
rustup_toolchain: 'stable'
|
||||
rustup_target: ''
|
||||
components: []
|
||||
|
||||
steps:
|
||||
# Linux and macOS.
|
||||
- script: |
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
|
||||
export PATH=$PATH:$HOME/.cargo/bin
|
||||
rustup default ${{ parameters.rustup_toolchain }}
|
||||
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
|
||||
condition: ne( variables['Agent.OS'], 'Windows_NT' )
|
||||
displayName: Install rust
|
||||
# Windows.
|
||||
- script: |
|
||||
curl -sSf -o rustup-init.exe https://win.rustup.rs
|
||||
rustup-init.exe -y --default-toolchain none
|
||||
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
|
||||
rustup default ${{ parameters.rustup_toolchain }}
|
||||
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
|
||||
condition: eq( variables['Agent.OS'], 'Windows_NT' )
|
||||
displayName: Install rust (windows)
|
||||
# All platforms.
|
||||
- script: |
|
||||
rustc -Vv
|
||||
cargo -V
|
||||
displayName: Query rust and cargo versions
|
||||
- ${{ if ne(parameters.rustup_target, '') }}:
|
||||
- script: |
|
||||
rustup target add ${{ parameters.rustup_target }}
|
||||
displayName: Install support for ${{ parameters.rustup_target }}
|
||||
- ${{ each component in parameters.components }}:
|
||||
- script: |
|
||||
rustup component add ${{ component }}
|
||||
displayName: Install ${{ component }}
|
Loading…
Reference in New Issue