Skip to content

feat(ci): add native mobile build validation#190

Open
up-tandem wants to merge 2 commits intomainfrom
feat/82-ci-mobile-builds
Open

feat(ci): add native mobile build validation#190
up-tandem wants to merge 2 commits intomainfrom
feat/82-ci-mobile-builds

Conversation

@up-tandem
Copy link
Contributor

@up-tandem up-tandem commented Mar 4, 2026

Summary

  • Add conditional build-ios CI job that compiles the iOS app for Simulator when mobile iOS changes are detected
  • Add conditional build-android CI job that assembles the Android debug APK when mobile Android changes are detected
  • Both jobs reuse existing affected job outputs and run in parallel with lint jobs

Resolves #82

Contracts Changed

No

Regeneration Required

No

Validation

  • YAML validated (8 jobs: commits, affected, generated-code, build-and-test, lint-ios, build-ios, lint-android, build-android)
  • Existing lint-ios and lint-android jobs unchanged
  • Build jobs conditional on affected detection (same pattern as lint jobs)
  • Build failures will block merge via standard CI checks

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • CI now performs platform-specific builds for iOS and Android (including platform setup and caching) in addition to existing checks, expanding automated build coverage.

Add build-ios and build-android CI jobs that conditionally compile
native apps when mobile changes are detected, blocking merges on
build failures.

Resolves #82

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: af3a90b6-f07d-4162-87a9-b7a1bcdd68fe

📥 Commits

Reviewing files that changed from the base of the PR and between b1258c3 and fc2a423.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Walkthrough

Adds two conditional CI jobs to the GitHub Actions workflow: build-ios runs an Xcode build when iOS targets are affected; build-android runs a Gradle assembleDebug when Android targets are affected. Both include checkout, cache setup, and platform-specific tool setup.

Changes

Cohort / File(s) Summary
CI Workflow Mobile Build Jobs
.github/workflows/ci.yml
Add build-ios and build-android jobs gated by affected outputs (mobile_ios, mobile_android). Each job includes Checkout, platform toolchain/setup (iOS DerivedData cache; Java/Gradle setup and caches for Android), and a platform-specific build step (xcodebuild for ForgeApp iOS project; ./gradlew assembleDebug for Android). Existing lint jobs remain unchanged.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant GH as GitHub Actions
  participant Repo as Repository
  participant Cache as Cache (actions/cache)
  participant Tool as Toolchain (Xcode / Java+Gradle)
  participant Builder as Build system (xcodebuild / gradlew)

  GH->>Repo: checkout code
  GH->>Cache: restore caches (DerivedData / Gradle)
  GH->>Tool: setup platform tools
  Tool->>Builder: invoke build command
  Builder-->>GH: success / failure status
  GH-->>Cache: save updated caches
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(ci): add native mobile build validation' accurately summarizes the main change: adding native mobile build validation to the CI workflow.
Linked Issues check ✅ Passed All acceptance criteria from issue #82 are met: build-ios and build-android jobs added with conditional triggers, existing lint jobs unchanged, build failures will block merges, and affected-path detection is properly utilized.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #82 objectives; only CI workflow modifications for mobile build jobs are present with no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/82-ci-mobile-builds

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

121-134: Consider adding DerivedData caching to speed up iOS builds.

The build-android job includes a Gradle cache step, but build-ios has no caching. Adding a cache for xcodebuild's DerivedData directory (similar to the Android caching pattern) would improve build times on subsequent runs:

- name: Cache DerivedData
  uses: actions/cache@v4
  with:
    path: |
      ~/Library/Developer/Xcode/DerivedData
    key: ${{ runner.os }}-xcode-${{ hashFiles('**/Package.resolved') }}
    restore-keys: |
      ${{ runner.os }}-xcode-
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 121 - 134, The build-ios job is
missing DerivedData caching which slows repeated xcodebuild runs; add a cache
step named like "Cache DerivedData" before the "Build iOS (Simulator)" step that
uses actions/cache@v4 to cache ~/Library/Developer/Xcode/DerivedData (use a key
based on runner.os and a project hash such as hashFiles('**/Package.resolved')
and a restore-keys fallback like '${{ runner.os }}-xcode-') so subsequent runs
of the xcodebuild step (project mobile/ios/App/ForgeApp.xcodeproj, scheme
ForgeApp, destination 'generic/platform=iOS Simulator') restore DerivedData and
speed up builds.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 121-134: The build-ios job is missing DerivedData caching which
slows repeated xcodebuild runs; add a cache step named like "Cache DerivedData"
before the "Build iOS (Simulator)" step that uses actions/cache@v4 to cache
~/Library/Developer/Xcode/DerivedData (use a key based on runner.os and a
project hash such as hashFiles('**/Package.resolved') and a restore-keys
fallback like '${{ runner.os }}-xcode-') so subsequent runs of the xcodebuild
step (project mobile/ios/App/ForgeApp.xcodeproj, scheme ForgeApp, destination
'generic/platform=iOS Simulator') restore DerivedData and speed up builds.

ℹ️ Review info
Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f6c29190-30e6-4d19-bc11-0dfb8b9b337e

📥 Commits

Reviewing files that changed from the base of the PR and between 0b7321c and b1258c3.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@up-tandem
Copy link
Contributor Author

Review feedback addressed (fc2a423)

Fixed:

  • [CodeRabbit nitpick: add DerivedData caching to build-ios]: Added actions/cache@v4 step for ~/Library/Developer/Xcode/DerivedData keyed on Package.swift hash, matching the Gradle caching pattern in build-android.

Not changed:

  • build-and-test failure is pre-existing on main (TypeScript error in apps/webProperty 'id' does not exist on type 'Section'). Not related to this PR.

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.

feat(ci): add native mobile build validation to CI

2 participants