Skip to content

[release/v7.5] Add log grouping to build.psm1 for collapsible GitHub Actions logs#26810

Merged
daxian-dbw merged 1 commit intoPowerShell:release/v7.5from
daxian-dbw:backport/release/v7.5/26326-cdeda2a50
Feb 13, 2026
Merged

[release/v7.5] Add log grouping to build.psm1 for collapsible GitHub Actions logs#26810
daxian-dbw merged 1 commit intoPowerShell:release/v7.5from
daxian-dbw:backport/release/v7.5/26326-cdeda2a50

Conversation

@daxian-dbw
Copy link
Member

Backport of #26326 to release/v7.5

Triggered by @daxian-dbw on behalf of @app/copilot-swe-agent

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)

Adds log grouping to build.psm1 and GitHub workflows for better CI log readability

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Successfully backported to 7.4 and 7.6. Verified log groups render correctly in GitHub Actions UI and don't affect build outcomes.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Only affects logging output formatting in build scripts and workflows. Does not change build logic or runtime behavior. Changes have been tested in 7.4 and 7.6 branches.

Merge Conflicts

Minor conflict in macos-ci.yml workflow file resolved - context differences in output section

…owerShell#26326)

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: TravisEz13 <[email protected]>
Co-authored-by: Travis Plunk <[email protected]>
Co-authored-by: Copilot <[email protected]>
@daxian-dbw daxian-dbw requested a review from a team as a code owner February 13, 2026 21:17
Copilot AI review requested due to automatic review settings February 13, 2026 21:17
@daxian-dbw daxian-dbw added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Feb 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR backports log grouping functionality from #26326 to the release/v7.5 branch, improving GitHub Actions CI log readability by adding collapsible sections to build operations. The changes wrap major build phases with Write-LogGroupStart and Write-LogGroupEnd functions, and introduce a new Show-Environment function to standardize environment variable display across workflows.

Changes:

  • Added log grouping to major build operations in build.psm1 (clean, restore, build, publish, module restore, configuration generation)
  • Created Show-Environment function in tools/ci.psm1 to consolidate environment display logic
  • Updated all GitHub Actions workflows and composite actions to use Show-Environment instead of inline commands
  • Added buildModuleChanged output to CI workflows to trigger builds/tests when build.psm1 is modified
  • Added comprehensive log grouping guidelines documentation

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
build.psm1 Added log grouping to Start-PSBuild, Install-Dotnet, and Start-PSBootstrap functions for major build phases
tools/ci.psm1 Added Show-Environment function to display environment variables in a log group
.github/workflows/windows-packaging-reusable.yml Replaced inline environment display with Show-Environment function
.github/workflows/windows-ci.yml Added buildModuleChanged output and updated job conditions to include build module changes
.github/workflows/macos-ci.yml Added buildModuleChanged output and updated job conditions (runner change is pre-existing in release/v7.5)
.github/workflows/linux-ci.yml Added buildModuleChanged output and updated job conditions to include build module changes
.github/workflows/analyze-reusable.yml Replaced inline environment display with Show-Environment function
.github/instructions/log-grouping-guidelines.instructions.md Added comprehensive documentation for log grouping best practices
.github/actions/test/windows/action.yml Replaced inline environment display with Show-Environment function
.github/actions/test/nix/action.yml Replaced inline environment display with Show-Environment function
.github/actions/test/linux-packaging/action.yml Replaced inline environment display with Show-Environment function
.github/actions/build/ci/action.yml Replaced inline environment display with Show-Environment function

@daxian-dbw daxian-dbw merged commit eab7688 into PowerShell:release/v7.5 Feb 13, 2026
31 of 35 checks passed
@daxian-dbw daxian-dbw deleted the backport/release/v7.5/26326-cdeda2a50 branch February 13, 2026 21:49
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.

4 participants