Skip to content

Commit 2402fe9

Browse files
authored
Conditionalize RustSetupSteps.yml to Non-Self-Hosted Agents (#246)
The current rust setup script embedded for package CI build will cause failures on selfhosted agent pipelines. On Windows AARCH64 agents, the failure is due to the installation of toolchain is currently specified to be x86_64, which will not succeed on AARCH64 systems in the self-host pool. In addition, the update will apply to installed cargo, which could cause conflict when multiple agents run on the same host system. On Linux agents, the failure is due to modifications made to container permissions. Self-hosted Linux agents do not use containers. The change here removes the toolchain installation steps for selfhost agent matrix builds as it assumes these systems preset the needed environment properly.
1 parent 6428fe5 commit 2402fe9

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.sync/azure_pipelines/MuDevOpsWrapper.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ jobs:
8686
{% raw %}
8787
${{ if eq(parameters.rust_build, true) }}:
8888
linux_container_options: --security-opt seccomp=unconfined
89-
extra_steps:
90-
- template: Steps/RustSetupSteps.yml@mu_devops
9189
do_ci_build: ${{ parameters.do_ci_build }}
9290
do_ci_setup: ${{ parameters.do_ci_setup }}
9391
do_pr_eval: ${{ parameters.do_pr_eval }}
@@ -100,6 +98,7 @@ jobs:
10098
tool_chain_tag: $(tool_chain_tag)
10199
vm_image: $(vm_image)
102100
container_build: ${{ parameters.container_build }}
101+
rust_build: ${{ parameters.rust_build }}
103102

104103
- ${{ if eq(parameters.rust_build, true) }}:
105104
- job: CargoCmds

Jobs/PrGate.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ parameters:
106106
# Targets: 'DEBUG,RELEASE,NO-TARGET,NOOPT'
107107
# ArchList: 'IA32,X64'
108108
# SelfHostAgent: true
109+
- name: rust_build
110+
displayName: Whether Rust code is being built
111+
type: boolean
112+
default: false
109113

110114
# Build step
111115
jobs:
@@ -136,6 +140,8 @@ jobs:
136140
options: --name mu_devops_build_container ${{ parameters.linux_container_options }}
137141

138142
steps:
143+
- ${{ if and(eq(parameters.rust_build, true), ne(item.Value.SelfHostAgent, true)) }}:
144+
- template: ../Steps/RustSetupSteps.yml
139145
- ${{ parameters.extra_steps }}
140146
- template: ../Steps/PrGate.yml
141147
parameters:

0 commit comments

Comments
 (0)