Skip to content

perf(ci): only boot a macOS runner when native sources actually change - #51

Merged
rynfar merged 1 commit into
pylonfrom
perf/ci-path-filter-mobile-native
Aug 20, 2026
Merged

perf(ci): only boot a macOS runner when native sources actually change#51
rynfar merged 1 commit into
pylonfrom
perf/ci-path-filter-mobile-native

Conversation

@rynfar

@rynfar rynfar commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Mobile Native Static Analysis runs swiftlint, ktlint, and detekt. Between them they read only .swift, .kt, and .kts files under apps/mobile, skipping the generated android/ and ios/ 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:

Filter PRs matched
apps/mobile/** 18 / 40
native sources + linter config 3 / 40

Most changes under apps/mobile are 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 in docs/internals/ci.md so it isn't only in the workflow file.

Safe to land: pylon has no branch protection or rulesets, so no required-check config needs updating. thread-transfer-report.yml keys off workflows: [CI], which is untouched.

Verification

actionlint reports 4 findings across the two files, same as the 4 on base ci.yml — the macOS runner-label warning just moved files. All pre-existing custom-label warnings. vp fmt clean.

Model: Claude Opus 5. Harness: Claude Code.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

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.
@github-actions github-actions Bot added size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Aug 18, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for b7ee164.

This comment will update automatically after the next completed run.

@rynfar
rynfar merged commit 00a39ae into pylon Aug 20, 2026
11 checks passed
@rynfar
rynfar deleted the perf/ci-path-filter-mobile-native branch August 20, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant