Skip to content

ci: run CI and iOS build on the self-hosted Mac runners - #27

Closed
ahsanalidotme wants to merge 2 commits into
mainfrom
ci/self-hosted-only
Closed

ahsanalidotme wants to merge 2 commits into
mainfrom
ci/self-hosted-only

Conversation

@ahsanalidotme

Copy link
Copy Markdown
Contributor

No linked issue: org-wide move of every Actions job to the self-hosted Mac minis.

What

Moves these jobs to the org's self-hosted Macs ([self-hosted, macOS]). Job names, which are the required checks, are unchanged:

  • CI → Lint · Typecheck · Build · Codegen (was ubuntu-latest)
  • CI → Example · JS + Android build (was ubuntu-latest)
  • iOS build → Build example (iOS simulator) (was macos-15)

Not moved: Publish to npm → Build & publish stays on ubuntu-latest. It runs npm publish --provenance, and the npm registry only accepts provenance built on GitHub-hosted runners; it rejects self-hosted. Moving this job means publishing without provenance, which is a call for you to make, so I left it and added a comment explaining why.

How

  • Fork guard. Each moved job has if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'. There's no pull_request_target.
  • Android SDK. The new scripts/ci/android-sdk.sh reuses ~/Library/Android/sdk and installs the example's pinned packages if they're missing (platform 35, build-tools 35.0.0, NDK 27.1.12297006, CMake 3.22.1). Installs run under a machine-wide lock. setup-gradle runs with cache-disabled: true, because ~/.gradle persists on the runners.
  • Ruby. ruby/setup-ruby only installs its prebuilt Rubies on GitHub-hosted images. The new scripts/ci/ruby.sh uses Homebrew's Ruby with GEM_HOME/BUNDLE_PATH in RUNNER_TEMP, then bundle install installs the Gemfile's CocoaPods. Nothing global is installed. I checked locally that it resolves CocoaPods 1.15.2.
  • Xcode. xcodebuild builds into a per-job -derivedDataPath instead of the shared ~/Library/Developer/Xcode/DerivedData.

Production impact

CI only; no change to the published package. Risk: Low. release.yml only gets a comment.

Requires org admin: the org runner group (default) must allow public repositories. Until it does, these jobs queue and never start.

Details

  • actionlint is clean.
  • Overlaps the open docs-only PR ci: skip heavy CI work on docs-only pull requests #26, which adds changes jobs to ci.yml and ios.yml. That PR now uses the self-hosted labels and a fork guard too, but the two PRs will conflict. Whichever merges second needs a small rebase.

ci.yml (library, example-android) and ios.yml (ios) move to
[self-hosted, macOS], with a fork guard on pull_request runs. Job names
are unchanged.

- scripts/ci/android-sdk.sh installs the example's pinned SDK packages
  under a machine lock; the hosted image had them.
- scripts/ci/ruby.sh replaces ruby/setup-ruby (hosted images only):
  Homebrew Ruby with every gem in RUNNER_TEMP.
- xcodebuild uses a per-job DerivedData path.

release.yml stays on ubuntu-latest: npm publish --provenance is only
supported on GitHub-hosted runners.
@ahsanalidotme

Copy link
Copy Markdown
Contributor Author

Impact: DB changes: none. Live code changes: none (only workflow files plus scripts/ci/). Critical prod impact: No. npm publish stays GitHub-hosted (provenance). CI needs the org runner group to allow public repos.

@ahsanalidotme

Copy link
Copy Markdown
Contributor Author

Closing: the runner plan changed. Public repos stay on GitHub-hosted runners (free and unlimited for public repos, macOS included), so this repo needs no CI change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant