165 Commits

Author SHA1 Message Date
Blake Friedman
2d737bbf9a fix: podfile lock cache keys (#45128)
Summary:
These keys weren't evaluating`hashfiles(...)`.

{F1716603166}

## Changelog: [Internal]

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

Reviewed By: cipolleschi

Differential Revision: D58947839

Pulled By: blakef

fbshipit-source-id: d3c36235387a1c54f637b2b9bf53198bd29226e2
2024-06-24 09:40:43 -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
Riccardo Cipolleschi
90d4d55122 Port Create Release fixes from Stable to main (#45063)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45063

While doing the release of 0.75, we have to fix the Create Release action a few times to get it right.
This change contains the fixes from
* e36b46f0c9
* 1b891357b2
* 56e1c8bfdd
* 03591318fb
* 528097709a
* f4b1dd1fa1

## Changelog
[Internal] - Backport changes to Create Release github action

Reviewed By: cortinico

Differential Revision: D58782391

fbshipit-source-id: b68088fb8c4290efcb4599d1b090b18e401e4b66
2024-06-20 03:24:29 -07:00
Blake Friedman
9491deda7a disable run-ci-e2e-tests which depend on template (#45009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45009

This script dependes on the template existing in react-native/template. We're removing this, but can't land that until we disable this test.

Future work could move this test into the react-native-community/template project to validate against RN release candidates to support releases.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D58672744

fbshipit-source-id: c1500aebb0b21afd1ba37785e73dd6a0e1d6020e
2024-06-17 08:02:27 -07:00
Riccardo Cipolleschi
c7d3220f4d Properly export the hermes tarball path to reuse it in RNTester (#44931)
Summary:
While working on GHA, I realized that RNTester is not reusing the hermes package we create in the previous steps.

This change should fix that, saving ~5 minute per RNTester test as it does not have to rebuild hermes every time.

## Changelog:
[Internal] - Improve CI to reuse hermes tarballs

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

Test Plan:
| Before | After |
| --- | --- |
| <img width="847" alt="Screenshot 2024-06-13 at 16 02 32" src="https://github.com/facebook/react-native/assets/11162307/099fd2d4-0954-4e64-baf0-6322e02d57bb"> | <img width="1203" alt="Screenshot 2024-06-13 at 16 34 20" src="https://github.com/facebook/react-native/assets/11162307/f8b9f9b6-0bd3-4ea4-8acd-3a4c1bffbc88"> |

Reviewed By: cortinico

Differential Revision: D58530335

Pulled By: cipolleschi

fbshipit-source-id: e711ae8affd78a4da4b64e6092cfffafd40589e5
2024-06-14 04:42:15 -07:00
Riccardo Cipolleschi
ece68f0efd Remove the trigger-react-native-release to use the GHA workflow_dispatch UI (#44898)
Summary:
This change removes the need for the trigger-react-native-release.js script.
Thanks to the migration to Github Actions, we can now leverage the GHA workflow UI to trigger a Prepare Release job that creates a github tag that will spin a new release.

The pro of this approach are:
- less code to maintain: instead of a complex trigger release scripts, we only have to maintain two very straightforward scripts for the CI
- easier to trigger a release: instead of running a script, we can now just use the GH UI

The `trigger-react-native-release` script was doing the following steps:
- check that we are in the release branch ==> Already implemented in the GHA workflow
- Gets the branch name (not needed) ==> the job will automatically run on the stable branch
- Check for unsent changes (not needed) ==> we are not in a local environment
- get the gh token (not needed) ==> You need to be logged in GH and have write access to the repo
- get the version ==> provided as a parameter
- fails if the tag is already there ==> Functionality added in the workflow
- Parse and validate the version ==> Functionality added to the action prepare-release action + the JS Script
- Compute the npmTag ==> Functionality added to the action prepare-release action + the JS Script
- trigger the release workflow ==> The GH UI does that for us

## Changelog:
[Internal] - Remove the trigger-react-native-release.js

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

Test Plan: Testing in Production!

Reviewed By: cortinico, huntie

Differential Revision: D58461470

Pulled By: cipolleschi

fbshipit-source-id: 32bb0ee91370c9483a29e2ca2e18e24557d5fd53
2024-06-13 08:19:58 -07:00
Nicola Corti
1cb587c620 Do not publish Gradle Scans (#44925)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44925

I have the suspect this is causing our builds to be slower and especially causing the template tests to take 6 hours.
Let's try to disable it.

Changelog:
[Internal] [Changed] - Do not publish Gradle Scans

Reviewed By: cipolleschi

Differential Revision: D58520463

fbshipit-source-id: 028e16a725ea87e178ed4e0bf134737f32780544
2024-06-13 03:41:39 -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
Nicola Corti
b8f1b92298 Setup publishing of Gradle Scans on GHA (#44879)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44879

This sets up publishing of Gradle scans for every build on GHA.

Changelog:
[Internal] [Changed] - Setup publishing of Gradle Scans on GHA

Reviewed By: blakef

Differential Revision: D58419361

fbshipit-source-id: f54365ad259324747248ef0bb726dc64964507f8
2024-06-12 03:47:00 -07:00
Nicola Corti
d0012b7dcd Simplify build_android (#44870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44870

This just simplifies the build_android step on GHA

Changelog:
[Internal] [Changed] - Simplify build_android

Reviewed By: cipolleschi

Differential Revision: D58407537

fbshipit-source-id: 2bb34ef8b8d1883e653914488d4d417356f0f1d2
2024-06-11 08:34:46 -07:00
Riccardo Cipolleschi
7ce5e56f38 Migrate the Prepare Release workflow (#44833)
Summary:
This change migrates the prepare_release workflow from CCI to GHA

## Changelog:
[Internal] - Migrate from CCI to GHA

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

Test Plan: Test on GHA

Reviewed By: huntie

Differential Revision: D58289050

Pulled By: cipolleschi

fbshipit-source-id: 134fc7ffb66a18eec1187e14500daec2828cae61
2024-06-10 09:49:45 -07:00
Saad Najmi
c67dfbbe42 chore(ci): Set retryOnFailure for RNTester iOS Unit and Integration tests (#44642)
Summary:
On React Native macOS (I am not sure with the current state of React Native), the Xcode Unit and Integration tests are a bit flaky. Rather than set "retry on failure up to 3 times" through the pipeline config (in our case, Azure Pipelines), I realized my earlier PR to use Xcode test plans (https://github.com/facebook/react-native/pull/36443) means we can have Xcode retry the test. This should be faster than retrying it on the pipeline, because it retries just the failing test, not the entire "test" step. I did this on React Native macOS, so I'm doing it upstream so we can remove a diff.

## Changelog:

[INTERNAL] [CHANGED] - Set `retryOnFailure` for Xcode Unit and Integration tests

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

Test Plan: CI should pass (faster)

Reviewed By: cortinico

Differential Revision: D57662523

Pulled By: cipolleschi

fbshipit-source-id: 8de2ab0ea15ba4d38c3b5bf96108c0c7ff5e9f32
2024-05-30 07:24:35 -07:00
Rob Anderson
de1967d631 convert circleci to github actions part 3 (#44511)
Summary:
One of the last parts of the migration. This PR foucuses on bringing the template jobs to Github actions.

bypass-github-export-checks

## Changelog:
[Internal] - Migrate template jobs from CCI to GH

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

Test Plan: https://fburl.com/workplace/f6mz6tmw

Reviewed By: blakef

Differential Revision: D57202477

Pulled By: cipolleschi

fbshipit-source-id: be562cd3690d221f094dc734dd501aac25c36f59
2024-05-20 03:09:36 -07:00
Rob Anderson
d224e8c911 convert circleci mac and ios workflows to github actions (#44032)
Summary:
This pull request converts the CircleCI workflows to GitHub actions workflows. This change only inlcudes the mac and ios build and test jobs.

## Changelog:
[Internal] - Migrate iOS to github actions

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

Test Plan:
[Here is the latest workflow run in my fork](https://github.com/robandpdx-org/react-native/actions/runs/8637660560).

 ---
https://fburl.com/workplace/f6mz6tmw

Reviewed By: NickGerleman

Differential Revision: D56581393

Pulled By: cipolleschi

fbshipit-source-id: a806b1a274e3d86c03e66a543360a800187855e4
2024-04-26 02:50:12 -07:00
Rob Anderson
036ffbc530 convert circleci workflows to github actions for android build and test (#43644)
Summary:
This pull request converts the CircleCI workflows to GitHub actions workflows. This change only inlcudes the android build and test jobs.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan:
[Here is the latest workflow run in my fork](https://github.com/robandpdx-org/react-native/actions/runs/8426560047).

 ---
https://fburl.com/workplace/f6mz6tmw

Reviewed By: NickGerleman

Differential Revision: D55417814

Pulled By: cortinico

fbshipit-source-id: 918c6be6fa06bb6605fad6efe21def5fe397f024
2024-04-02 04:04:34 -07:00