From d40d367ced291d80b08f138bff0a5939a77ea362 Mon Sep 17 00:00:00 2001 From: Andrii Borziak Date: Wed, 30 Sep 2026 15:01:27 -0700 Subject: [PATCH 1/2] CI: skip multi-arch sample app bundles on PR builds Pass AppxBundle=Never unless --fullAppBuild=true. CI enables the full build only for pushes to main and rel/*. Local Package build: 25:05 -> 5:34; NuGet outputs unchanged. --- .github/workflows/dotnet-build.yml | 4 ++-- build/build.cake | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 3e9e95bd..84e79931 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -64,9 +64,9 @@ jobs: run: .\build\Install-WindowsSdkISO.ps1 18362 shell: pwsh - # Run the build. + # Run the build. Pushes to main and rel/* also build the full multi-arch sample app bundles. - name: Build - run: .\build.ps1 --target=Package + run: .\build.ps1 --target=Package ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/')) && '--fullAppBuild=true' || '' }} shell: pwsh working-directory: .\build diff --git a/build/build.cake b/build/build.cake index d881231a..ab845b32 100644 --- a/build/build.cake +++ b/build/build.cake @@ -11,6 +11,8 @@ using System.Text.RegularExpressions; var target = Argument("target", "Default"); var configuration = Argument("configuration", "Release"); +// Builds the sample app bundles for every architecture. Slow; not needed for the NuGet packages. +var fullAppBuild = Argument("fullAppBuild", false); ////////////////////////////////////////////////////////////////////// // VERSIONS OF TOOLS TO USE @@ -61,6 +63,10 @@ void MSBuildSolution( { settings = settings.WithProperty(property.Name, property.Value); } + if (!fullAppBuild) + { + settings = settings.WithProperty("AppxBundle", "Never"); + } return settings; } From 98459a56312f16eb10324200d31ca9f32ff407ed Mon Sep 17 00:00:00 2001 From: Andrii Borziak Date: Wed, 30 Sep 2026 15:02:11 -0700 Subject: [PATCH 2/2] CI: check out submodules; skip 'external' in header verification --- .github/workflows/dotnet-build.yml | 1 + build/build.cake | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 84e79931..c87d1613 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -31,6 +31,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true # Set up a VS build environment. - name: Setup Environment Variables diff --git a/build/build.cake b/build/build.cake index ab845b32..1c27469a 100644 --- a/build/build.cake +++ b/build/build.cake @@ -100,6 +100,7 @@ static bool IsExcludedDirectory(FilePath path) return segments.Contains("bin") || + segments.Contains("external") || segments.Contains("internal") || segments.Contains("obj"); }