Skip to content

chore(ci): speed up iOS and watch builds on GitHub Actions#33

Merged
Juuro merged 24 commits into
mainfrom
chore/ci-performance
May 18, 2026
Merged

chore(ci): speed up iOS and watch builds on GitHub Actions#33
Juuro merged 24 commits into
mainfrom
chore/ci-performance

Conversation

@Juuro
Copy link
Copy Markdown
Owner

@Juuro Juuro commented May 18, 2026

No description provided.

Juuro and others added 23 commits May 18, 2026 16:24
Use build-for-testing plus test-without-building, cache DerivedData and
XcodeGen, pin Xcode 16.2 on macos-latest, and parallelize UI smoke tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
runner.temp is not available in job-level env expressions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix broken simctl pipe into a Python heredoc. Fall back across iPad/iPhone
simulators on macos-latest. Download watchOS platform so Xcode 16.2 matches
installed watch simulator runtimes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ensures the iOS 18.2 simulator runtime is present before build-for-testing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cache only Homebrew downloads, not Cellar. Use command -v instead of
brew list so a partial cache restore cannot skip installation.

Co-authored-by: Cursor <cursoragent@cursor.com>
LogWeight scheme build-for-testing requires watchOS 11.2 simulators because
the iOS target embeds LogWeightWatchApp.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Use latest-stable Xcode on macos-latest (matches preinstalled runtimes like
the old ~8m workflow). Download iOS/watchOS platforms only when
-showdestinations reports none. Drop parallel UI workers (slower on 3-core).

Co-authored-by: Cursor <cursoragent@cursor.com>
…ions

-showdestinations falsely reported missing watchOS for LogWeight and
triggered a failing download on latest-stable Xcode.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes flaky failure under swift test --parallel when two tests shared
the same UserDefaults suite name.

Co-authored-by: Cursor <cursoragent@cursor.com>
…tches

Global buttons["History"] matched multiple elements on iPad simulators used
in CI after switching to latest-stable Xcode.

Co-authored-by: Cursor <cursoragent@cursor.com>
iPad simulators on latest-stable Xcode did not expose tab bar items to
XCUITest; iPhone matches the old reliable navigation path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stabilizes first-entry history navigation on CI where the empty-state
label was not always found within 2s.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keeps latest-stable Xcode, conditional platform install, DerivedData cache,
and iPhone simulator selection. Reverts build-for-testing split that caused
background-assertion timeouts on Xcode 26 simulators.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wait for History navigation after tab switch and allow longer load time
after deleting the last weight entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
Navigation title is not always exposed; rely on empty-state identifiers instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
Aligns with the pre-optimization CI device. Allow time for programmatic
keyboard focus after returning from History.

Co-authored-by: Cursor <cursoragent@cursor.com>
macos-latest ships Xcode 26 with mismatched simulators and broken tab-bar
UI tests. Keep DerivedData cache, conditional platform install, and single
xcodebuild test on the macos-14 image that matched the historical baseline.

Co-authored-by: Cursor <cursoragent@cursor.com>
History tab taps failed while the first-entry decimal pad was visible.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wait for the decimal pad to dismiss before tab navigation and fall back
to coordinate taps when scroll-to-visible fails on iPad CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Assert History navigation title instead of empty-state identifiers,
which are flaky when the decimal pad blocks the tab bar on iPad CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add --ui-test-skip-initial-keyboard so iPad CI can reach the History tab
without the decimal pad blocking tab-bar taps; keyboard focus still runs
when returning to Entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
Follow-up onChange calls were scheduling focus after the first defer;
only allow keyboard focus after the UI test navigates away from Entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates GitHub Actions CI to reduce iOS/watchOS build time and flakiness by introducing a shared Apple setup action, caching DerivedData, and avoiding unnecessary simulator platform downloads; it also adjusts UI tests/app behavior to improve iPad CI navigation reliability and enables parallel SwiftPM core tests.

Changes:

  • CI: add a composite .github/actions/apple-ci-setup (Xcode selection, XcodeGen install, caches) and use it in iOS + watchOS jobs; add scripts to ensure simulator platforms and to resolve an iOS simulator UDID.
  • Tests/UI: make a core test’s UserDefaults suite unique per test run under swift test --parallel; add UI-test-only behavior to avoid initial keyboard focus blocking tab navigation; add an accessibility identifier for History empty state and update UI smoke tests/navigation helpers accordingly.
  • Docs: update CI build/deploy documentation to reflect the new job structure and runners.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Packages/LogWeightCore/Tests/LogWeightCoreTests/WidgetChartRangeStoreTests.swift Isolates UserDefaults state to support parallel SwiftPM test execution.
docs/BuildAndDeploy.md Updates CI job descriptions/steps to match the new workflow layout.
App/Shared/Views/HistoryView.swift Adds an accessibility identifier for History empty state UI test stability.
App/iOSUITests/UITestNavigation.swift Refactors tab navigation + keyboard dismissal to reduce iPad CI flakiness.
App/iOSUITests/EntryViewSmokeTests.swift Updates smoke tests to use the new identifiers and UI-test launch behavior.
App/iOS/Views/EntryView.swift Adds UI-test-only logic to defer initial keyboard focus until after leaving/returning to Entry.
.github/workflows/ci.yml Splits setup via composite action, adds caching, simulator-platform checks, and uses parallel core tests.
.github/scripts/resolve-ios-simulator-udid.py Selects an available iOS simulator UDID (preferring historical CI devices).
.github/scripts/ensure-simulator-platform.sh Downloads iOS/watchOS simulator platforms only when missing.
.github/actions/apple-ci-setup/action.yml New composite action for Xcode selection, caching, and xcodegen generate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread App/iOSUITests/UITestNavigation.swift
Comment thread App/iOSUITests/UITestNavigation.swift Outdated
Comment thread .github/actions/apple-ci-setup/action.yml
Comment thread Packages/LogWeightCore/Tests/LogWeightCoreTests/WidgetChartRangeStoreTests.swift Outdated
Key DerivedData cache on resolved xcodebuild version, guard tab bar
before keyboard-dismiss coordinate tap, and use UUID UserDefaults suites
for parallel core tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Juuro Juuro merged commit 58bffad into main May 18, 2026
5 checks passed
@Juuro Juuro deleted the chore/ci-performance branch May 18, 2026 19:18
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.

2 participants