Skip to content

ci: move Mac test jobs back to the Mac mini - #1340

Merged
mdozhdev merged 3 commits into
masterfrom
ci/self-hosted-mac
Nov 16, 2026
Merged

mdozhdev merged 3 commits into
masterfrom
ci/self-hosted-mac

Conversation

@mdozhdev

@mdozhdev mdozhdev commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

This PR moves the macOS test jobs off Namespace, whose Mac minutes are the bulk of the current CI bill. Appium E2E goes back to the self-hosted Mac mini ([self-hosted, macOS], last served by runner macmini1), and XCTest integration goes to GitHub-hosted macos-26 with a native regtest stack. The two jobs then never queue behind each other on the Mini. Supersedes #1337.

Description

  • Runs e2e-tests-local on [self-hosted, macOS] again and restores the steps it used there before ci: move Mac mini jobs to Namespace runners #923: local docker compose reset/up/down, and the simulator erase by name, so Appium falls back to the bitkit-e2e-tests default iOS version.
  • Runs Run Integration Tests on GitHub-hosted macos-26. Hosted macOS cannot run Docker, but the suite only needs bitcoind and electrs, so both run natively: Bitcoin Core 26.0 from bitcoincore.org, and electrs 0.10.2 via cargo install (cached when a cache can be saved). This matches the bitkit-docker versions, RPC port and polaruser credentials, and mines 101 blocks before the tests.
  • Runs the Trezor emulator job (ai-device-tests.yml, dispatch only) on [self-hosted, macOS] with the local stack. It keeps the 101-block mining step added since.
  • Removes .github/scripts/namespace-stack.sh, which nothing uses any more.

Out of Scope

Design

N/A — no UI changes.

Preview

N/A

QA Notes

Setup

The macmini1 runner must be online with these prerequisites:

  • Docker running.
  • An iPhone 17 simulator on the runtime bitkit-e2e-tests defaults to (E2E).
  • For the dispatch-only Trezor job: Xcode 26.6 and an iPhone 17 simulator on iOS 26.5.

Integration tests need nothing on the Mini.

Journeys

N/A — no user-visible behaviour change.

Manual Tests

  • 1. This PR's e2e-tests-local is picked up by macmini1 and Run Integration Tests by a hosted macos-26 runner → both pass, and no namespace-profile-mac job starts.
  • 2. Dispatch ai-device-tests with suite trezor-emu on this branch → job runs on macmini1, stack and emulator start. The tests themselves have never been green in CI, so a pass is not the bar.

Automated Checks

N/A

Evidence

  • All three workflow files parse as YAML; git diff --check clean; no namespace references left under .github/.
  • Last E2E runs before ci: move Mac mini jobs to Namespace runners #923 (19–20 Oct) ran on macmini1 with labels self-hosted,macOS.
  • Hosted integration probe (branch ci/hosted-integration-probe, run 43855957499): 28 tests executed, 0 failures, 0 skipped; job 35 min (electrs build 5m50s, build-for-testing 17m, tests 3m19s). Namespace took 5.5–7 min with warm caches; on hosted it runs alongside E2E, not after it.
  • Final config on this branch, two parallel hosted runs: 43864642436 (PR) and 43864636284 (dispatch), both 28 tests, 0 failures, 0 skipped, no retries; jobs 35 and 31 min.
  • 1 on this branch: e2e-tests-local ran on macmini1 (run 43864643295), @ios_gate 13 passing on the first attempt, job 58 min; Run Integration Tests passed on hosted macos-26; no namespace-profile-mac job started.

Gaps

  • The runner's current status and toolchain could not be checked: the runner APIs return 403 for the author's token. If macmini1 is offline, these jobs queue and the required checks stay pending.
  • cache-mode: read stops PR and dispatch runs saving the electrs cache, so each run currently rebuilds it (~6 min).

Models used

  • Planning/scoping: claude-opus-5-5 (reasoning: Not exposed)
  • Implementation: claude-opus-5-5 (reasoning: Not exposed)
  • Review: Not performed

Metadata note: the session exposes the model ID but not a named reasoning-effort setting.

🤖 Generated with Claude Code

