Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/azure-pipelines/cli/install-rust-win32.yml
3520 views
1
parameters:
2
- name: channel
3
type: string
4
default: 1.85
5
- name: targets
6
default: []
7
type: object
8
9
# Todo: use 1ES pipeline once extension is installed in ADO
10
11
steps:
12
- task: RustInstaller@1
13
inputs:
14
rustVersion: ms-${{ parameters.channel }}
15
cratesIoFeedOverride: $(CARGO_REGISTRY)
16
additionalTargets: ${{ join(' ', parameters.targets) }}
17
toolchainFeed: https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/nuget/v3/index.json
18
default: true
19
addToPath: true
20
displayName: Install MSFT Rust
21
condition: and(succeeded(), ne(variables['CARGO_REGISTRY'], 'none'))
22
23
- powershell: |
24
. build/azure-pipelines/win32/exec.ps1
25
Invoke-WebRequest -Uri "https://win.rustup.rs" -Outfile $(Build.ArtifactStagingDirectory)/rustup-init.exe
26
exec { $(Build.ArtifactStagingDirectory)/rustup-init.exe -y --profile minimal --default-toolchain $env:RUSTUP_TOOLCHAIN --default-host x86_64-pc-windows-msvc }
27
echo "##vso[task.prependpath]$env:USERPROFILE\.cargo\bin"
28
env:
29
RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
30
displayName: Install OSS Rust
31
condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))
32
33
- powershell: |
34
. build/azure-pipelines/win32/exec.ps1
35
exec { rustup default $RUSTUP_TOOLCHAIN }
36
exec { rustup update $RUSTUP_TOOLCHAIN }
37
env:
38
RUSTUP_TOOLCHAIN: ${{ parameters.channel }}
39
displayName: "Set Rust version"
40
condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))
41
42
- ${{ each target in parameters.targets }}:
43
- script: rustup target add ${{ target }}
44
displayName: "Adding Rust target '${{ target }}'"
45
condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))
46
47
- powershell: |
48
. build/azure-pipelines/win32/exec.ps1
49
exec { rustc --version }
50
exec { cargo --version }
51
displayName: "Check Rust versions"
52
53