ci: add namespace gradle cache trial Android E2E APK#30054
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
c9f8e16 to
6b642de
Compare
There was a problem hiding this comment.
Pull request overview
Adds a scoped CI trial of Namespace’s Gradle remote build cache for the Android E2E APK build path, without changing the default “current” runner behavior or the non‑E2E AAB release path.
Changes:
- Adds optional support in
scripts/build.shto pass a Gradle--init-scriptwhenGRADLE_INIT_SCRIPTis provided. - Updates the Android E2E workflow to generate a Namespace Gradle init script only on
runner_provider=namespace+ native-build path and pass it into the build step.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
scripts/build.sh |
Adds an optional init-script arg array and injects it into the ./gradlew invocation for Android APK generation. |
.github/workflows/build-android-e2e.yml |
Adds a gated step to configure Namespace Gradle remote cache and wires its generated init script path into the APK build environment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - skip-smart-e2e-selection label found All E2E tests pre-selected. |
|



Description
This adds a scoped trial for Namespace Gradle remote build cache on the Android E2E APK build path.
The workflow configures Namespace Gradle cache only when
runner_provider=namespaceand the native Android build path is active. The generated Namespace init script is passed throughGRADLE_INIT_SCRIPTtoscripts/build.sh, where it is added to the Android E2E APK Gradle invocation as--init-script.Current runner behavior stays unchanged: the Namespace setup step is skipped,
GRADLE_INIT_SCRIPTis empty, and the existing Gradle command shape is preserved. The non-E2E AAB release build path is intentionally unchanged.Validation summary
This validation uses Android E2E APK builds from commit
5a8b29d6895875799466b489abe957f7bdf914ee:Important caveat: this is a validation comparison, not a production benchmark. The primary metric for this ticket is Android E2E APK job wall time because it measures the CI job as executed, including setup, cache restore/configuration, Gradle execution, and artifact handling. The data proves the scoped Namespace Gradle cache path works for the Android E2E APK build. It does not prove Namespace is faster than the existing current-runner path.
The current-runner comparison was run through a PR-event native Gradle path so the existing current-runner behavior could be checked without enabling the Namespace setup.
Results and evidence
BUILD SUCCESSFUL in 12m 13s;3647 actionable tasks: 2146 executed, 1501 from cache.BUILD SUCCESSFUL in 4m 16s;3647 actionable tasks: 2155 executed, 1492 from cache.1501 from cache; current runner restored1492 from cache.14m 13son Namespace and12m 44son current runner. Diagnostic metric: Gradle's own build timer was12m 13son Namespace and4m 16son current runner. Both jobs ran native Gradle on the same commit, but they used different cache plumbing: Namespace cache setup plus Gradle init script vs the existing current-runner Gradle cache restore path.1m 29s; the Gradle command timer is useful diagnostic evidence but not the primary CI metric. This PR should remain a scoped compatibility/cache-path trial.To claim performance gains, use a dedicated benchmark design. The current PR should stay scoped to validating that the official Namespace Gradle setup can be wired into the Android E2E APK path without changing current-runner behavior.
Changelog
CHANGELOG entry: null
Related issues
Refs: INFRA-3626
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
CI-only change. No app runtime behavior is changed, so device runtime performance instrumentation is not applicable.
Pre-merge reviewer checklist
Note
Medium Risk
Medium risk because it changes the Android E2E CI build invocation and introduces a conditional Gradle
--init-scriptpath that could affect build determinism or fail if the init script is missing/misconfigured on Namespace runners.Overview
Adds a scoped Namespace Gradle remote build cache setup step to the Android E2E APK GitHub Actions workflow when
runner_provider=namespaceand a full native build is required.Plumbs the generated init script through
GRADLE_INIT_SCRIPTand updatesscripts/build.shto optionally pass--init-scriptto the Android./gradlewinvocation, leaving non-Namespace runners and the non-E2E AAB release path unchanged.Reviewed by Cursor Bugbot for commit 527653f. Bugbot is set up for automated code reviews on this repo. Configure here.