Move e2e-tests-local, integration tests and the Trezor emulator job off
Namespace back to [self-hosted, macOS], with the regtest stack on the
runner's own Docker, and drop the Namespace stack script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR changes where three CI test jobs run and how they reach their local services.

Handle an already-booted simulator before merging so repeated integration runs do not stop before testing.

Findings

  1. P1 Repeated integration runs stop early ▶

Summary

Moves three Mac test jobs from Namespace to the self-hosted Mac mini.

  • E2E tests use Docker on the Mac that runs them.
  • Integration tests use a local regtest stack on the Mac.
  • The Trezor emulator job runs on the Mac with local services.
  • The unused Namespace stack helper is gone.

Reviews (1) · Last reviewed commit: "ci: run Mac test jobs on the self-hosted..." · Reviewed by Greptile

Comment thread .github/workflows/integration-tests.yml Resolved

@talosmachina talosmachina 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 findings in the diff, but CI is red on this head for a reason the move itself causes. Moves the integration, local E2E and Trezor emulator jobs from Namespace back to the [self-hosted, macOS] runner with the regtest stack on its own Docker, and deletes namespace-stack.sh. Reviewed 219da90, full tier (CI workflow files).

Run Integration Tests failed on macmini1 at Set up Xcode: the runner only has Xcode 26.0.1, and the job pins xcode-version: '26.6', so it stopped before the stack or the build ran. The QA setup already lists Xcode 26.6 and the iOS 26.5 iPhone 17 simulator as runner prerequisites, so the workflow matches its stated contract and the gap is how the runner is provisioned. As long as the runner stays like this, merging turns this check red on every PR and every push to master. The Trezor job pins the same Xcode, so it fails the same way.

What I checked, and 5 candidates I ruled out

Read in full: integration-tests.yml, e2e-tests.yml and ai-device-tests.yml at the head, compared with their versions before #923 (06ccb1d^), plus the deleted namespace-stack.sh and every remaining reference to it (none left on the head).
CI: Run Integration Tests red (above). SwiftFormat red with a segfault in swiftformat_linux on the Ubuntu runner, and this PR changes no Swift file, so that one is not caused by the diff. build-local and Run Tests were still running when I posted. Nothing was built here: this diff only touches workflows, and iOS does not build on Linux.

Ruled out

  • LND credentials no longer copied: the docker cp step was only needed because Namespace ran Docker on a remote host. With local Docker, the bind-mounted lnd directory (mkdir -p lnd && chmod 777 lnd) gives the same files, as it did before #923.
  • host.docker.internal patch dropped from the Trezor stack: Docker Desktop on macOS provides that name itself. The extra_hosts rewrite was only needed on the Linux host.
  • Leftover containers between jobs: each job runs docker compose down -v first, and its teardown runs under if: always(), which still fires on cancellation. With only one runner, jobs never overlap.
  • Simulator env removed from e2e-tests-local: nothing later in that job reads SIMULATOR_NAME or SIMULATOR_OS_VERSION, and the description says the E2E repo's default runtime is meant to apply.
  • Self-hosted runner on a public repo with pull_request triggers: e2e-tests-local ran there the same way before #923, so the exposure was already accepted. None of the last 200 PRs came from a fork.

Merge confidence: 1/5, Run Integration Tests fails on this head because the runner has no Xcode 26.6. It stays at 1 until the runner is provisioned and the job goes green.

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Holding approval: Run Integration Tests is red at 219da90ec because of this move. The job now lands on macmini1, and maxim-lobanov/setup-xcode fails at "Set up Xcode":

Switching Xcode to version '26.6'...
│ 0       │ '26.0.1' │ '17A400'    │ 'GM'        │ true   │ '/Applications/Xcode.app' │
##[error]Could not find Xcode version that satisfied version spec: '26.6'

The runner has only Xcode 26.0.1. The Setup section lists Xcode 26.6 as a prerequisite, so this needs the runner updated (or the job pinned to what it has) before merge; otherwise master's integration job goes red on the next Swift change. SwiftFormat is also red at this head; this PR touches no Swift, so it likely needs a re-run, but its step log was not retrievable for me.

