Skip to content

ci(v3): add Android and iOS to cross-compile matrix + per-PR mobile compile check - #5889

Open
mortenolsrud wants to merge 2 commits into
wailsapp:masterfrom
mortenolsrud:ci/mobile-cross-compile
Open

ci(v3): add Android and iOS to cross-compile matrix + per-PR mobile compile check#5889
mortenolsrud wants to merge 2 commits into
wailsapp:masterfrom
mortenolsrud:ci/mobile-cross-compile

Conversation

@mortenolsrud

@mortenolsrud mortenolsrud commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

The cross-compile lane (cross-compile-test-v3.yml) covers only desktop targets; mobile was never compiled in CI. This adds Android and iOS to the existing matrix, plus a lightweight per-PR smoke check.

1. Full cross-compile matrix (existing workflow, approval-gated):

  • android/arm64 on ubuntu-latest — NDK cross-compile from Linux (preinstalled)
  • ios/arm64 on macos-latest — Xcode + iOS SDK (preinstalled)

Both use the runner's preinstalled toolchains — no custom Docker image or self-hosted runner needed.

2. Lightweight per-PR check (new workflow, pull_request-triggered):

  • Pure go build ./pkg/application/ for Android (ubuntu + NDK CC) and iOS (macos + xcrun SDK)
  • Runs in seconds — catches compile/link regressions without npm, Gradle, or the Xcode overlay pipeline
  • Path-filtered to mobile-relevant files only

Desktop-only steps (host GTK deps, Docker cross-image) are guarded off for mobile. The go.mod replace step is kept so mobile builds exercise the PR's code.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • The lightweight iOS compile check was validated on a macos-latest runner (fork CI run Port setup #1, 57s, BUILD SUCCESS).
  • The Android compile command was validated locally (go build ./pkg/application/ with NDK CC, exit 0).
  • YAML validated with python3 -c "import yaml; yaml.safe_load(open(...))" — both files parse clean.

The full task <os>:build path (matrix addition) pulls the same npm/gradle/xcode-overlay pipeline that the desktop cross-compile uses — it may need a round of iteration on the actual runners.

  • Windows
  • macOS
  • Linux

Test Configuration

  • Wails CLI: v3.0.0-beta.3
  • Go: go1.26.5
  • Ubuntu 24.04.4, Android NDK 26.3.11579264
  • iOS compile verified on GitHub-hosted macos-latest

Checklist:

  • (v2 only) I have updated website/src/pages/changelog.mdx
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Note: This IS the test infrastructure — it adds CI validation for code that previously had none.

Summary by CodeRabbit

  • Tests
    • Expanded cross-platform build validation to include Android and iOS arm64 targets.
    • Added automated mobile compilation checks for pull requests and manual runs.
    • Added verification of desktop binaries and mobile library artifacts.
    • Improved coverage using standard Android and iOS development toolchains.
    • Helps identify mobile compilation issues earlier in the development process.

The cross-compile lane covered only desktop targets; mobile was never
compiled in CI. Add android/arm64 and ios/arm64 rows to the existing
matrix, reusing its per-row runner field:

- Android cross-compiles from Linux via the NDK, so it rides the existing
  ubuntu lane (ubuntu-latest ships the Android SDK + NDK preinstalled).
- iOS is the only target that requires a Mac, so it runs on macos-latest
  (Xcode + iOS SDK preinstalled). No custom image or self-hosted runner
  is needed for either.

Desktop-only steps (host GTK deps, Docker cross-image) are guarded off for
mobile; the go.mod replace step is kept so mobile also builds against the
PR's local source. Mobile toolchain setup just points at the runner's
preinstalled NDK / Xcode.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f8aa2ab2-bdc3-446a-9d27-8a81508822ed

📥 Commits

Reviewing files that changed from the base of the PR and between b1b4074 and 8b476ff.

📒 Files selected for processing (1)
  • .github/workflows/mobile-compile-check.yml

Walkthrough

The CI configuration adds Android/arm64 and iOS/arm64 targets to cross-compilation tests. It also adds a dedicated mobile compilation workflow for pkg/application.

Changes

Mobile compilation validation

Layer / File(s) Summary
Cross-compilation mobile targets
.github/workflows/cross-compile-test-v3.yml
The matrix adds Android and iOS arm64 targets. Linux dependencies and Docker setup apply only to desktop targets. Mobile toolchains and artifact inspection are configured.
Mobile check workflow matrix
.github/workflows/mobile-compile-check.yml
A pull-request and manual workflow defines mobile path filters, hosted runners, matrix settings, and Go 1.25 setup.
Mobile compile commands
.github/workflows/mobile-compile-check.yml
The workflow configures the Android NDK or iPhoneOS SDK and compiles ./pkg/application/ for arm64.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: v3-alpha

Poem

A rabbit checks the mobile build,
With NDK tools neatly stilled.
iOS hops into the queue,
Android joins the testing crew.
Green paws stamp each arm64 trail.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the Android and iOS CI matrix updates and the new per-PR mobile compile check.
Description check ✅ Passed The description covers the change, testing, configuration, motivation, and checklist, with sufficient detail for review.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/mobile-compile-check.yml:
- Around line 5-8: Update the workflow header and the Android and iOS job
descriptions to state that go build ./pkg/application/ only validates mobile
package compilation and reports errors, without producing or linking a mobile
executable. Keep the existing compilation commands unchanged unless adding
explicit framework/final-link coverage is required.
- Around line 41-42: Update the actions/checkout@v4 step in the mobile compile
workflow to set persist-credentials to false, and apply the same setting to
other checkout steps that do not require authenticated Git access. Retain
persisted credentials only for workflows with later repository write operations.
- Around line 18-24: Update the paths filter in the mobile compile workflow to
trigger for all local build inputs used by v3/pkg/application, preferably by
replacing the narrow entries with v3/**; alternatively include
v3/internal/assetserver**, v3/internal/capabilities**, and v3/pkg/updater**
alongside the existing paths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e75211f-190a-4e40-a6a3-8d465b4b9ad8

📥 Commits

Reviewing files that changed from the base of the PR and between 2014eb6 and ca299cb.

📒 Files selected for processing (2)
  • .github/workflows/cross-compile-test-v3.yml
  • .github/workflows/mobile-compile-check.yml

Comment thread .github/workflows/mobile-compile-check.yml
Comment thread .github/workflows/mobile-compile-check.yml
Comment thread .github/workflows/mobile-compile-check.yml
@mortenolsrud
mortenolsrud force-pushed the ci/mobile-cross-compile branch from ca299cb to b1b4074 Compare August 4, 2026 08:34
@mortenolsrud

Copy link
Copy Markdown
Contributor Author

All three findings addressed in the force-push:

  1. L8 — Clarify scope: Workflow name updated to "Mobile Compile Check (pkg/application only)" to make clear this is a package compile, not a full app build.

  2. L24 — Widen path filter: Added v3/pkg/events/**, v3/internal/assetserver/**, v3/internal/capabilities/**, and v3/internal/runtime/** — the internal packages that pkg/application imports. Changes to these will now trigger the compile check.

  3. L42 — Persist-credentials: Added persist-credentials: false to the checkout step.

Complement the full mobile cross-compile (approval-gated in
cross-compile-test-v3.yml) with a fast per-PR tier that pure-compiles
pkg/application — all mobile-tagged Go plus the Objective-C iOS delegate —
for android/arm64 (ubuntu + preinstalled NDK) and ios/arm64 (macos +
preinstalled Xcode). Runs on pull_request in seconds without npm, Gradle
or the Xcode overlay pipeline, catching compile/link regressions early.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants