mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
[release/v7.5] Add log grouping to build.psm1 for collapsible GitHub Actions logs (#26810)
This commit is contained in:
@@ -56,7 +56,8 @@ jobs:
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
- run: |
|
||||
Get-ChildItem -Path env: | Out-String -width 9999 -Stream | write-Verbose -Verbose
|
||||
Import-Module .\tools\ci.psm1
|
||||
Show-Environment
|
||||
name: Capture Environment
|
||||
shell: pwsh
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ jobs:
|
||||
# Set job outputs to values from filter step
|
||||
outputs:
|
||||
source: ${{ steps.filter.outputs.source }}
|
||||
buildModuleChanged: ${{ steps.filter.outputs.buildModuleChanged }}
|
||||
packagingChanged: ${{ steps.filter.outputs.packagingChanged }}
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -68,7 +69,7 @@ jobs:
|
||||
name: Build PowerShell
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
@@ -82,7 +83,7 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -99,7 +100,7 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -116,7 +117,7 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -133,7 +134,7 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -149,7 +150,7 @@ jobs:
|
||||
name: xUnit Tests
|
||||
needs:
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
uses: ./.github/workflows/xunit-tests.yml
|
||||
with:
|
||||
runner_os: ubuntu-latest
|
||||
|
||||
@@ -51,6 +51,7 @@ jobs:
|
||||
# Set job outputs to values from filter step
|
||||
outputs:
|
||||
source: ${{ steps.filter.outputs.source }}
|
||||
buildModuleChanged: ${{ steps.filter.outputs.buildModuleChanged }}
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
@@ -63,9 +64,9 @@ jobs:
|
||||
|
||||
ci_build:
|
||||
name: Build PowerShell
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-15-large
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
@@ -78,8 +79,8 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
runs-on: macos-latest
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: macos-15-large
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
@@ -95,8 +96,8 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
runs-on: macos-latest
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: macos-15-large
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
@@ -112,8 +113,8 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
runs-on: macos-latest
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: macos-15-large
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
@@ -129,8 +130,8 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
runs-on: macos-latest
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: macos-15-large
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4.1.0
|
||||
@@ -145,7 +146,7 @@ jobs:
|
||||
name: xUnit Tests
|
||||
needs:
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
uses: ./.github/workflows/xunit-tests.yml
|
||||
with:
|
||||
runner_os: macos-15-large
|
||||
@@ -155,9 +156,9 @@ jobs:
|
||||
name: macOS packaging and testing
|
||||
needs:
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on:
|
||||
- macos-latest
|
||||
- macos-15-large
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v5
|
||||
@@ -230,4 +231,4 @@ jobs:
|
||||
if: always()
|
||||
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0
|
||||
with:
|
||||
needs_context: ${{ toJson(needs) }}
|
||||
needs_context: ${{ toJson(needs) }}
|
||||
|
||||
@@ -54,6 +54,7 @@ jobs:
|
||||
# Set job outputs to values from filter step
|
||||
outputs:
|
||||
source: ${{ steps.filter.outputs.source }}
|
||||
buildModuleChanged: ${{ steps.filter.outputs.buildModuleChanged }}
|
||||
packagingChanged: ${{ steps.filter.outputs.packagingChanged }}
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -68,7 +69,7 @@ jobs:
|
||||
ci_build:
|
||||
name: Build PowerShell
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -82,7 +83,7 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -99,7 +100,7 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -116,7 +117,7 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -133,7 +134,7 @@ jobs:
|
||||
needs:
|
||||
- ci_build
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -149,7 +150,7 @@ jobs:
|
||||
name: xUnit Tests
|
||||
needs:
|
||||
- changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
uses: ./.github/workflows/xunit-tests.yml
|
||||
with:
|
||||
runner_os: windows-latest
|
||||
@@ -157,7 +158,7 @@ jobs:
|
||||
analyze:
|
||||
name: CodeQL Analysis
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.source == 'true' }}
|
||||
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
|
||||
uses: ./.github/workflows/analyze-reusable.yml
|
||||
permissions:
|
||||
actions: read
|
||||
|
||||
@@ -43,7 +43,8 @@ jobs:
|
||||
- name: Capture Environment
|
||||
if: success() || failure()
|
||||
run: |
|
||||
Get-ChildItem -Path env: | Out-String -width 9999 -Stream | write-Verbose -Verbose
|
||||
Import-Module .\tools\ci.psm1
|
||||
Show-Environment
|
||||
shell: pwsh
|
||||
|
||||
- name: Capture PowerShell Version Table
|
||||
|
||||
Reference in New Issue
Block a user