Skip to content

ci(apple): select SDK builds before allocating a Mac - #5264

Merged
thymikee merged 2 commits into
mainfrom
ci/apple-sdk-preflight
Nov 30, 2026
Merged

thymikee merged 2 commits into
mainfrom
ci/apple-sdk-preflight

Conversation

@thymikee

@thymikee thymikee commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Run the existing tvOS, visionOS, and watchOS build selector on standard GitHub Ubuntu before requesting a Blacksmith Mac. In the November 23–29 sample, 412 of 695 PR build jobs started a Mac and then skipped all three SDKs.

Only an explicit skip suppresses the Mac allocation. Main pushes run all three builds. Apple smoke starts independently. The build job retains its existing name.

Validation

At ad50ff3, the Ubuntu selector uses the repository’s Node and pnpm setup to resolve workspace imports. With a clean dependency installation under Node 24.13, the selector ran for the workflow diff and emitted run=false for an isolated src/platform-runtime.ts change. Hosted checks are pending.

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.73 MB 6.73 MB 0 B
Package (unpacked) 6.73 MB 6.73 MB 0 B
Package (download) 2.05 MB 2.05 MB -8 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 20.1 ms 27.7 ms +7.5 ms
CLI --help 47.8 ms 46.2 ms -1.5 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of ad50ff3

1 finding(s): 1 minor.

🟡 Minor (1)

Where Finding
.github/workflows/apple.yml:279 Selector job has no timeout and keys the pnpm cache without the test-app lockfile

Reviewed with this repository's own Sentinel configuration (422817395848).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 1 new finding on ad50ff3. The verdict and the full list are in the summary comment.

Comment on lines +279 to +296
select-runner-build:
name: Select Apple SDK builds
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.draft }}
runs-on: ubuntu-latest
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
outputs:
run: ${{ steps.runner-impact.outputs.run }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup toolchain
uses: ./.github/actions/setup-node-pnpm
- name: Fetch the PR base for the runner selector
run: git fetch origin "$BASE_SHA" --depth=1 || echo "Base fetch failed; the runner selector will fail open."
- name: Select tvOS/visionOS/watchOS runner builds
id: runner-impact
run: node --experimental-strip-types scripts/device-lane-impact.ts swift-runner-tvos swift-runner-visionos swift-runner-watchos

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Minor · Selector job has no timeout and keys the pnpm cache without the test-app lockfile

The select-runner-build job has no timeout-minutes, so a hung pnpm install runs against the 6-hour default. It calls setup-node-pnpm with defaults, whose cache-dependency-path is only pnpm-lock.yaml, so examples/test-app/pnpm-lock.yaml stays out of the cache key that every other Apple lane passes. The gate !cancelled() && needs.select-runner-build.outputs.run != 'false' holds when the selector dies before writing run, so a broken selector still builds all three SDKs.

Suggested change
select-runner-build:
name: Select Apple SDK builds
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.draft }}
runs-on: ubuntu-latest
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
outputs:
run: ${{ steps.runner-impact.outputs.run }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup toolchain
uses: ./.github/actions/setup-node-pnpm
- name: Fetch the PR base for the runner selector
run: git fetch origin "$BASE_SHA" --depth=1 || echo "Base fetch failed; the runner selector will fail open."
- name: Select tvOS/visionOS/watchOS runner builds
id: runner-impact
run: node --experimental-strip-types scripts/device-lane-impact.ts swift-runner-tvos swift-runner-visionos swift-runner-watchos
select-runner-build:
name: Select Apple SDK builds
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.draft }}
runs-on: ubuntu-latest
timeout-minutes: 10
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
outputs:
run: ${{ steps.runner-impact.outputs.run }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup toolchain
uses: ./.github/actions/setup-node-pnpm
with:
cache-dependency-path: |
pnpm-lock.yaml
examples/test-app/pnpm-lock.yaml

Suggested change

Give the selector a short timeout-minutes and pass the same two-lockfile cache-dependency-path the build job uses.

Details

persona: senior-developer, javascript

Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.

Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.

@thymikee

Copy link
Copy Markdown
Member Author

This is ready at ad50ff3, with no code changes required.

Not blocking: the change removes the comment that stated the selection rules and the new condition relies on !cancelled() to override a skipped or failed need, so a short note there saying that only an explicit false skips the Mac job, and that !cancelled() keeps it running when the selector is skipped or fails, can be added or left.

One lower-priority open thread still applies, and it does not need to be resolved in code before merge.

All checks pass, including Select Apple SDK builds, Runner Build with all three builds succeeded, and both Apple smoke checks. One cancelled Body rules run was replaced by a successful run, and this change does not touch that route.

Not verified here: the skip path and the push path were not exercised in CI, because this PR changes apple.yml and the selector therefore chose to build. Both paths were only traced from the job condition and the script. Selector failure reaching the build job relies on documented GitHub Actions needs and !cancelled() behavior, and no failing run was observed. No tests were run locally, and the author’s local run and the 412/695 sample were not reproduced.

Nothing from this review needs to happen before merge.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 30, 2026
@thymikee
thymikee merged commit 899b182 into main Nov 30, 2026
22 of 23 checks passed
@thymikee
thymikee deleted the ci/apple-sdk-preflight branch November 30, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant