Summary:
I've noticed that test_js (20) and test_js (24) are actually running on Node 22.
That's because the `yarn-install` action is invoking setup-node again with the default value (22).
This changes it. Also I'm cleaning up the workflows so that every `yarn-install` invocation is happening just after the `setup-node` invocation.
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/52737
Test Plan: CI which will most likely be red for test_js (20) so will need a follow-up
Reviewed By: cipolleschi
Differential Revision: D78664671
Pulled By: cortinico
fbshipit-source-id: c73390930d1511d1bf0f2d4ea92e83f50b10247f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51923
This diff publishes the Reactcore prebuilds to Maven central so that apps can use it when integrating with React Native
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76338793
fbshipit-source-id: 777c91805573b90ef15209e196cd66801908a5ce
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50396
Integrates the `yarn build-types` script into our CI workflows.
**Notes**
- Will validate type generation in future PRs as part of the `test-all` workflow (this has been stable (i.e. successfully runs for our codebase) for the last 3 weeks).
- This is not load bearing in production code until D71969602.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71975705
fbshipit-source-id: a234a05008b5e75976bbd5258948c37fcc1eeb76
Summary:
When downloading artifacts using a pattern, GHA, by default, creates a folder for each artifacts and copies the artifacts in that folder.
This breaks the maven publishing which expects the artifacts in the `artifact` folder and not i a subfolder.
The `merge-multiple` option allow for the artifacts to be downloaded in the specified folder, without the extra folder in the path
## Changelog:
[Internal] - Avoid the creation of intermediate folder when downloading the artifacts
Pull Request resolved: https://github.com/facebook/react-native/pull/49760
Test Plan:
GHA
<img width="791" alt="Screenshot 2025-03-02 at 11 08 33" src="https://github.com/user-attachments/assets/cfc85b27-117f-4d21-97ef-67493615a5a1" />
Reviewed By: fabriziocucci
Differential Revision: D70462254
Pulled By: cipolleschi
fbshipit-source-id: ed310a90bcdea55e466d4d71942a25abc6e6986a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49749
This change configures gradle and CI to properly publish the RNDependencies artifacts to Maven Central
## Changelog
[Internal] - Configure gradle to publish on Maven Central
Reviewed By: cortinico
Differential Revision: D70390191
fbshipit-source-id: fc1e1070325240584cb07fb17e58118c4c583fa9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49514
This attemps to enable Config Caching on CI. I'm curious to see how much time this is going to save.
There might be some problems with nigthlies so I want to make sure this is running for some days before the branch cut.
Changelog:
[Internal] [Changed] -
Reviewed By: NickGerleman
Differential Revision: D69846848
fbshipit-source-id: 0d5c292e65a6107df62f6494a1aae9abd0e8b6cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48237
Noticed this when trying to diagnose what seemed like a stale caching issue. It effectively reverts D59917944.
D59917944 added logic to only do yarn caching on main, but it has some correctness issues:
1. We cache `node_modules` instead of the yarn cache, which may contain e.g. build artifacts, or other scratch/cache files written (such as anything that writes to `node_modules/.cache`). We really want to be caching the yarn cache, which has pristine packages before install, which I think it will also need to perform the real install anyways.
2. We key the cache on root `package.json`, which is missing a lot of information (both provided by the other `package.json` in the repo, but mostly, the lockfile resolution).
We only save cache when we're on `refs/heads/main` (so continuous builds against main), and supposedly, builds against base branch should be able to restore against those, but recent PR jobs I have seen, where `package.json` has not changed, all have `Cache not found for input keys: node-modules-068350889e87919c1c6c2c220c8d2d92db13f38820bf2efb315d1274b97bc367`
Because of the potential correctness issues, and that the strategy for limiting to main seemingly is not allowing cache to be used in PR, this diff goes back to previous solution, which may store more artifacts (but working cache should also reduce cost by making jobs run faster).
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D67140004
fbshipit-source-id: f74074a498af56b1837fa23cf80795f76935b762
Summary:
We had CI on main failing consistently the past couple of days.
The problem is that the hermes pipeline is failing to create the iOS XCFramework with the error:
> unable to create a Mach-O from the binary at '/Users/runner/work/react-native/react-native/packages/react-native/sdks/hermes/destroot/Library/Frameworks/catalyst/hermes.framework/hermes'
The main cause is this upgrade of [upload-artifacts](https://github.com/actions/upload-artifact/issues/590) which breaks symlinks.
The solution is to bump the caches and downgrade the `upload-artifact` actions.
## Changelog:
[Internal] - Try to fix CI for Hermes
Pull Request resolved: https://github.com/facebook/react-native/pull/45908
Test Plan: GHA must be green
Reviewed By: cortinico
Differential Revision: D60828616
Pulled By: cipolleschi
fbshipit-source-id: 6976b86dd67e2fd9d806ebaa62f47e39dc44b30d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45544
## This diff now does 5 things:
1. removes the old way we used `actions/setup-node` to manage the cache itself.
2. it creates a new `update-node-modules-cache` workflow, which is the only job that will update the node modules cache
3. it create a `yarn-install-with-cache` action that should be used install of directly calling `yarn install --non-interactive`. This will load a cache against a hash of `package.json`.
4. updated the cache reaper to aggressively remove everything but the latest `npm-{{ hash('package.json') }}`.
5. removed a `cache-setup`, which couldn't be used (we're using artefacts now).
## Why are we doing this:
The various `node-cache-` keys for platforms and on various branches accounts for a very large proportion of the cache (10-20%).
We don't frequently change these dependencies, and even when we do running `yarn install` after loading the cache will resolve any issues.
Limiting the cache to `main` and aggressively pruning older cache entries will clean up a lot of "small win" caching.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D59917944
fbshipit-source-id: 4be6f1959e8fde642a4f208f7d19aceba2c3262f
Summary:
Factor out the Build NPM package job in a separate action for code reuse
## Changelog:
[Internal] - Factor out the Build NPM package job in a separate action for code reuse
Pull Request resolved: https://github.com/facebook/react-native/pull/45493
Test Plan: GHA are green
Reviewed By: robhogan
Differential Revision: D59858572
Pulled By: cipolleschi
fbshipit-source-id: 561a215ba5812352034157aa254999db56fcd31e