mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
parameters:
|
|
- name: channel
|
|
type: string
|
|
default: 1.65.0
|
|
- name: targets
|
|
default: []
|
|
type: object
|
|
|
|
# Todo: use 1ES pipeline once extension is installed in ADO
|
|
|
|
steps:
|
|
- powershell: |
|
|
. build/azure-pipelines/win32/exec.ps1
|
|
Invoke-WebRequest -Uri "https://win.rustup.rs" -Outfile $(Build.ArtifactStagingDirectory)/rustup-init.exe
|
|
exec { $(Build.ArtifactStagingDirectory)/rustup-init.exe -y --profile minimal --default-toolchain $env:RUSTUP_TOOLCHAIN --default-host x86_64-pc-windows-msvc }
|
|
echo "##vso[task.prependpath]$env:USERPROFILE\.cargo\bin"
|
|
env:
|
|
RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
|
|
displayName: "Install Rust"
|
|
|
|
- powershell: |
|
|
. build/azure-pipelines/win32/exec.ps1
|
|
exec { rustup default $RUSTUP_TOOLCHAIN }
|
|
exec { rustup update $RUSTUP_TOOLCHAIN }
|
|
env:
|
|
RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
|
|
displayName: "Set Rust version"
|
|
|
|
- ${{ each target in parameters.targets }}:
|
|
- script: rustup target add ${{ target }}
|
|
displayName: "Adding Rust target '${{ target }}'"
|
|
|
|
- powershell: |
|
|
. build/azure-pipelines/win32/exec.ps1
|
|
exec { rustc --version }
|
|
exec { cargo --version }
|
|
exec { rustup --version }
|
|
displayName: "Check Rust versions"
|