-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
Description
On some of the CI builds on GitHub Actions, it seems Hermes is being built from source. This increases the build time a lot.
Here are the logs from pod install
:
> pod install
Auto-linking React Native module for target `ReactNativeTestExample`: bob-react-native-test
[Hermes] Downloading Hermes source code for commit 1eb8f7ea3059a338[20](https://github.com/callstack/react-native-builder-bob/actions/runs/3601771799/jobs/6067958978#step:21:21)5c302cea0f5a3057f93049
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 2400k 0 2400k 0 0 1881k 0 --:--:-- 0:00:01 --:--:-- 1881k
100 7376k 0 7376k 0 0 3[23](https://github.com/callstack/react-native-builder-bob/actions/runs/3601771799/jobs/6067958978#step:21:24)6k 0 --:--:-- 0:00:02 --:--:-- 4961k
100 9661k 0 9661k 0 0 3677k 0 --:--:-- 0:00:02 --:--:-- 5374k
[Hermes] Expanding Hermes tarball for commit 1eb8f7ea3059a338205c302cea0f5a3057f93049
[Hermes] Using pre-built HermesC
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`
[Hermes] Detected that you are on a React Native release branch, building Hermes from source but fetched from tag...
From a discussion with @kelset and @tido64, we found this line that results in this behavior: https://github.com/facebook/react-native/blob/0.71-stable/sdks/hermes-engine/hermes-engine.podspec#L46
The CI
variable is set to true
by default on GitHub Actions (and some other CIs): https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
This code was added here: 4b51207
As per @cipolleschi
In the RN CI we don’t enter in this branch because we build the Hermes tarball once and we propagate it to the other jobs (using the HERMES_ENGINE_TARBALL_PATH env variable).
Version
0.71.0-rc.3
Output of npx react-native info
Local environment is not relevant since the issue is on CI.
Steps to reproduce
I was able to reproduce this by triggering an iOS build on GitHub Actions. Link to logs: https://github.com/callstack/react-native-builder-bob/actions/runs/3601771799/jobs/6067958978
Snack, code example, screenshot, or link to a repository
Link to workflow: https://github.com/callstack/react-native-builder-bob/blob/main/.github/workflows/build-templates.yml