Skip to content

Commit

Permalink
remove -a flag on stuart_build commands (#343)
Browse files Browse the repository at this point in the history
`-a` is not a first class parameter for stuart_build, so mu_devops
should not expect that it exists. If a platform has added a necessary
`-a` argument, then they can pass it to the command in mu_devops through
the `build_flags` for BuildPlatform.yml or ` extra_build_args` for
PrGate.yml
  • Loading branch information
Javagedes committed May 28, 2024
1 parent cae65aa commit 467a1ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .sync/Version.njk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#}

{# The git ref value that files dependent on this repo will use. #}
{% set mu_devops = "v9.1.9" %}
{% set mu_devops = "v10.0.0" %}

{# The latest Project Mu release branch value. #}
{% set latest_mu_release_branch = "release/202311" %}
Expand Down
14 changes: 5 additions & 9 deletions Steps/BuildPlatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ parameters:
displayName: Other Artifacts to Publish
type: string
default: ''
- name: build_arch
displayName: Architectures (e.g. IA32, X64)
type: string
default: ''
- name: build_base_tools
displayName: Build BaseTools
type: boolean
Expand Down Expand Up @@ -96,21 +92,21 @@ steps:
- task: CmdLine@2
displayName: Check if ${{ parameters.build_pkg }} Needs Testing
inputs:
script: stuart_pr_eval -c ${{ parameters.build_file }} -t ${{ parameters.build_target}} -a ${{ parameters.build_arch}} --pr-target $(pr_compare_branch) --output-count-format-string "##vso[task.setvariable variable=pkg_count]{pkgcount}"
script: stuart_pr_eval -c ${{ parameters.build_file }} -t ${{ parameters.build_target}} --pr-target $(pr_compare_branch) --output-count-format-string "##vso[task.setvariable variable=pkg_count]{pkgcount}"
condition: eq(variables['Build.Reason'], 'PullRequest')

# Setup repo
- task: CmdLine@2
displayName: Setup
inputs:
script: stuart_setup -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} -t ${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}}
script: stuart_setup -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} -t ${{ parameters.build_target}} ${{ parameters.build_flags}}
condition: and(gt(variables.pkg_count, 0), succeeded())

# Stuart Update
- task: CmdLine@2
displayName: Update
inputs:
script: stuart_update -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} -t ${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}}
script: stuart_update -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} -t ${{ parameters.build_target}} ${{ parameters.build_flags}}
condition: and(gt(variables.pkg_count, 0), succeeded())

# build basetools
Expand All @@ -128,14 +124,14 @@ steps:
- task: CmdLine@2
displayName: Build
inputs:
script: stuart_build -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}}
script: stuart_build -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} ${{ parameters.build_flags}}
condition: and(gt(variables.pkg_count, 0), succeeded())

# Run
- task: CmdLine@2
displayName: Run to Shell
inputs:
script: stuart_build -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}} ${{ parameters.run_flags }} --FlashOnly
script: stuart_build -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} ${{ parameters.build_flags}} ${{ parameters.run_flags }} --FlashOnly
condition: and(and(gt(variables.pkg_count, 0), succeeded()), eq(variables['Run'], true))
timeoutInMinutes: ${{ parameters.run_timeout }}

Expand Down
4 changes: 2 additions & 2 deletions Steps/PrGate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ steps:

- ${{ if eq(parameters.do_non_ci_build, true) }}:
- task: CmdLine@2
displayName: Build and Test ${{ parameters.build_pkgs }} ${{ parameters.build_archs}}
displayName: Build ${{ parameters.build_pkgs }}
inputs:
script: stuart_build -c ${{ parameters.build_file }} -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} ${{ parameters.extra_build_args}}
script: stuart_build -c ${{ parameters.build_file }} -p $(pkgs_to_build) -t ${{ parameters.build_targets}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} ${{ parameters.extra_build_args}}
condition: and(gt(variables.pkg_count, 0), succeeded())

- ${{ if eq(parameters.do_ci_build, true) }}:
Expand Down

0 comments on commit 467a1ca

Please sign in to comment.