57 Commits

Author SHA1 Message Date
Nicola Corti
79182c2d29 Explicitely set REACT_NATIVE_DOWNLOADS_DIR to use predownloaded deps (#55567)
Summary:
This updates the CI to use `REACT_NATIVE_DOWNLOADS_DIR` so the directory where the C++ dependencies are consumed from is always the same.

This works in conjuction with:
- https://github.com/react-native-community/docker-android/pull/248

## Changelog:

[INTERNAL] -

Pull Request resolved: https://github.com/facebook/react-native/pull/55567

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D93417423

Pulled By: cortinico

fbshipit-source-id: 75664e7d48cbba2483e05c023ac0201fb768ef35
2026-02-16 08:05:19 -08:00
Nicola Corti
9e49b37588 Set LC_ALL: C.UTF8 to further jobs to unblock nightly (#55564)
Summary:
This reapplies the same changes from https://github.com/facebook/react-native/issues/55453 to further jobs that were missing it.
This should unblock nightlies that are currently failing.

## Changelog:

[INTERNAL] -

Pull Request resolved: https://github.com/facebook/react-native/pull/55564

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D93408173

Pulled By: cortinico

fbshipit-source-id: 11823daeb8ef95fb5b9b8942f23f33353b6d6b6b
2026-02-16 04:49:33 -08:00
Salman Muin Kayser Chishti
b9ac40876e chore(ci): update GitHub Actions to latest versions with Node.js 24 support (#54885)
Summary:
Updates all `actions/*` GitHub Actions to their latest versions to ensure compatibility with Node.js 24 and prepare for the [deprecation of Node.js 20 on GitHub Actions runners](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/).

## Changelog:

[Internal] [Changed] - Updated GitHub Actions to latest versions with Node.js 24 support

## Version Updates

| Action | Previous | Current | Release Notes |
|--------|----------|---------|---------------|
| `actions/checkout` | v4 | **v6** | [v6.0.0](https://github.com/actions/checkout/releases/tag/v6.0.0) |
| `actions/github-script` | v6 | **v8** | [v8.0.0](https://github.com/actions/github-script/releases/tag/v8.0.0) |
| `actions/setup-node` | v4 | **v6** | [v6.0.0](https://github.com/actions/setup-node/releases/tag/v6.0.0) |
| `actions/setup-java` | v2/v4 | **v5** | [v5.0.0](https://github.com/actions/setup-java/releases/tag/v5.0.0) |
| `actions/upload-artifact` | v4/v4.3.4 | **v6** | [v6.0.0](https://github.com/actions/upload-artifact/releases/tag/v6.0.0) |
| `actions/download-artifact` | v4/v4.1.3 | **v7** | [v7.0.0](https://github.com/actions/download-artifact/releases/tag/v7.0.0) |
| `actions/cache` | v4 | **v5** | [v5.0.0](https://github.com/actions/cache/releases/tag/v5.0.0) |
| `actions/stale` | v9 | **v10** | [v10.0.0](https://github.com/actions/stale/releases/tag/v10.0.0) |

## Why

GitHub is [deprecating Node.js 20](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/) on Actions runners. The new versions of these actions now run on Node.js 24 by default (`runs.using: node24`).

## Requirements

- Minimum Actions Runner version: **v2.327.1**
- Self-hosted runners should be updated before merging

Pull Request resolved: https://github.com/facebook/react-native/pull/54885

Test Plan:
- PR-triggered workflows (`test-all.yml`, `danger-pr.yml`) will validate core CI
- Other workflows will be validated when their respective triggers occur (schedules, releases, issue events)

Reviewed By: christophpurrer

Differential Revision: D89178299

Pulled By: cipolleschi

fbshipit-source-id: 889ca485486710bb3cd12122bef2731113b66077
2025-12-15 04:20:35 -08:00
Gabriel Donadel
790860782e fix: iOS version mismatch when using nightly prebuilds (#54370)
Summary:
Setting `ENV['RCT_USE_PREBUILT_RNCORE'] = '1'` when running nightlies on iOS will result in the following error:

<img height="608" alt="image" src="https://github.com/user-attachments/assets/130112d7-d4d8-4934-be56-c020a4b204a6" />

The reason for this happening is that we precompile the iOS artifacts on CI using whatever version is set on main (by default version 1000). This works fine when using RCs and stable versions because before the publishing step we do a release commit (e.g 57ff54492f), which updates the react-native version.

This can be easily mitigated by invoking the `set-rn-artifacts-version` CLI right before building the iOS prebuilds.

## Changelog:

[IOS] [FIXED] - Fix iOS version mismatch when using nightly prebuilds

Pull Request resolved: https://github.com/facebook/react-native/pull/54370

Test Plan: Run `node ./scripts/releases/set-rn-artifacts-version.js --build-type` locally

Reviewed By: javache

Differential Revision: D86089144

Pulled By: cipolleschi

fbshipit-source-id: a5c296ea8e022e562f7898803ab37dc61ffd67b6
2025-11-03 03:29:38 -08:00
Riccardo Cipolleschi
c7fb31ce5d Fix releases and nightlies after moving hermes to Hermes repo (#54257)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54257

When moving Hermes to the Hermes repo, we mistakenly updated the nightly and the publish_release job to depend on an non-existing job

## Changelog:
[Internal] - Fix CI jobs for nightlies and releases

Reviewed By: huntie

Differential Revision: D85422837

fbshipit-source-id: 18d4ef73c80032b55f09f27e4b58b399f0a148c9
2025-10-24 03:19:44 -07:00
Jakub Piasecki
e2165619dd Remove steps related to building hermes (#53901)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53901

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D83051151

fbshipit-source-id: a88efd5ff908568a7b85ce6a6812103ee963766e
2025-10-22 09:48:13 -07:00
Jakub Piasecki
e3287d9699 Use the Hermes artifacts in actions (#53837)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53837

Changelog: [Internal]

Replaces usage of Hermes built inside the React Native repository with the release published from the Hermes repo.

Reviewed By: cipolleschi

Differential Revision: D82721725

fbshipit-source-id: 357d5e2b914675ec6e60f810c382a945aa461732
2025-10-22 09:48:13 -07:00
Oskar Kwaśniewski
3ce6a05aac fix: add conditional checks for facebook/react-native repo for nightly (#53700)
Summary:
This PR adds additional checks to run nightly jobs only on the main repo.

I noticed pretty heavy usage on my fork of React Native:

<img width="951" height="179" alt="Screenshot 2025-09-10 at 11 47 29" src="https://github.com/user-attachments/assets/91cb9e4a-8658-42bd-bbfe-ffba01b0b3b3" />

I also noticed a typo in this file with output instead of outputs

## Changelog:

[INTERNAL] [FIXED] - add conditional checks for facebook/react-native repo for nightly workflow

Pull Request resolved: https://github.com/facebook/react-native/pull/53700

Test Plan: Check if the syntax is correct.

Reviewed By: cortinico

Differential Revision: D82104958

Pulled By: cipolleschi

fbshipit-source-id: fc2e6e0299345ebd115c7a574a5a8161f2b0ca5c
2025-09-10 03:57:54 -07:00
Riccardo Cipolleschi
2c752af535 Fix Windows CI (#52666)
Summary:
As per [this issue](https://github.com/actions/runner-images/issues/12416), Windows machine doesn't have access to D: drive anymore

## Changelog:
[Internal] -

Pull Request resolved: https://github.com/facebook/react-native/pull/52666

Test Plan: GHA

Reviewed By: huntie

Differential Revision: D78484060

Pulled By: cipolleschi

fbshipit-source-id: 36d844f9d7d69f1d74a154b019307cc1e269ad66
2025-07-17 05:15:04 -07:00
Riccardo Cipolleschi
b215bde57c Make sure that build_npm_package waits for react-native-core prebuilds (#51956)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51956

While working on landing the prebuild for React Native core in CI, I forgot to add a strong dependency between the build_npm_package job and the prebuild_react_native_core job in the workflow.

It was still technically working, because there are other jobs that are slower than building react_native_core that will delay built_npm_package for enough time, but this fix will make it more robust.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76423766

fbshipit-source-id: 76d91901d63e95add62f26bbff4de0278e8609e3
2025-06-11 08:09:08 -07:00
Riccardo Cipolleschi
2cf1495379 Prebuild React Native core in CI (#51921)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51921

Implemented the CI jobs that builds React Native core in CI and uploads the artifacts for the Debug and Release XCFrameworks and dSYMs

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76338031

fbshipit-source-id: 713fd82f3823c992c3b0fa5cf24952b793834c68
2025-06-11 04:48:54 -07:00
Riccardo Cipolleschi
7f157d2ab3 rename build-ios to build-ios-dependencies (#51480)
Summary:
This change renames the build-ios workflow to build-ios-dependencies to prepare for build-ios-core

## Changelog:
[Internal] - Rename build-ios to build-ios-dependencies

Pull Request resolved: https://github.com/facebook/react-native/pull/51480

Test Plan: GHA

Reviewed By: cortinico, rshest

Differential Revision: D75133854

Pulled By: cipolleschi

fbshipit-source-id: 05282a9c1088917c86e43b4d63a790482c0cf2e6
2025-06-11 04:48:54 -07:00
Riccardo Cipolleschi
a67916fdd2 Bump windows to latests as GH will remove windows-2019 EOM (#51798)
Summary:
As per title, GH is [removing windows-2019](https://github.com/facebook/react-native/actions/runs/15421451006/job/43403215354) at the end of the month. We need to migrate away from them.

## Changelog:
[Internal] - Bump windows runners

Pull Request resolved: https://github.com/facebook/react-native/pull/51798

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D75946994

Pulled By: cipolleschi

fbshipit-source-id: 972b60300c918c0eae0403ed4149347a4ffa8bd0
2025-06-04 04:28:10 -07:00
Riccardo Cipolleschi
2d3285ab60 Bump Xcode to version 16.2 (#51014)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51014

Starting from the [24th of April](https://developer.apple.com/news/upcoming-requirements/?id=02212025a), Apple only accepts app built with Xcode 16.0 or greater

This change bumps our CI to ensure that everything works with Xcode 16.

## Changelog:
[Internal] - Bump CI to Xcode 16.2

Reviewed By: javache

Differential Revision: D73924819

fbshipit-source-id: 82cdca5e12cee505de6e97513c07678776642d88
2025-04-30 09:49:42 -07:00
Riccardo Cipolleschi
b33bc012dc Add step to sign the XCFramework in CI (#49871)
Summary:
This PR adds a step in CI to sign the xcframework if we have a certificate available
bypass-github-export-checks
## Changelog:
[Internal] - Sign XCFrameworks in CI

Pull Request resolved: https://github.com/facebook/react-native/pull/49871

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D70734340

Pulled By: cipolleschi

fbshipit-source-id: 244422bdf9a8e0a2075a727a91805f762d4f95c9
2025-03-07 04:28:07 -08:00
Riccardo Cipolleschi
33c0112b63 Configure gradle to publish RNDependencies to Maven (#49749)
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
2025-02-28 09:05:37 -08:00
Riccardo Cipolleschi
c99b2a4854 Connect the prebuild-ios workflow with other workflows (#49731)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49731

This change runs the prebuilds in all the workflows we need:
- test-all
- nightlies
- create-release

## Changelog:
[Internal] - connect the rebuild-ios workflow with the other workflows

Reviewed By: cortinico

Differential Revision: D70331579

fbshipit-source-id: 6505a32672d43d06e29e68d37bd0ceff21bd7386
2025-02-28 09:05:37 -08:00
Nicola Corti
e49f2d5c50 Enable Gradle Configuration Caching on CI (#49514)
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
2025-02-20 02:42:24 -08:00
Nicola Corti
de5bccf080 Cleanup prealpha logic from the JS Publishing Scripts (#48691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48691

We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68206014

fbshipit-source-id: f05eeae3997d52df1127852e03437a387a01f5ad
2025-01-16 11:36:42 -08:00
Douglas Lowder
f673759c83 feat: Add tvOS support to Hermes artifacts (#46865)
Summary:
Adds tvOS to the list of Apple platforms supported by the Hermes artifacts. After this, the React Native TV builds will be able to use the same Hermes artifacts as those used by RN core.

~Added some code in `hermes-utils.rb` so that the Hermes podspec can use a local Maven repo (`/tmp/maven-local`).~

> *Note:* ~This PR should not be merged until the corresponding Hermes PR https://github.com/facebook/hermes/pull/1529 is merged.~ (https://github.com/facebook/hermes/pull/1529 has been merged)

## Changelog:

[iOS][Added] tvOS support for Hermes artifacts

Pull Request resolved: https://github.com/facebook/react-native/pull/46865

Test Plan: - tvOS is also added to the build and test GitHub workflows.

Reviewed By: rshest

Differential Revision: D64461324

Pulled By: cipolleschi

fbshipit-source-id: d63889c60c72519818e7076cd0ab5851791715a1
2024-10-16 03:39:58 -07:00
Soe Lynn
b93c2b2412 Bump React Native CI to min iOS 15.1 (#46135)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46135

Changelog:
[iOS] - Bump iOS min version for CI

Reviewed By: cipolleschi

Differential Revision: D61604034

fbshipit-source-id: 5d2b0001b6437e62c64d821e36a4183096e8ef74
2024-08-21 12:11:58 -07:00
Nicola Corti
818dd92a4a Align github/* action versions on major (#45542)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45542

As we do have several version numbers for external actions all across the codebase,
here I'm aligning all of them to just use the majors.

I'm doing it only for GitHub first party actions as we trust them,
so minor/patch changes can safely be pulled in without code changes.

Changelog:
[Internal] [Changed] - Align github/* action versions on major

Reviewed By: cipolleschi, blakef

Differential Revision: D59959978

fbshipit-source-id: bb07ce0dfd74d9502a2ac0ea90a2b32f55d6d655
2024-07-19 05:49:03 -07:00
Nicola Corti
6d56cea283 Fix nightly/release workflow (#45537)
Summary:
Nightly/Release workflow are currently broken due to a wrong path reference to a composite action. This fixes it.

## Changelog:

[INTERNAL] - Fix nightly/release workflow

Pull Request resolved: https://github.com/facebook/react-native/pull/45537

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D59959185

Pulled By: cortinico

fbshipit-source-id: 02c556d86105eac35e152b4dc09705bc42c8031a
2024-07-19 04:17:09 -07:00
Nicola Corti
64c3fb84d5 Remove unused build-from-source input (#45533)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45533

This input is unused and is causing a warning on the build pipeline.
I'm cleaning it up.

Changelog:
[Internal] [Changed] - Remove unused build-from-source input

Reviewed By: blakef

Differential Revision: D59958184

fbshipit-source-id: 23ba010da077342605afaaee122bc7ceabc89915
2024-07-19 03:23:12 -07:00
Riccardo Cipolleschi
32943263d0 Factor out build npm package (#45493)
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
2024-07-18 07:05:24 -07:00
Riccardo Cipolleschi
dbbb4069b9 Fix prepare hermes workspace warnings in GHA (#45494)
Summary:
Some of the previous commits changed the names of the parameters on one side and not in another, and GHA is emitting some warnings. This change should fix them

## Changelog:
[Internal] - Fix GHA CI warnings

Pull Request resolved: https://github.com/facebook/react-native/pull/45494

Test Plan:
| BEFORE | AFTER |
| --- | --- |
| <img width="1507" alt="Screenshot 2024-07-17 at 14 20 54" src="https://github.com/user-attachments/assets/6703e554-ad74-4fd6-96ba-18baf5e71a52"> | <img width="1718" alt="Screenshot 2024-07-17 at 14 23 31" src="https://github.com/user-attachments/assets/8bb7bd4a-5bd4-417f-9c8a-e7e8db4ba412"> |

Reviewed By: robhogan

Differential Revision: D59857004

Pulled By: cipolleschi

fbshipit-source-id: e8c5050682aba4952e3a2b0c7a660155813d19f1
2024-07-17 08:08:11 -07:00
Nicola Corti
c1b4133a58 Composite actions inputs should be kebab-case (#45474)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45474

Our actions inputs are now a mixture of different casing.
I'm moving everything to be kebab-case

Changelog:
[Internal] [Changed] -  Composite actions inputs should be kebab-case

Reviewed By: cipolleschi

Differential Revision: D59809181

fbshipit-source-id: af6d541c2b4f5fa162dcde412fb8808bae1ef2d3
2024-07-17 03:48:36 -07:00
Nicola Corti
ec140aa68d Unbreak nightlies by fixing secrets (#45491)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45491

The build_android job was missing the sonatype credentials so could not
publish a -SNAPSHOT version. This fixes it.

Changelog:
[Internal] [Changed] - Unbreak nightlies by fixing secrets

Reviewed By: cipolleschi

Differential Revision: D59848810

fbshipit-source-id: 2cc1d03b090d0aeb3886590ec0696f9c3a6556b9
2024-07-17 03:00:33 -07:00
Nicola Corti
8d0cbbf0e6 Make build_android publish to the staging repositories (#45468)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45468

This should greatly reduce the time spent on build_npm_package
because we're moving all the publishing logic to build_android.

I need to do a bit more testing with nightlies to make sure that everything is published correctly.

Changelog:
[Internal] [Changed] - Make build_android publish to the stating repositories

Reviewed By: cipolleschi

Differential Revision: D59804015

fbshipit-source-id: be3f0b6e16f5fdbf760ec7a5e16c8e258e06dd28
2024-07-16 13:58:43 -07:00
Nicola Corti
16b9b55cf1 actions/upload-artifact to v4.x
Summary:
We don't need to specify a minor/patch for actions/upload-artifact.
We also have all sorts of different versions scattered around the codebase.
This aligns them to the latest sable in the 4.x series.

Changelog:
[Internal] [Changed] - actions/upload-artifact to v4.x

Reviewed By: cipolleschi

Differential Revision: D59811525

fbshipit-source-id: 7264db097bcb2ff34b3ace467996e8308c0f2034
2024-07-16 10:01:21 -07:00
Riccardo Cipolleschi
3d5daa12d4 Factor out build-android (#45455)
Summary:
This change factors out build-android job so we can reuse it

## Changelog:
[Internal] - Factor out the build-android job for code reuse

Pull Request resolved: https://github.com/facebook/react-native/pull/45455

Test Plan: GHA are green

Reviewed By: blakef

Differential Revision: D59802116

Pulled By: cipolleschi

fbshipit-source-id: 12ece8004da3bfd1f275b4af8e9822d4b0ccc0f0
2024-07-16 03:34:34 -07:00
Riccardo Cipolleschi
d2773f0c19 Factor out build-hermesc-windows in separate action (#45432)
Summary:
This change factors out the build hermesc windows job into a separate action to reuse the code in different jobs

## Changelog:
[Internal] - Factor out build hermesc windows for code reuse

Pull Request resolved: https://github.com/facebook/react-native/pull/45432

Test Plan: GHA are green

Reviewed By: blakef

Differential Revision: D59748955

Pulled By: cipolleschi

fbshipit-source-id: bb6b96c93ec7ba6af1a210511ec672907f237b45
2024-07-15 05:50:21 -07:00
Riccardo Cipolleschi
1568a29144 Factor out build hermesc for Linux (#45402)
Summary:
This change factors out the Build HermesC for Linux job so that we can reuse the code in various workflows

## Changelog:
[Internal] - Factor out build-hermesc-linux for code reuse

Pull Request resolved: https://github.com/facebook/react-native/pull/45402

Test Plan: GHA are green

Reviewed By: cortinico

Differential Revision: D59673895

Pulled By: cipolleschi

fbshipit-source-id: f5c680d523866442d25317e880b4803ac89c3741
2024-07-12 03:21:39 -07:00
Riccardo Cipolleschi
7b424f090a Factor out build hermes Macos (#45371)
Summary:
Factor out the build-hermes-macos job to reuse the code

## Changelog:
[Internal] - Factor out build hermes macos action

Pull Request resolved: https://github.com/facebook/react-native/pull/45371

Test Plan: GHA are green

Reviewed By: blakef

Differential Revision: D59627977

Pulled By: cipolleschi

fbshipit-source-id: 84226d8a2c036f816fa8ea949b467873a7eef37c
2024-07-11 03:50:15 -07:00
Riccardo Cipolleschi
0fd4a9447e Factor out hermes slice apple (#45359)
Summary:
Factor out build-apple-slices-hermes to a seprate action to reuse code

## Changelog:
[Internal] - Refactor the CI to reuse code

Pull Request resolved: https://github.com/facebook/react-native/pull/45359

Test Plan: GHA are green

Reviewed By: cortinico

Differential Revision: D59575467

Pulled By: cipolleschi

fbshipit-source-id: 5d253f3dd523cb70b768c62db10fb7ff39fbd49f
2024-07-10 06:38:49 -07:00
Riccardo Cipolleschi
b4b6614034 Factor out build hermesc apple (#45346)
Summary:
Factor out the action to build hermesc for apple platform so we can reuse it across jobs

## Changelog:
[Internal] - Factor out hermesC apple to reuse code

Pull Request resolved: https://github.com/facebook/react-native/pull/45346

Test Plan: GHA are green

Reviewed By: cortinico

Differential Revision: D59521564

Pulled By: cipolleschi

fbshipit-source-id: c99966e314b3d418d1d83d653c0be68b2931b03b
2024-07-10 01:06:39 -07:00
Nicola Corti
b34b694f8e Move all custom actions to kebab-case (#45286)
Summary:
We do have a mixture of casing in the custom GH actions in our repo.
This aligns them all to be `kebab-case`

## Changelog:

[INTERNAL] - Aling all custom actions to kebab-case

Pull Request resolved: https://github.com/facebook/react-native/pull/45286

Test Plan: CI

Reviewed By: blakef

Differential Revision: D59374046

Pulled By: cortinico

fbshipit-source-id: 030a9323e501e375585e90f10a3b29c3bb671b28
2024-07-04 07:57:03 -07:00
Nicola Corti
c0977c39b9 Migrate analyse_code to GHA (#45247)
Summary:
This migrates `analyse_code` to GHA into a single job called `lint`.

## Changelog:

[INTERNAL] - Migrate analyse_code to GHA

Pull Request resolved: https://github.com/facebook/react-native/pull/45247

Test Plan: CI

Reviewed By: NickGerleman

Differential Revision: D59283393

Pulled By: cortinico

fbshipit-source-id: dcdc4828a551062b3706e6450614b8c94e1a7e81
2024-07-03 05:49:47 -07:00
Nicola Corti
258ea84f46 Further refine the Gradle caching logic. (#45233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45233

We want the Gradle cache to be written only on main/-stable branches run, and only for jobs with `cache-read-only` == false (i.e. `build_android`).
This changes implements it.

Changelog:
[Internal] [Changed] - Further refine the Gradle caching logic.

Reviewed By: blakef

Differential Revision: D59225944

fbshipit-source-id: b6c3a5d4d0d399d6fe42287976925c43f3f12eb7
2024-07-02 04:22:43 -07:00
Nicola Corti
c911c89728 Setup git config --global --add safe.directory '*' when running jobs inside Docker (#45231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45231

Following up to cipolleschi's work, it turns out that me setting this command inside
the docker file for React Android is unneffective:
https://github.com/react-native-community/docker-android/pull/228

The reason is that the user executing is different (1001 for the Dockerfile, while GHA executes as root 1000).
So we need to set this, otherwise the nightlies will be invoked with the `-TEMP` prefix:

Changelog:
[Internal] [Changed] - Setup `git config --global --add safe.directory '*'` when running jobs inside Docker

Reviewed By: blakef

Differential Revision: D59223862

fbshipit-source-id: 26674fc8cdaebf6687407072cc4e4f5c38246845
2024-07-01 06:28:51 -07:00
Nicola Corti
e8d3ad7216 Let build_android produce a signed maven-local.zip archive (#45161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45161

This is part of a bigger refactoring of the Android pipelines.
As `build_android` is already building everything, let's save the maven-local
so it can be reused by other jobs (test_android_helloworld and build_npm_package).

Changelog:
[Internal] [Changed] - Let build_android produce a signed maven-local.zip archive

Reviewed By: cipolleschi, blakef

Differential Revision: D59002893

fbshipit-source-id: db03946c975b2ce91dae0c4011981b2fe9dd6113
2024-06-27 09:29:22 -07:00
Riccardo Cipolleschi
cf8d3f8007 Port CI improvements from Release branch to main (#45175)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45175

This change ports the CI improvements we made on stable branch to main.

## Changelog:
[Internal] - Port back to main improvements we made in GHA

Reviewed By: cortinico

Differential Revision: D59053873

fbshipit-source-id: 73eb7e33b9bbdc5d8c3a9294f487ad969b144bf3
2024-06-27 04:11:44 -07:00
Alex Hunt
5f60ad65ca Rename set-rn-version script, mark as deprecated (#45184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45184

This is a follow-up to D59055522.

> NOTE:This diff will be followed up by a merge of the set-rn-version script into set-version. (I had considered a rename to version-rn-artifacts, intentionally keeping this script separate and distinct from a future [lerna version + this script] setup — however the current UX and confusion with this naming would be too confusing. It can move into a util 👍🏻.)

- Rename `set-rn-version` to `set-rn-artifacts-version` (more accurate).
- Mark this script as deprecated.
    - For now, there are too many references to this script in CI test jobs to refactor away this entry point, so I am avoiding this — these should later be standardised to `set-version`.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D59058085

fbshipit-source-id: 4123ac73b5c7a2e07a1d1b6da61e0ad94fc31f84
2024-06-26 10:14:12 -07:00
Nicola Corti
88a9b6e89f Only build_android should write to the Gradle Cache (#45160)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45160

This should optimize the Gradle cache, so that only `build_android` which
effectively builds everything Android related, should be allowed to write there.

More info on this strategy here:
https://github.com/gradle/actions/blob/main/docs/setup-gradle.md

Changelog:
[Internal] [Changed] - Only build_android should write to the Gradle Cache

Reviewed By: cipolleschi

Differential Revision: D59002323

fbshipit-source-id: 31b815747efdf93bfc7baf97799e287c8dcd7f02
2024-06-26 03:40:50 -07:00
Riccardo Cipolleschi
42735717b5 Fix Cache checks in build_hermes_macos (#45127)
Summary:
The cache checks in GHA were performed against bool values, while the actual values are strings.
So the checks were always failing and all the steps were executed, even when not necessary.

The reason why it was failing is because, with this setup, when a cache is hit, some steps were skipped in previous jobs, making following jobs trying to execute code on not-existing files.

## Changelog:
[Internal] - Fix cache for build_hermes_macos

Pull Request resolved: https://github.com/facebook/react-native/pull/45127

Test Plan: GHA are green again

Reviewed By: blakef

Differential Revision: D58947838

Pulled By: cipolleschi

fbshipit-source-id: 8dba216e72a3034fd4c1484418d37bfb78cf314d
2024-06-24 05:54:30 -07:00
Nicola Corti
15909fab95 packages/react-native-gradle-plugin/ -> packages/gradle-plugin/ (#44832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44832

I'm renaming this folder as now we have 2 gradle plugins + we currently have
`package/react-native-gradle-plugin/react-native-gradle-plugin/` which is confusing so we can just call this folder `packages/gradle-plugin/`
to be consistent with the NPM package name

Changelog:
[Internal] [Changed] - packages/react-native-gradle-plugin/ -> packages/gradle-plugin/

Reviewed By: blakef

Differential Revision: D58284883

fbshipit-source-id: 5a7bb40a5d80f6fbab4ffb29e44107453f1013ec
2024-06-21 01:08:00 -07:00
Riccardo Cipolleschi
9c6c637816 Refactor Hermes workspace (#45071)
Summary:
This change is the first step in refactoring GHA so that they can be reused more easily across jobs.
Its goal is also to be more reliable w.r.t. caches.

That this change do:
* moves `prepare_hermes_workspace` to a composite action
	* saves the `prepare_hermes_workspace` caches only on main
	* uploads the destination folder as an artifact so that we can use it later in the run
* makes the `test-all`, `nightly` and `publish-release` workflow use the new composite action
* updates the `setup-hermes-workspace` to download and use the artifact uploaded by `prepare_hermes_workspace`

## Changelog:
[Internal] - Factor out the prepare_hermes_workspace action

Pull Request resolved: https://github.com/facebook/react-native/pull/45071

Test Plan: GHA in CI

Reviewed By: cortinico

Differential Revision: D58808087

Pulled By: cipolleschi

fbshipit-source-id: 42c46bcf75fc73b2edfda9be62b5d0fe8a919a5d
2024-06-20 06:50:23 -07:00
Nicola Corti
a297b30377 Bump reactnativecommunity/react-native-android to 13.1 (#45073)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45073

We can also remove the workaround needed for git `safe.directory`
as this is now configured inside the container as `*`

Changelog:
[Internal] [Changed] - Bump reactnativecommunity/react-native-android to 13.1

Reviewed By: blakef

Differential Revision: D58789791

fbshipit-source-id: f44163a0aa822b19e0dd1106d3f039fd0dc83186
2024-06-20 06:04:45 -07:00
Blake Friedman
927815b9f6 use correct has to label hermes cache key (#45061)
Summary:
This incorrectly used the SHA from facebook/react-native instead of
facebook/hermes to label the hermes cache key. This would bloat our
cache by ~ 1.2GB for each PR.

Changelog: [Internal]

Pull Request resolved: https://github.com/facebook/react-native/pull/45061

Test Plan: We should remove the existing entries for v4-hermes and track the growth over time.

Reviewed By: cipolleschi

Differential Revision: D58780475

Pulled By: blakef

fbshipit-source-id: 0f192faa287f53154f1c8319be6783820d614018
2024-06-19 05:00:41 -07:00
Riccardo Cipolleschi
ae7d543d31 Move HelloWorld jobs from CCI to GHA (#44875)
Summary:
This change migrates the GHA template jobs to the HelloWorld package for iOS.

## Changelog:
[Internal] - Move iOS template jobs to HelloWorld

Pull Request resolved: https://github.com/facebook/react-native/pull/44875

Test Plan: GHA are green

Reviewed By: cortinico

Differential Revision: D58459398

Pulled By: cipolleschi

fbshipit-source-id: 95404445d7375186860af5835b750b4735795434
2024-06-12 10:21:49 -07:00