Skip to content

Commit

Permalink
Split Hermes build for iOS on different executors to speed up CI and …
Browse files Browse the repository at this point in the history
…Releases (#38619)

Summary:
This PR splits the build of Hermes for iOS in multiple jobs.

Before, we were building all the slices of Hermes serially. So, we were:
- building the hermesc
- building hermes for iPhone
- building hermes for iPhonesimulator
- building hermes for Macos
- building hermes for Catalyst
- packaging the framework
This job was taking up to 45-50 minutes.

The the four slices (iPhone, iPhonesimulator, Macos, Catalyst) can be parallelized to harvest a speedup in execution.
The following tables contains the executions before and after this change.

- Full Clean Build -> Before:  51' 35" | After:  17'33" ( 3x improvement)

| BEFORE | AFTER |
| --- | --- |
| <img width="1164" alt="Screenshot 2023-07-28 at 11 48 24" src="https://github.com/facebook/react-native/assets/11162307/49cc519c-16f0-4868-b847-602b1cb21f3e"> | <img width="1120" alt="Screenshot 2023-07-28 at 11 16 32" src="https://github.com/facebook/react-native/assets/11162307/85034cd7-751e-4056-ae4f-ed09ac8343e8"> |
| Total time (critical path): `build_hermes_macos-Debug` = 51' 35" | Total time (critical path): `build_hermesc_apple` (2' 56") + `build_apple_slices_hermes-Debug-macosx` (9'23") + `build_hermes_macos-Debug` (5'14") = 17'33" |

- Fully Cached Build -> Before:  4'35" | After:  32" ( 9x improvement)

| BEFORE | AFTER |
| --- | --- |
| <img width="497" alt="Screenshot 2023-07-28 at 14 38 12" src="https://github.com/facebook/react-native/assets/11162307/978eba4d-3524-45ab-bfa5-d9cb9ba63df1"> | <img width="1099" alt="Screenshot 2023-07-28 at 16 12 17" src="https://github.com/facebook/react-native/assets/11162307/f2a8f0bb-545c-4d6f-9b81-cda87151bb62"> |
| Total Time (critical path): `build_hermes_macos-Debug` (4'35") | Total Time (critical path): `build_hermesc_apple` (7") + `build_apple_slices_hermes-Debug-macosx` (7") + `build_hermes_macos-Debug` (32") = 46" |

## Changelog:

[Internal] - Split hermes build to speedup CI and Release

Pull Request resolved: #38619

Test Plan:
- CircleCI stays green
- Hermes artifact still works for RNTester and app from the template

Reviewed By: cortinico, dmytrorykun

Differential Revision: D47896833

Pulled By: cipolleschi

fbshipit-source-id: 3b9e8d5de9b2a6fb6671444fda09d77b96123ac2
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Aug 2, 2023
1 parent a7510a8 commit 79122ab
Show file tree
Hide file tree
Showing 4 changed files with 486 additions and 157 deletions.
Loading

0 comments on commit 79122ab

Please sign in to comment.