Skip to content

[release/v7.6.5] Produce min-size package for arm64 architecture - #27798

Merged
Justin Chung (jshigetomi) merged 1 commit into
PowerShell:release/v7.6.5from
jshigetomi:backport/release/v7.6.5/27646-0f5310034
Aug 10, 2026
Merged

[release/v7.6.5] Produce min-size package for arm64 architecture#27798
Justin Chung (jshigetomi) merged 1 commit into
PowerShell:release/v7.6.5from
jshigetomi:backport/release/v7.6.5/27646-0f5310034

Conversation

@jshigetomi

Copy link
Copy Markdown
Collaborator

Backport of #27646 to release/v7.6.5

Triggered by Justin Chung (@jshigetomi) on behalf of Dongbo Wang (@daxian-dbw)

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Release build and packaging pipelines must produce, sign, stage, and upload the new arm64 min-size artifacts.

Customer Impact

  • Customer reported
  • Found internally

Adds the requested arm64 min-size package and ensures the arm64 Debian package is downloaded for release publishing.

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Imported tools/packaging/packaging.psd1 and resolved Start-PSPackage successfully; validated PowerShell syntax and confirmed the backport diff has no whitespace errors or conflict markers.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

The change updates shared cross-platform packaging pipelines and package type dispatch, but is a direct backport of the merged master change with conflicts limited to preserving existing release-branch Windows package handling.

Merge Conflicts

Resolved conflicts in Windows package/sign templates by preserving release/v7.6.5 MSI and EXE artifact handling while using wildcard matching for architecture-specific fxdependent and min-size package types. Preserved MSI as an accepted packaging type while replacing min-size with min-size-x64 and min-size-arm64.

@jshigetomi
Justin Chung (jshigetomi) requested a review from a team as a code owner August 10, 2026 16:20
Copilot AI lite review requested due to automatic review settings August 10, 2026 16:20
@jshigetomi Justin Chung (jshigetomi) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Aug 10, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backports the build/packaging pipeline updates needed to produce min-size packages for both x64 and arm64 (including proper artifact staging/downloading) on the release/v7.6.5 branch.

Changes:

  • Replaces the single min-size package type with min-size-x64 and min-size-arm64 in packaging dispatch.
  • Extends minimal-size build support to additional runtimes (linux-arm64, win-arm64, osx-arm64) and aligns pipeline stages to build/package both min-size architectures.
  • Updates release upload/downloading templates to include the new artifacts (and ensures arm64 deb is downloaded for publishing).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/packaging/packaging.psm1 Adds new min-size package types and runtime selection/dispatch updates for arm64.
tools/packaging/packaging.psd1 Stops exporting removed AzDevOps linux packaging helper functions.
build.psm1 Expands allowed -ForMinimalSize runtimes; clarifies dotnet run arg parsing with --.
.pipelines/templates/uploadToAzure.yml Downloads arm64 deb and splits minSize artifact downloads into x64/arm64.
.pipelines/templates/stages/PowerShell-Packages-Stages.yml Adds separate Windows package/sign stages for x64/arm64 min-size; adds Linux arm64 min-size packaging job.
.pipelines/templates/stages/PowerShell-Coordinated_Packages-Stages.yml Adds coordinated builds for linux-arm64 minSize and windows arm64 minSize.
.pipelines/templates/packaging/windows/sign.yml Maps new runtime keys to min-size package types and adjusts zip/min-size detection logic.
.pipelines/templates/packaging/windows/package.yml Updates coordinated-build artifact download logic and runtime mapping for min-size variants.
.pipelines/templates/linux-package-build.yml Adds min-size-x64/min-size-arm64 mappings and limits LTS rebuild to deb/rpm only.
Suppressed comments (1)

.pipelines/templates/packaging/windows/package.yml:112

  • After downloading the min-size build artifact, the script constructs paths using ${runtime} (e.g. drop_windows_build_windows_x64_minsize). The coordinated build job name uses minSize, so these paths will not exist and will throw when validating pwsh.exe. Build the artifact folder name from the architecture plus the canonical minSize suffix instead of ${runtime}.
      $signedFilesPath, $psoptionsFilePath = if ($runtime.Contains('minsize')) {
          "$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_${runtime}\$signedFolder"
          "$(Pipeline.Workspace)\CoOrdinatedBuildPipeline\drop_windows_build_windows_${runtime}\psoptions\psoptions.json"
        }
        else {

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +198 to 201
if ($packageTypes -contains 'zip' -or $packageTypes -like 'fxdependent*' -or $packageTypes -like 'min-size*') {
Write-Verbose -Verbose "signed zipPkgPath: $zipPkgPath"
Copy-Item -Path $zipPkgPath -Destination '$(ob_outputDirectory)' -Force -Verbose
}
Comment on lines 68 to +71
- download: CoOrdinatedBuildPipeline
artifact: drop_windows_build_windows_x64_${{ parameters.runtime }}
artifact: drop_windows_build_windows_${{ parameters.runtime }}
displayName: Download minsize signed artifacts
condition: ${{ eq(parameters.runtime, 'minSize') }}
condition: ${{ contains(parameters.runtime, 'minsize') }}
Comment thread tools/packaging/packaging.psm1
@jshigetomi
Justin Chung (jshigetomi) enabled auto-merge (squash) August 10, 2026 16:38
@jshigetomi
Justin Chung (jshigetomi) merged commit 1d649cc into PowerShell:release/v7.6.5 Aug 10, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants