From 296fc3f0836a00aaf81246e35362c2f59bbf09f3 Mon Sep 17 00:00:00 2001 From: Chrison Simtian Date: Mon, 18 May 2026 15:48:04 +1200 Subject: [PATCH] chore(ci): Linux-only validation on PRs; full matrix only on main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously every push to a non-main branch and every PR triggered Test+Pack on Ubuntu, Windows, and macOS in parallel — 3x the runtime and credits per change. Cross-OS coverage matters more on what's actually shipping, less on every in-flight branch. New behavior: - ubuntu-latest.yml: triggers as before (push to non-main, PRs to main, paths-ignore for docs/images/markdown) — fast Linux feedback loop. - windows-latest.yml, macos-latest.yml: trigger only on push to main (post-merge / release pipeline). Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/macos-latest.yml | 7 ------- .github/workflows/windows-latest.yml | 7 ------- build/Build.CI.GitHubActions.cs | 11 +++++------ 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/.github/workflows/macos-latest.yml b/.github/workflows/macos-latest.yml index 38937d293..a9698fa3a 100644 --- a/.github/workflows/macos-latest.yml +++ b/.github/workflows/macos-latest.yml @@ -18,15 +18,8 @@ name: macos-latest on: push: - branches-ignore: - - main - pull_request: branches: - main - paths-ignore: - - 'docs/**' - - 'images/**' - - '**/*.md' jobs: macos-latest: diff --git a/.github/workflows/windows-latest.yml b/.github/workflows/windows-latest.yml index 6ef2e14dc..c225d4f77 100644 --- a/.github/workflows/windows-latest.yml +++ b/.github/workflows/windows-latest.yml @@ -18,15 +18,8 @@ name: windows-latest on: push: - branches-ignore: - - main - pull_request: branches: - main - paths-ignore: - - 'docs/**' - - 'images/**' - - '**/*.md' jobs: windows-latest: diff --git a/build/Build.CI.GitHubActions.cs b/build/Build.CI.GitHubActions.cs index ed3661db3..d719f3234 100644 --- a/build/Build.CI.GitHubActions.cs +++ b/build/Build.CI.GitHubActions.cs @@ -9,18 +9,17 @@ "windows-latest", GitHubActionsImage.WindowsLatest, FetchDepth = 0, - OnPushBranchesIgnore = new[] { MainBranch }, - OnPullRequestBranches = new[] { MainBranch }, - OnPullRequestExcludePaths = new[] { "docs/**", "images/**", "**/*.md" }, + OnPushBranches = new[] { MainBranch }, InvokedTargets = new[] { nameof(ITest.Test), nameof(IPack.Pack) }, PublishArtifacts = false)] +// macOS and Windows runs are reserved for main-branch validation (post-merge +// and release pipelines). PRs and feature-branch pushes get Linux-only for +// fast, cheap feedback. [GitHubActions( "macos-latest", GitHubActionsImage.MacOsLatest, FetchDepth = 0, - OnPushBranchesIgnore = new[] { MainBranch }, - OnPullRequestBranches = new[] { MainBranch }, - OnPullRequestExcludePaths = new[] { "docs/**", "images/**", "**/*.md" }, + OnPushBranches = new[] { MainBranch }, InvokedTargets = new[] { nameof(ITest.Test), nameof(IPack.Pack) }, PublishArtifacts = false)] [GitHubActions(