[No QA] ci: Fix Remote Build Android failure on hybrid cache hits#83768
Draft
roryabraham wants to merge 2 commits intomainfrom
Draft
[No QA] ci: Fix Remote Build Android failure on hybrid cache hits#83768roryabraham wants to merge 2 commits intomainfrom
roryabraham wants to merge 2 commits intomainfrom
Conversation
The remote-build-android workflow was pinned to an old version of the callstackincubator/android action (1a7d52d) that doesn't handle empty APP_NAME on remote cache hits. When a hybrid build gets a cache hit, the APK is downloaded to .rock/cache/ but the action's internal find step looks for it in the Gradle output directory which doesn't exist (no actual Gradle build ran). This causes the workflow to fail with: find: '.../Mobile-Expensify/Android//build/outputs': No such file Updating to 4cedf4d (same version used in buildAndroid.yml) which includes the fix from callstackincubator/android#12: "support for empty app name and android.injected.signing properties". Made-with: Cursor
… build workflows The remote-build-android.yml and remote-build-ios.yml workflows had their own inline Rock action calls with independently-pinned action versions, leading to version drift (e.g., the Android action version was outdated and broke on cache hits with empty APP_NAME). This refactors both remote-build workflows to delegate hybrid builds to buildAndroid.yml and buildIOS.yml respectively, which already contain the canonical build configuration. Standalone (non-hybrid) builds remain as direct Rock action calls since they have a fundamentally different source layout. Changes to the reusable workflows (buildAndroid.yml, buildIOS.yml): - Accept 'Debug' as a variant alongside Release/Adhoc - Skip 1Password, signing, grunt, and artifact collection for Debug - Adjust Rock action params (no sign/re-sign, simulator destination for iOS, limited architectures for faster cache warming) Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
The
remote-build-android.ymlworkflow was pinned to an old version of thecallstackincubator/androidRock action (1a7d52d) that doesn't handle emptyAPP_NAMEwhen a remote cache hit occurs for hybrid builds.Root cause: When a hybrid build (
Debug,is_hybrid_build: true) gets a Rock remote cache hit, the cached APK is downloaded to.rock/cache/remote-build/instead of the standard Gradle output directory. The old action version then runsfind $ANDROID_SOURCE_DIR/$APP_NAME/build/outputs -name '*.apk'which fails because:APP_NAMEis empty for hybrid builds (the Rock config doesn't haveproject.android.appNameset)build/outputsdirectory doesn't exist since no actual Gradle build ranThis manifests as:
The fix updates the action to
4cedf4d(the same version already used inbuildAndroid.yml), which includes the fix from callstackincubator/android#12: "support for empty app name and android.injected.signing properties".Why it only fails intermittently: The failure only occurs on Rock remote cache hits. When there's a cache miss (e.g., branches that change native code), a full Gradle build runs and
build/outputs/exists, so thefindsucceeds. JS-only branches likerory-strip-hermes-debug-infoshare the same native fingerprint asmain, get a cache hit, and fail.Fixed Issues
$ https://github.com/Expensify/App/actions/runs/22506077619/job/65204854181?pr=83256
Tests
Remote Build Androidworkflow succeeds for both matrix variants (developmentDebug, falseandDebug, true)Offline tests
N/A — CI-only change
QA Steps
[No QA] — CI workflow change only, no application behavior impact.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — CI workflow change only
Android: mWeb Chrome
N/A — CI workflow change only
iOS: Native
N/A — CI workflow change only
iOS: mWeb Safari
N/A — CI workflow change only
MacOS: Chrome / Safari
N/A — CI workflow change only
Made with Cursor