[release/v7.6] Add log grouping to build.psm1 for collapsible GitHub Actions logs#26524
Merged
TravisEz13 merged 1 commit intoPowerShell:release/v7.6from Nov 24, 2025
Conversation
…owerShell#26326) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com> Co-authored-by: Travis Plunk <travis.plunk@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This is a backport of log grouping functionality from the main branch to release/v7.6. The changes add collapsible log sections to GitHub Actions workflows, making verbose build output easier to navigate. The PR includes new log grouping wrapper functions (Write-LogGroupStart and Write-LogGroupEnd) that create GitHub Actions workflow commands for collapsible sections.
Key changes:
- Added
Show-Environmentfunction totools/ci.psm1for displaying environment variables in a collapsible log group - Wrapped major build operations in
build.psm1with log groups (Install Native Dependencies, Install .NET SDK, Build PowerShell, etc.) - Updated CI workflows to trigger on
buildModuleChangedin addition to source changes, ensuring that changes tobuild.psm1trigger CI runs - Created comprehensive log grouping guidelines in
.github/instructions/log-grouping-guidelines.instructions.md - Refactored GitHub Actions to use the new
Show-Environmentfunction instead of inline environment dumping
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
build.psm1 |
Added log grouping around major build operations (bootstrap, restore, build, configuration generation, etc.) |
tools/ci.psm1 |
Added new Show-Environment function that wraps environment variable display in a log group |
.github/workflows/windows-ci.yml |
Added buildModuleChanged output and updated job conditions to trigger on build module changes |
.github/workflows/linux-ci.yml |
Added buildModuleChanged output and updated job conditions to trigger on build module changes |
.github/workflows/macos-ci.yml |
Added buildModuleChanged output and updated job conditions to trigger on build module changes |
.github/workflows/windows-packaging-reusable.yml |
Replaced inline environment capture with Show-Environment call |
.github/workflows/analyze-reusable.yml |
Replaced inline environment capture with Show-Environment call |
.github/actions/test/windows/action.yml |
Replaced inline log grouping with Show-Environment call |
.github/actions/test/nix/action.yml |
Replaced inline log grouping with Show-Environment call |
.github/actions/test/linux-packaging/action.yml |
Replaced inline environment capture with Show-Environment call |
.github/actions/build/ci/action.yml |
Replaced inline environment capture with Show-Environment call |
.github/instructions/log-grouping-guidelines.instructions.md |
New instruction file documenting best practices for using log groups in GitHub Actions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adityapatwardhan
approved these changes
Nov 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #26326 to release/v7.6
Triggered by @TravisEz13 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
Improves readability of GitHub Actions logs by creating collapsible sections. Makes it easier to navigate verbose build output.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Verified that log grouping functions (Write-LogGroupStart/Write-LogGroupEnd) work correctly in GitHub Actions workflows. Tested collapsible log sections render properly in the Actions UI. Backport tested by reviewing conflict resolution in build.psm1 to ensure v7.6 code patterns are preserved while adding log grouping.
Risk
REQUIRED: Check exactly one box.
This change only adds logging wrapper functions that create collapsible sections in GitHub Actions. The core build logic remains unchanged. Merge conflicts were minimal and only involved preserving v7.6's Scenario validation values while adding the log grouping calls.
Merge Conflicts
Conflict in build.psm1: v7.6 uses different Scenario parameter values ('Package', 'DotNet', 'Both') compared to main branch which added 'Tools' and 'All'. Resolution: Kept v7.6's existing values and added log grouping calls without changing the Scenario logic.