Path: blob/main/build/azure-pipelines/cli/install-rust-win32.yml
3520 views
parameters:1- name: channel2type: string3default: 1.854- name: targets5default: []6type: object78# Todo: use 1ES pipeline once extension is installed in ADO910steps:11- task: RustInstaller@112inputs:13rustVersion: ms-${{ parameters.channel }}14cratesIoFeedOverride: $(CARGO_REGISTRY)15additionalTargets: ${{ join(' ', parameters.targets) }}16toolchainFeed: https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/nuget/v3/index.json17default: true18addToPath: true19displayName: Install MSFT Rust20condition: and(succeeded(), ne(variables['CARGO_REGISTRY'], 'none'))2122- powershell: |23. build/azure-pipelines/win32/exec.ps124Invoke-WebRequest -Uri "https://win.rustup.rs" -Outfile $(Build.ArtifactStagingDirectory)/rustup-init.exe25exec { $(Build.ArtifactStagingDirectory)/rustup-init.exe -y --profile minimal --default-toolchain $env:RUSTUP_TOOLCHAIN --default-host x86_64-pc-windows-msvc }26echo "##vso[task.prependpath]$env:USERPROFILE\.cargo\bin"27env:28RUSTUP_TOOLCHAIN: ${{ parameters.channel }}29displayName: Install OSS Rust30condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))3132- powershell: |33. build/azure-pipelines/win32/exec.ps134exec { rustup default $RUSTUP_TOOLCHAIN }35exec { rustup update $RUSTUP_TOOLCHAIN }36env:37RUSTUP_TOOLCHAIN: ${{ parameters.channel }}38displayName: "Set Rust version"39condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))4041- ${{ each target in parameters.targets }}:42- script: rustup target add ${{ target }}43displayName: "Adding Rust target '${{ target }}'"44condition: and(succeeded(), eq(variables['CARGO_REGISTRY'], 'none'))4546- powershell: |47. build/azure-pipelines/win32/exec.ps148exec { rustc --version }49exec { cargo --version }50displayName: "Check Rust versions"515253