Skip to content

[Due for payment 2025-06-17] Cache reusable native builds in GitHub #58743

Closed

Description

@roryabraham

Proposal: Cache reusable native builds in GitHub

Strategy

The success of Expensify largely depends on rapid and effective engineering output to bring ideas and improvements to market quickly. Systemic problems that slow development for all engineers, have both a real cost and an opportunity cost in wasted time.

Background

As React Native developers, we work mainly with JavaScript, which is updated daily by many contributors. However, React Native requires compiling the native parts of our app every time we build, even when there are no native changes. Existing local and remote caching systems are in place, but they often fail or require manual debugging. For EApp/Hybrid, a complete build can take 20-30 minutes per platform, and new developers sometimes spend hours wrestling with environment-specific build errors.

Problem

When engineers push new changes to the remote or build the app locally, long build times slow down the development process, which prevents us from maintaining efficient feedback cycles.

Solution

We propose a two-part solution:

  • Introduce a small collection of GitHub actions and workflows to build debug and release versions of EApp/Hybrid iOS and Android apps, only when native changes are involved, completely skipping the native build for JS-only changes.
  • Accompany it with a CLI plugin for downloading builds produced and hosted in GitHub CI, instead of building everything once again locally.

Before/After

  • Remote build: ~25mins 100% of the time -> ~7s 90% of the time
  • Local clean build: ~25mins 100% of the time -> ~1.5mins 90% of the time
  • Local cached build: 12-30s 100% of the time -> 12s 100% of the time

For the remaining ~10% containing native changes, only a single remote build will trigger, producing an artifact for everyone to reuse. With the above changes, we can turn 25min long AdHoc builds into a <10s signing step and 25min local builds into 1-2min download steps.

Issue OwnerCurrent Issue Owner: @muttmuure

Activity

  1. removed
    AutoAssignerTriageAuto assign issues for triage to an available triage team member
    on Mar 19, 2025
  2. self-assigned this
    on Mar 19, 2025
  3. deleted a comment from melvin-bot on Mar 19, 2025
  4. roryabraham commented on Mar 19, 2025

    @roryabraham
    ContributorAuthor
  5. adhorodyski commented on Mar 19, 2025

    @adhorodyski
    Contributor

    I've rebased the PR, adding a before-we-merge checklist of smaller details to double check. ccing @staszekscp here as well.

  6. adhorodyski commented on Mar 19, 2025

    @adhorodyski
    Contributor

    Once we're happy with the state of the 1st PR, I'll create a general public post describing in detail the schedule for rolling this out.

    • PR with the CLI merged into main with remoteCacheProvider: null for a 2 weeks period. This will preserve the same style of builds for everyone, both locally and on CI, allowing us to gradually get used to the new style of the CLI and polish any potential rough edges.
    • PR with Github Workflows merged into main to start generating remote artifacts. This is going to run in the background and will enable everyone interested to locally use remoteCacheProvider: 'github-actions' for testing on the debug builds.
    • PR with remoteCacheProvider: 'github-actions' merged into main to change the default behaviour. From then on every environment will default to reusing these builds artifacts.
  7. 112 remaining items

  8. melvin-bot commented on Jun 10, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.63-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-06-17. 🎊

    For reference, here are some details about the assignees on this issue:

  9. melvin-bot commented on Jun 17, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@muttmuure)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  10. parasharrajat commented on Jun 17, 2025

    @parasharrajat
    Member

    All of these PRs were tested and reviewed by me for this task/project.

    Technically, I would request the standard payout of each review as per policy, but a few of them were smaller changes, so I am happy to ignore those. The standard payout for all these PRs would be (8 * 250) = $2000, but I think the more suitable amount would be $1250.

    cc: @muttmuure

  11. muttmuure commented on Jun 22, 2025

    @muttmuure
    Contributor

    Seems fair enough to me

  12. muttmuure commented on Jun 22, 2025

    @muttmuure
    Contributor

    $1250 - @parasharrajat C+

  13. parasharrajat commented on Jun 24, 2025

    @parasharrajat
    Member

    @muttmuure We can close this issue. I will request later. Thanks.

  14. parasharrajat commented on Jun 27, 2025

    @parasharrajat
    Member

    Payment requested as per #58743 (comment)

  15. changed the title [-][Due for payment 2025-06-17] [Due for payment 2025-06-12] [Due for payment 2025-05-28]Cache reusable native builds in GitHub[/-] [+][Due for payment 2025-06-17] Cache reusable native builds in GitHub[/+] on Jul 3, 2025
  16. parasharrajat commented on Jul 5, 2025

    @parasharrajat
    Member

    We can close this issue. Payment is already requested.

  17. JmillsExpensify commented on Jul 9, 2025

    @JmillsExpensify
    Contributor

    $1,250 approved for @parasharrajat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionImprovementItem broken or needs improvement.WeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions