From 3e4128059d2335c2f69503ad45546548bab68a54 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 1 Jul 2025 12:57:21 -0500 Subject: [PATCH 1/6] Updated build.yml to run incremental component check before uno-check, dotnet restore and msbuild setup. Since our incremental component checks use pwsh instead of msbuild, we can save an addition 4-6 minutes of CI time by skipping these steps. --- .github/workflows/build.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2cb9a4d79..ea29d2dbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -107,13 +107,21 @@ jobs: with: submodules: recursive fetch-depth: 0 + + - name: Get changed components + run: | + $changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }}) + $buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets ${{ matrix.multitarget }} -WinUIMajorVersion ${{ matrix.winui }}) + echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV + echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV # Restore Tools from Manifest list in the Repository - name: Restore dotnet tools + if: ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }} run: dotnet tool restore - name: Run Uno Check to Install Dependencies - if: ${{ matrix.multitarget != 'wasdk' && matrix.multitarget != 'linuxgtk' && matrix.multitarget != 'wpf' }} + if: ${{ matrix.multitarget != 'wasdk' && matrix.multitarget != 'linuxgtk' && matrix.multitarget != 'wpf' && env.HAS_BUILDABLE_COMPONENTS == 'true' }} run: > dotnet tool run uno-check --ci @@ -127,15 +135,9 @@ jobs: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 + if: ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }} with: vs-version: '[17.9,)' - # Get changed components - - name: Get changed components - run: | - $changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }}) - $buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets ${{ matrix.multitarget }} -WinUIMajorVersion ${{ matrix.winui }}) - echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV - echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV # Generate full solution with all projects (sample gallery heads, components, tests) - name: Generate solution with ${{ matrix.multitarget }} gallery, components and tests From fd2ad1d6b79bff39cb8f3ea5311684b2b6d09dca Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 1 Jul 2025 13:05:10 -0500 Subject: [PATCH 2/6] Move repository checkout to first build step, incremental build now skips for dotnet sdk and machine configuration (pagefile, usermode dumps) --- .github/workflows/build.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea29d2dbc..8bf08732f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,7 +76,22 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Get changed components + run: | + $changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }}) + $buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets ${{ matrix.multitarget }} -WinUIMajorVersion ${{ matrix.winui }}) + echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV + echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV + - name: Configure Pagefile + if: ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == 'true' }} uses: al-cheb/configure-pagefile-action@v1.4 with: minimum-size: 32GB @@ -84,7 +99,7 @@ jobs: disk-root: "C:" - name: Enable User-Mode Dumps collecting - if: ${{ env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '' }} + if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && env.HAS_BUILDABLE_COMPONENTS == 'true' }} shell: powershell run: | New-Item '${{ github.workspace }}\CrashDumps' -Type Directory @@ -93,6 +108,7 @@ jobs: Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpType' -Type DWord -Value '2' - name: Install .NET SDK v${{ env.DOTNET_VERSION }} + if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.DOTNET_VERSION }} @@ -101,20 +117,6 @@ jobs: if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} run: dotnet --info - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Checkout Repository - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 - - - name: Get changed components - run: | - $changedComponents = $(./tooling/Get-Changed-Components.ps1 ${{ github.event.before }} ${{ github.event.after }}) - $buildableChangedComponents = $(./tooling/MultiTarget/Filter-Supported-Components.ps1 -Components $changedComponents -MultiTargets ${{ matrix.multitarget }} -WinUIMajorVersion ${{ matrix.winui }}) - echo "CHANGED_COMPONENTS_LIST=$(($buildableChangedComponents | ForEach-Object { "$_" }) -join ',')" >> $env:GITHUB_ENV - echo "HAS_BUILDABLE_COMPONENTS=$($buildableChangedComponents.Count -gt 0)" >> $env:GITHUB_ENV - # Restore Tools from Manifest list in the Repository - name: Restore dotnet tools if: ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }} From 4797aa38b0a00e0310a5e18b6e0207ea8649afc4 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 1 Jul 2025 15:39:59 -0500 Subject: [PATCH 3/6] Check for HAS_BUILDABLE_COMPONENTS before installing .NET SDK --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8bf08732f..fafb5a218 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,13 +108,13 @@ jobs: Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpType' -Type DWord -Value '2' - name: Install .NET SDK v${{ env.DOTNET_VERSION }} - if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} + if: ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == 'true' }} uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: .NET Info (if diagnostics) - if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} + if: ${{ env.ENABLE_DIAGNOSTICS == 'true' && env.HAS_BUILDABLE_COMPONENTS == 'true' }} run: dotnet --info # Restore Tools from Manifest list in the Repository From 70b12f4f91f308e5318f77f984881f58751a21ac Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 1 Jul 2025 15:41:02 -0500 Subject: [PATCH 4/6] Update tooling submodule to include https://github.com/CommunityToolkit/Tooling-Windows-Submodule/pull/290 --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index f31a5e488..2fac84dd1 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit f31a5e4885ea6d17b66de1f315f7589ccf53299e +Subproject commit 2fac84dd1e2b6e49f413260d46b2f90a7f005c7c From e9f0567fe111ecb2a9212e2ccfa3caf9eb56bd0b Mon Sep 17 00:00:00 2001 From: Arlo Date: Wed, 2 Jul 2025 15:04:31 -0500 Subject: [PATCH 5/6] Add newline to end of file to test force-push --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fafb5a218..2b35af1e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -366,4 +366,4 @@ jobs: if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} with: name: linux-logs - path: ./**/*.*log \ No newline at end of file + path: ./**/*.*log From 85cbd67bed4f83629e2c0b7ba49c01e635b489ce Mon Sep 17 00:00:00 2001 From: Arlo Date: Thu, 3 Jul 2025 15:41:36 -0500 Subject: [PATCH 6/6] Update tooling to latest main --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 2fac84dd1..b9200002f 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 2fac84dd1e2b6e49f413260d46b2f90a7f005c7c +Subproject commit b9200002f4c6f4c479785bf014f928a4506b79a9