perf(ci): only boot a macOS runner when native sources actually change - #51
Merged
Conversation
Mobile Native Static Analysis runs swiftlint, ktlint, and detekt, which between them read only .swift, .kt, and .kts files under apps/mobile, skipping the generated android/ and ios/ folders. It needs macOS, the most expensive runner tier this repo buys, and it ran on every pull request and every push regardless of what changed: 157 times over the last 30 days for about four seconds of actual linting behind roughly forty seconds of runner setup. Moving it into its own workflow lets GitHub path-filter it natively, with no extra gate job and no new action dependency. Filtering on apps/mobile/** would have been the obvious choice and the wrong one: 18 of the last 40 merged pull requests touched something under apps/mobile, but only 3 touched native sources or the linter configuration, so the broad filter would still boot macOS six times more often than the check can do any work. The paths list is load-bearing. Widen it whenever the check learns to read something new, or it will quietly stop running. Verified with actionlint: no new findings against the base. Model: Claude Opus 5. Harness: Claude Code.
Thread transfer impact
This comment will update automatically after the next completed run. |
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.
Mobile Native Static Analysisruns swiftlint, ktlint, and detekt. Between them they read only.swift,.kt, and.ktsfiles underapps/mobile, skipping the generatedandroid/andios/folders (scripts/mobile-native-static-check.ts:81,91).It needs macOS — the most expensive runner tier this repo buys — and it ran on every PR and every push regardless of what changed. Over the last 30 days: 157 jobs, 132 minutes of macOS, for about four seconds of actual linting behind ~40s of runner setup.
Why a separate workflow
GitHub only supports
paths:at the workflow level, so splitting the job out is what makes it filterable — with no extra gate job and no new action dependency.Why not
apps/mobile/**That was the obvious filter and the wrong one. Measured against the last 40 merged PRs:
apps/mobile/**Most changes under
apps/mobileare TypeScript the native linters never look at, so the broad filter would still boot macOS six times more often than the check can do any work.Caveat
The
paths:list is load-bearing. Widen it whenever the check learns to read something new, or it will quietly stop running. Called out indocs/internals/ci.mdso it isn't only in the workflow file.Safe to land:
pylonhas no branch protection or rulesets, so no required-check config needs updating.thread-transfer-report.ymlkeys offworkflows: [CI], which is untouched.Verification
actionlintreports 4 findings across the two files, same as the 4 on baseci.yml— the macOS runner-label warning just moved files. All pre-existing custom-label warnings.vp fmtclean.Model: Claude Opus 5. Harness: Claude Code.
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.