The workflow changes themselves read correctly against the pre-#923 setup. Greptile's open P1 on the unguarded simctl boot for repeated runs on a persistent runner is the other thing to settle before merge.

⚠️ Device gate: not applicable — CI-only change; manual test 1 depends on the runner fix above.

Reviewer model: claude-opus-5-5
Reasoning effort: default

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@piotr-iohk

Copy link
Copy Markdown
Collaborator

Can we keep the Appium E2E gate on the Mac mini in this PR and move Run Integration Tests to GitHub-hosted macos-26 in #1343? That keeps both checks automatic and lets the two suites run in parallel.

Appium passed on macmini1, and the hosted pilot passed all 28 XCTest cases with authenticated staging. #1343 keeps manual dispatch and uses .github/scripts/namespace-stack.sh for fork PRs, so please keep that helper in place. Appium run · Hosted pilot

@mdozhdev

Copy link
Copy Markdown
Collaborator Author

@piotr-iohk I'm on spliting e2e from integration tests

Hosted macOS cannot run Docker, but the suite only needs bitcoind and
electrs, which run natively. Keeps integration off the Mac mini so it does
not queue behind the E2E job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mdozhdev

Copy link
Copy Markdown
Collaborator Author

@jvsena42 thanks, the Xcode failure at 219da90ec was real. Since then the split changed, following Piotr's suggestion on #1337:

  • Integration tests no longer run on the Mini. Run Integration Tests now runs on GitHub-hosted macos-26, which ships Xcode 26.6, with bitcoind 26.0 and electrs 0.10.2 running natively instead of in Docker. Passed in three runs: 43855957499, 43864636284 and 43864642436 (this PR). Each had 28 tests, 0 failures, 0 skipped, no retries, in 31–35 min.
  • E2E on macmini1 doesn't need Xcode 26.6. It installs the app built by build-local on hosted macOS. Run 43864643295: @ios_gate 13 passing on the first attempt, job 58 min.
  • Greptile's simctl boot P1 no longer applies: integration gets a fresh simulator on each hosted run.
  • SwiftFormat passes at the current head.

Xcode 26.6 on the Mini is now needed only for the dispatch-only Trezor job (ai-device-tests.yml). It's worth upgrading, but it doesn't block this PR.

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: Full review of the PR diff against its merge base, at bb808a04.

No new actionable code findings.

Appium E2E is on the Mac mini with local Docker again, and integration runs on a fresh GitHub-hosted macos-26 runner with Bitcoin Core 26.0 and electrs 0.10.2. That stack matches the contract the suites already use: RPC 127.0.0.1:43782 as polaruser/polarpass, and Electrum tcp://127.0.0.1:60001. The polaruser rpcauth hash matches polarpass. The earlier comment about booting an already-running simulator (discussion) does not apply at this revision: integration no longer uses the persistent mini, and the hosted job booted a new simulator.

Validation inspected the pinned head's checks and did not re-run the suites. Integration run 43864642436 executed 28 tests with 0 failures; the Electrum wait succeeded after the Xcode build, and both electrs and bitcoind were still alive at job cleanup. Dispatch run 43864636284 also succeeded. E2E run 43864643295 passed @ios_gate on macmini1 on the first attempt. The electrs cache save was denied under cache-mode: read, so hosted runs keep rebuilding it. The dispatch-only Trezor workflow was reviewed from source and was not executed here; it still pins Xcode 26.6 on the mini, and the mini's last observed Xcode setup (at 219da90e) failed because only 26.0.1 was installed. Whether that runner has since been upgraded was not rechecked. Closed PR 1343 is not an open dependency.

Device testing: not performed. There is no user-visible behavior change.

Reviewer model: grok-4.7
Reasoning effort: high

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Both CI suites passed on this revision. All 28 integration tests passed on GitHub-hosted macos-26, and all 13 Appium E2E tests passed on macmini1 on the first attempt. Integration run · Appium run

@mdozhdev
mdozhdev merged commit 0f114a0 into master Nov 16, 2026
25 checks passed
@mdozhdev
mdozhdev deleted the ci/self-hosted-mac branch November 16, 2026 14:43
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.

4 participants