Skip to content

Run the hot-reload runtime tests on Android and iOS in CI #3236

Description

@kazo0

What

Add Android (emulator) and iOS (simulator) CI lanes for the _HotReload runtime tests, which currently only run on Skia desktop (stage-build-runtimetests-skia-hotreload.yml).

Why

unoplatform/uno#25417: MVUX hot reload was completely disabled on Android (Assembly.GetEntryAssembly() is null there), so model edits were reported applied but had no effect. Every existing MVUX hot-reload runtime test would have failed on Android, but none of them run there. Fix: #3235.

The gap has two causes:

  • stage-runtime-tests-android.yml / stage-runtime-tests-ios.yml run with the !_HotReload filter (also the default in build/test-scripts/android-emulator-runtime-tests.sh).
  • The HR test classes use [RunsInSecondaryApp(ignoreIfNotSupported: true)]. The engine's SecondaryApp.IsSupported is Windows/Linux/FreeBSD only, so on mobile they're reported Skipped.

Why it's feasible

  • No second process needed. HotReloadHelper.UpdateSourceFile sends edits through RemoteControlClient, which works from a device app. Only spawning the secondary app (plus its DevServer) is desktop-only.
  • The engine can run them in-process. UnitTestsControl.IsSecondaryApp = true makes HR test classes run in the current app. MobileRuntimeTestsAutostart already drives UnitTestsControl directly and can set it.

Work needed

  • DevServer next to the device. The DevServer compiles deltas for net10.0-android / net10.0-ios, so the job running the tests needs the checkout, restore, mobile workloads, and a DevServer started against Uno.Extensions-runtimetests.slnf. Simplest is a single build+run job, since the app bakes the source project path (RuntimeTestsSourceProjectAttribute) at build time.
  • A hot-reload-capable app build:
    • Debug, with the DevServer package
    • DOTNET_MODIFIABLE_ASSEMBLIES=debug: environment.conf on Android, SIMCTL_CHILD_DOTNET_MODIFIABLE_ASSEMBLIES on iOS
    • Mono interpreter (UseInterpreter=true). Check what the current CI APK build uses.
  • Network path to the DevServer. Android: adb reverse tcp:<port> tcp:<port> so the app reaches 127.0.0.1. The iOS simulator shares host loopback. Pass UNO_DEV_SERVER_HOST/UNO_DEV_SERVER_PORT through (Android MainActivity already copies intent extras into env; iOS needs the same). Confirm the mobile RemoteControlClient honours these.
  • Separate HR job per platform, filtered on _HotReload, with IsSecondaryApp set, mirroring the Skia HR stage.
  • Triage Mono-specific failures. Mono's edit-and-continue support differs from CoreCLR's; fix each failing test or gate it explicitly per platform (no Assert.Inconclusive).

Suggested order: Android first (the platform with the bug), then iOS.

Risks

  • Memory: the emulator plus the DevServer's Roslyn workspace may be tight on a hosted Linux agent's RAM.
  • Duration: the Android stage already needs a 120-minute timeout because SDK provisioning is slow.

Activity

  1. added
    area/build
    kind/maintainer-experience
    on Oct 14, 2026
  2. added a commit that references this issue on Nov 6, 2026
    9689cd1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildarea/mvuxkind/maintainer-experience

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions