Commit Graph

88 Commits

Author SHA1 Message Date
Nicola Corti
b7eccf23de Back out "Do not reset rn-artifacts-version on release branch" (#48651)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48651

Original commit changeset: dace7c931ec3

Original Phabricator Diff: D67975049

Reviewed By: cipolleschi

Differential Revision: D68114130

fbshipit-source-id: 9fb1707191037127b9ae985d2e3298a64e911590
2025-01-14 07:09:27 -08:00
Nicola Corti
a28d3961bd Do not reset rn-artifacts-version on release branch (#48572)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48572

Because of this extra step on build-android, we're seeing the version 1000.0.0-<SHA>
on commits on the release branch. This prevents it.

Changelog:
[Internal] [Changed] - Do not reset rn-artifacts-version on release branch

Reviewed By: cipolleschi

Differential Revision: D67975049

fbshipit-source-id: dace7c931ec310538c11c4b9e544fdc2241a1d0c
2025-01-10 03:44:04 -08:00
Riccardo Cipolleschi
23780f8cb7 Use the app artifact in E2E tests (#48469)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48469

This change downloads the generated artifact and uses it in the E2E tests

## Context

While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration.

I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps:

1. make sure we build all the variants we need
2. store the .app file as an artifact
3. download the artifact and use it in the E2E tests

## Changelog:
[Internal] - Build release variant for RNTester

Reviewed By: mdvacca

Differential Revision: D67800932

fbshipit-source-id: 6f3c8bbc42ad95cabab85dafff00e233a936d136
2025-01-04 09:02:17 -08:00
Riccardo Cipolleschi
9bf7aff882 Fix code to record and upload videos (#48444)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48444

While debugging why the Debug variant was failing, I realised that the code to store video artifacts and the code to record the videos were not working properly.

This diff fixes that

## Context

While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration.

I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps:

1. make sure we build all the variants we need
2. store the .app file as an artifact
3. download the artifact and use it in the E2E tests

## Changelog:
[Internal] - Build release variant for RNTester

Reviewed By: mdvacca

Differential Revision: D67760436

fbshipit-source-id: ee4b034f7c54cbf0b46c0afc16c31389b11353fe
2025-01-04 09:02:17 -08:00
Riccardo Cipolleschi
3d2e5447be Store the RNTester artifacts to speed-up E2E (#48442)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48442

This change stores the RNTester `.app` in an artifact so that E2E tests can reuse it.

## Context

While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration.

I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps:

1. make sure we build all the variants we need
2. store the .app file as an artifact
3. download the artifact and use it in the E2E tests

## Changelog:
[Internal] - Build release variant for RNTester

Reviewed By: mdvacca

Differential Revision: D67760380

fbshipit-source-id: 8be0bbbadf4240dce1bcf5b44dadb41d49ed4c06
2025-01-04 09:02:17 -08:00
Riccardo Cipolleschi
2c338a719e Build Release version for RNTester to speed-up E2E (#48443)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48443

This change makes sure we build the Release variant of RNTester so we can store the generated app as an artifact and forward it to the E2E tests.

## Context

While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration.

I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps:

1. make sure we build all the variants we need
2. store the .app file as an artifact
3. download the artifact and use it in the E2E tests

## Changelog:
[Internal] - Build release variant for RNTester

Reviewed By: cortinico

Differential Revision: D67760372

fbshipit-source-id: 02cc9ec64d5a7b4fa2ad05bca6aa91a69b2b5907
2025-01-02 09:52:22 -08:00
Riccardo Cipolleschi
93117ea1b8 Move E2E scripts to js (#48419)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48419

This change moves the E2E scripts for iOS to a JS script.
This should make it much easier to modify the code in case we need to change it.

## Changelog
[Internal] - Move e2e script from bash to JS

Reviewed By: cortinico

Differential Revision: D67737950

fbshipit-source-id: d0b0411c8a4d688c10e460e70b11dbfc83aaa135
2024-12-31 09:21:18 -08:00
Riccardo Cipolleschi
9ceabd341d Fix iOS E2E Tests (#48400)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48400

A couple of days ago, the iOS CI started failing for the E2E tests on main.
This is because We were not using the hermes artifacts we were preconfiguring.

In fact, this is the log of the `test_e2e_ios_rntester`, which is not using the prebuilt.
{F1974129000}

For comparison, this is the `test_ios_rntester`, which is using the prebuilt
{F1974129001}

While investigating why this was happening, I realized that we were not testing the old architecture anymore, because we forget to update the script after the release of the New Architecture.

This change should fix both.

## Changelog:
[Internal] - Fix E2E tests for iOS and test the Old Arch

Reviewed By: robhogan

Differential Revision: D67670976

fbshipit-source-id: 7d1383a89e06c138f437a9c5f876a2e900878fb0
2024-12-27 07:38:47 -08:00
Riccardo Cipolleschi
e87296f356 Do not install jq as it is already installed (#48363)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48363

jq is already installed on M1 machines on GithubActions. There is no need to install it again and this is outputting a warning in CI:

{F1974100065}

## Changelog:
[Internal] - Do not install jq as it is already installed

Reviewed By: blakef

Differential Revision: D67599961

fbshipit-source-id: 1f621f796b0c67ec877fc35269137537618f47ae
2024-12-23 07:46:02 -08:00
Riccardo Cipolleschi
5b6534e727 Fix typo in configuration (#48364)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48364

The configuration to run E2E tests on maestro has a typo that was outputting a warning in CI:

{F1974100056}

## Changelog
[Internal] - Fix typo on E2E test configuration

Reviewed By: robhogan

Differential Revision: D67599849

fbshipit-source-id: 9504f821172782e188ff524176bc4c2ec48dea97
2024-12-23 07:46:02 -08:00
Riccardo Cipolleschi
03b9f041db Improve E2E Stability for Android (#48286)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48286

This change bumps the specs for the Android E2E tests. This has been reported to improve the stability of the tests.

We need to keep part of the `flatlist.yml` commented as it creates an issue with Maestro as it takes too much memory.

I'll reach out to the people working on Maestro to try and understand what's going on there.

## Changelog:
[Internal] - Improve android Stability and reenable E2E tests on main

Reviewed By: fabriziocucci

Differential Revision: D67276601

fbshipit-source-id: 7cca253547063a0ec39da7de58806286c6632b07
2024-12-17 03:45:18 -08:00
Riccardo Cipolleschi
6c8473e52c Bump maestro to 1.39.5 (#48282)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48282

This change bump maestro to the latest version as it present better reporting.

## Changelog:
[Internal] - Bump maestro to 1.39.5

Reviewed By: fabriziocucci

Differential Revision: D67273486

fbshipit-source-id: da41a002528a3b3c0934f86888da2bb53ae131b7
2024-12-17 03:45:18 -08:00
Nick Gerleman
a28867f952 Remove home-rolled yarn caching (#48237)
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
2024-12-12 09:13:52 -08:00
Riccardo Cipolleschi
9f4b4aba93 Test Old Arch with Maestro (#48244)
Summary:
This pr tests the Old Arch on the Template app using Maestro

## Changelog:
[Internal] - Test old arch in CI with Maestro for template app

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

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D67141524

Pulled By: cipolleschi

fbshipit-source-id: bef3a9b6fec9d7c91d858d534a2d00e91f1842b5
2024-12-12 09:01:31 -08:00
Blake Friedman
05b4146270 ci: verify JS build artifacts aren't committed (#48091)
Summary:
Building our JS packages dirties the repo. This makes sure we don't
accidentally commit these to the repo, as it'll break Flow tests with an
obscure error message.

Changelog: [Internal]

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

Test Plan:
Ran this locally, the GH lint action should run on this PR.
I'll intentionally add a build artifact to validate.
| A | B | C |
| - | - | - |
| ![CleanShot 2024-12-04 at 14 11 16@2x](https://github.com/user-attachments/assets/11c05c32-12c8-4d85-9a28-b3bdffb42ea0) | ![CleanShot 2024-12-04 at 14 11 22@2x](https://github.com/user-attachments/assets/b4c4f1dc-2cb9-4138-8931-13e71c015a6d) | ![CleanShot 2024-12-04 at 14 19 31@2x](https://github.com/user-attachments/assets/953bf783-57ba-4832-bbd8-b36e23a2ccb4) |

Reviewed By: cipolleschi

Differential Revision: D66760144

Pulled By: blakef

fbshipit-source-id: 81f20fa0a83d5f17b5773d1608664b683ba74409
2024-12-06 13:21:23 -08:00
Riccardo Cipolleschi
00d5caee99 Do not install CMake on Windows machine (#48122)
Summary:
GHA to build HermesC for windows are failing because the machines comes with a different CMake version already.
Let's try not to install Cmake and use the one provided by the machine.

## Changelog:
[Internal] -

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

Test Plan: GHA {F1973187648}

Reviewed By: alanleedev

Differential Revision: D66825216

Pulled By: cipolleschi

fbshipit-source-id: 9a9376a5409e192195a6b6cc25b4d58cb47f15da
2024-12-05 09:19:58 -08:00
Riccardo Cipolleschi
0eb9472c69 Allow downgrading CMake to build hermesc on Windows (#47867)
Summary:
CI is failing to build HermesC on windows due to a version mismatch of the CMake already installed

## Changelog:
[Internal] - Fix Windows CI for HermesC

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

Test Plan: GHA

Reviewed By: robhogan

Differential Revision: D66292617

Pulled By: cipolleschi

fbshipit-source-id: 5e8f4f45e33fbdd9ff163b4e8a09cb98d4366dc7
2024-11-21 02:20:30 -08:00
Riccardo Cipolleschi
b32335c299 Only build ios in check nightlies (#47506)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47506

The Check nightlies job prepare a new nightly app with additional libraries and on iOS it builds with `yarn ios`.

The command tries to launch the app on the simulator which sometimes fails and this can make the jobs keep running for hours.

This change make sure that we only build the app

## Changelog:
[Internal] - Only build iOS in CI for Check Nightlies

Reviewed By: blakef

Differential Revision: D65656812

fbshipit-source-id: 14db3738f33f8024c9e99fe206b170209154bac7
2024-11-08 04:28:32 -08:00
Riccardo Cipolleschi
9e399d940a Remove XCBeautify from CI (#47482)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47482

XCBeautify swallow some errors, especially all the linker errors when some symbol is not defined. The full error is not available in the raw log either.

This makes much harder to debug those issues when they happen.

We can remove xcbeautify for the time being, while we find a better solution.

## Changelog
[Internal] - Remove XCBeautify from ci

Reviewed By: dmytrorykun

Differential Revision: D65596745

fbshipit-source-id: 0550d4cbeadc5bec8acc61b5edc1320d3445bcaf
2024-11-07 04:57:49 -08:00
Riccardo Cipolleschi
f94ca27986 Add job to test libraries on nightlies (#47409)
Summary:
We want to test libraries against React Native nightlies to check when we introduce breakig change

## Changelog:
[Internal] - Add CI tests for libraries

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

Test Plan: GHA - https://github.com/facebook/react-native/actions/runs/11700016815/job/32583153239?pr=47409

Reviewed By: cortinico

Differential Revision: D65530787

Pulled By: cipolleschi

fbshipit-source-id: ef4d13c30995f119715ef4f12ea51eaa65152518
2024-11-06 02:32:16 -08:00
Nicola Corti
83d38501b8 setup-gradle v4 + Remove unnecessary Gradle Wrapper Validation (#47389)
Summary:
As per: https://github.com/gradle/actions#the-wrapper-validation-action

> Starting with v4 the setup-gradle action will [perform wrapper validation](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#gradle-wrapper-validation) on each execution. If you are using setup-gradle in your workflows, it is unlikely that you will need to use the wrapper-validation action.

I'm moving to setup-gradle v4 and remove this unnecessary extra action.

## Changelog:

[INTERNAL] - setup-gradle v4 + Remove unnecessary Gradle Wrapper Validation

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

Test Plan: CI

Reviewed By: blakef

Differential Revision: D65435069

Pulled By: cortinico

fbshipit-source-id: c28b4d520e91fea9c59a341fb94598db5fc69900
2024-11-05 03:19:06 -08:00
Riccardo Cipolleschi
f1d2331dfb We use the right filename as hash in CI cache key (#47087)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47087

In the repo, we don't have a `build-apple-framewroks.sh` file, but we do have a `build-apple-framewrok.sh` file, with no ending `s`

## Changelog:
[Internal] - Fix CI cache key

Reviewed By: cortinico

Differential Revision: D64531456

fbshipit-source-id: 05c104390b875eeef2cf15f8a30c8672cfc9b61d
2024-10-17 07:47:51 -07:00
Douglas Lowder
bb8992c760 fix: Add missing tvOS steps to build-hermes-macos GH action (#47073)
Summary:
After examining Hermes artifacts built after merging of https://github.com/facebook/react-native/issues/46865 , it was apparent that tvOS frameworks were missing from the Hermes universal framework generated by CI.

I went back and discovered additional steps that need to be added to the `build-hermes-macos` action to make CI work correctly.

## Changelog:

[Internal][Fixed] add required steps to build tvOS in build-hermes-macos action

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

Test Plan: After merging, Hermes artifacts generated by CI should contain the missing tvOS bits.

Reviewed By: rshest

Differential Revision: D64528911

Pulled By: cipolleschi

fbshipit-source-id: 61db3e154767830a4726d7ceeec229a4af30d247
2024-10-17 02:22:02 -07: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
Riccardo Cipolleschi
40bcf0edba Do not kill emulators when testing (#47030)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47030

Looking at the videos from the E2E tests, it seems that the tests are pretty reliable aside from the first one that often fail. And it looks like it is failing not because the test is wrong, but because maestro hits some sort of timeout and kills the test sooner.

With these changes we are:
- giving more time to maestro to run
- not killing the emulator anymore

Killing and restarting the simulator was making this problem workse, because a newly started simulator required more time to boots and to work properly

## Changelog:
[Internal] - stop killing simulators and increase timeouts

Reviewed By: cortinico

Differential Revision: D64398111

fbshipit-source-id: 17b107fee24d0fbd4897212c1907be3761e337ab
2024-10-15 08:32:37 -07:00
Riccardo Cipolleschi
d4edbcffbf Move E2E tests to larger machines to see if flakyness decreases (#46960)
Summary:
This change move E2E tests to larger mac machines to see if we can reduce the flakyness.
Most of the time the flakyness is due to slowness in connecting to the simulator or slowness in Metro to provide the bundle to RNTester when we run the tests in Debug.
More power should speed-up those processes.

E2E tests took < 30 min in this diff
on Main, they took > 120 min

## Changelog:
[Internal] - Move the E2E tests to bigger machines

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

Test Plan: GHA

Reviewed By: blakef

Differential Revision: D64237659

Pulled By: cipolleschi

fbshipit-source-id: c2458413c8de70c07fae8f2b5f202371c6293815
2024-10-11 05:10:10 -07:00
Riccardo Cipolleschi
94b7793843 Run Maestro tests also in debug mode (#46573)
Summary:
This change runs Maestro tests also in Debug mode, by starting Metro in background.

## Changelog:
[Internal] - Add E2E tests in Debug mode too

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

Test Plan:
GHA must be green.
Successful run: https://github.com/facebook/react-native/actions/runs/11033322135?pr=46573

Reviewed By: cortinico

Differential Revision: D63452169

Pulled By: cipolleschi

fbshipit-source-id: e04b87f6a3e7aca8519dc2cb37c982dff3c20100
2024-09-26 06:01:28 -07:00
Riccardo Cipolleschi
6d61899fc5 Fix analyze_code to use the proper PR number (#46548)
Summary:
Analyze code was still using the CIRCLECI env variable to retrieve the PR number.
This change uses the github one and also removes a duplicated flow check

## Changelog:
[Internal] - Remove duplicated flow check and use gh PR number rather than CircleCI one

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

Test Plan: Tested locally and in CI

Reviewed By: NickGerleman

Differential Revision: D62883758

Pulled By: cipolleschi

fbshipit-source-id: 0c7e97ea9caf4465972424e0b69a899ecfd07095
2024-09-18 02:57:48 -07:00
Riccardo Cipolleschi
f529fe4876 Exclude dSYM from the archive (#46472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46472

Currently, we are building the Debug symbols (dSYM) for hermes dSYM but we are not shipping them with the xcframework.
This is correct, because Debug symbols can increase the size of Hermes thus enalrging the iOS IPA and increasing the download time when installing pods.

We distribute the dSYM separatedly, in case users needs to symbolicate Hermes stack traces.

However the path to the dSYM still appears in the Info.plist of the universal XCFramework and this can cause issues when submitting an app to apple.

This change should remove those lines from the universal framework.

It fixes https://github.com/facebook/react-native/issues/35863

## Changelog
[Internal] - Remove dSYM path from Info.plist

Reviewed By: cortinico

Differential Revision: D62603425

fbshipit-source-id: 038ec3d6b056a3d6f5585c8125d0430f56f11bb9
2024-09-13 08:16:19 -07:00
Riccardo Cipolleschi
d424c24432 Zip slices to preserve symlinks (#46387)
Summary:
When creating Hermes in CI, we build it for MacOS and Mac Catalyst as well.
The slices for these platforms requires symlinks to work properly.
The upload artifacts action on github, when applied to folders, follows the symlinks and copies the destination folder. The result is that Hermes for macOS and Catalyst does not work as expected.

This should fix https://github.com/facebook/react-native/issues/46213.

## Changelog:
[Internal] - Build Hermes in CI properly

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

Test Plan: Tested already in 0.75

Reviewed By: robhogan

Differential Revision: D62355050

Pulled By: cipolleschi

fbshipit-source-id: 7abb85c8a2a88f13e06a49c6cb0caccbdad4551a
2024-09-08 06:27:48 -07:00
Oskar Kwaśniewski
9cc6f007ba chore(iOS): bump socket rocket to 0.7.1 (#46300)
Summary:
This PR bumps Socket Rocket to 0.7.1, this release brings some new improvements and visionOS support. I've also moved the version to a constant.

## Changelog:

[INTERNAL] [CHANGED] - Bump SocketRocket to 0.7.1

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

Test Plan: CI Green

Reviewed By: cortinico, cipolleschi

Differential Revision: D62294833

Pulled By: blakef

fbshipit-source-id: 0e45c7de041710fb1f500b0ac23898b68a8a8936
2024-09-07 02:56:51 -07:00
Riccardo Cipolleschi
b4a2a4e756 Backport Fixes for Create Release Workflow (#46034)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46034

The create release workflow was not working properly for 0.75:

* the latest tag was not pushed because we were using the wrong input
* the latest tag was not deleted because we were not fetching all the tags
* the create release job 'dry-run' defaults to false, which is a bit dangerous

This change is a backport from 0.75 to main of these changes.

## Changelog
[Internal] - Make sure that the Latest tag is properly pushed to github while releasing

Reviewed By: cortinico

Differential Revision: D61331247

fbshipit-source-id: 89bf0698c45ec6c766e25b11599dbe926d8a6297
2024-08-15 06:40:40 -07:00
Oskar Kwaśniewski
58a8fa69b4 ci: add xcbeautify for xcodebuild actions (#45957)
Summary:
This PR adds `xcbeautify` for xcodebuild actions.

Installing `xcodebuild` is not required as its included in every macos runner image: https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md#tools

## Changelog:

[INTERNAL] [ADDED] - add xcbeautify for xcodebuild actions

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

Test Plan: CI Green

Reviewed By: cortinico

Differential Revision: D61012286

Pulled By: cipolleschi

fbshipit-source-id: d0ef3df18963c0ebfc1c856816a63b1cc0259ba5
2024-08-09 06:12:15 -07:00
Nicola Corti
2ca01b4d04 Revert "Remove unnecessary git config --global --add safe.directory" (#45929)
Summary:
This reverts commit 9d9a8d2df6.

## Changelog:

[INTERNAL] - This reverts commit 9d9a8d2df6.

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

Test Plan: CI

Reviewed By: blakef

Differential Revision: D60901502

Pulled By: cortinico

fbshipit-source-id: 2b7a7908a29f031c1f229907aa899a8a6960da4b
2024-08-07 06:39:31 -07:00
Riccardo Cipolleschi
24e7f7d256 Try to restore caches for Hermes (#45908)
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
2024-08-06 06:41:35 -07:00
Riccardo Cipolleschi
3e3f9fc060 Pin maestro version
Summary:
The Maestro team just released a new version of maestro which dies in our CI

This change pins the version to something we know it's working, so we can decide when to move to the next version

## Changelog
[Internal] - Pin Maestro version

Reviewed By: cortinico

Differential Revision: D60380466

fbshipit-source-id: af842b7922736cc08300ac3bceef2d6110bcd913
2024-07-29 05:41:51 -07:00
Riccardo Cipolleschi
44d38c9d4d Run e2e tests only on main and on stable branches (#45706)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45706

## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.

Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.

## Change
To avoid flakyness and costs, let's run E2E tests only on main and on stable branches

Changelog:
[Internal] - Exploration to integrate maestro

Reviewed By: blakef

Differential Revision: D60283204

fbshipit-source-id: 806cb8905cb269f18785158dcc5777ef10e0ef44
2024-07-26 09:57:46 -07:00
Riccardo Cipolleschi
4adc1e3b15 Connect Android RNTester to Maestro (#45709)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45709

## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.

Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.

## Change

Connect RNTester Android to Maestro action

Changelog:
[Internal] - Exploration to integrate maestro

Reviewed By: blakef

Differential Revision: D60282769

fbshipit-source-id: 2a20f1cb249fc5c43b0579c3309efd60369a1da6
2024-07-26 09:57:46 -07:00
Riccardo Cipolleschi
d2cbbb97c3 Add maestro android action (#45707)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45707

## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.

Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.

## Change

Create a github action to run Maestro on Android

Changelog:
[Internal] - Exploration to integrate maestro

Reviewed By: cortinico, blakef

Differential Revision: D60282719

fbshipit-source-id: 9544eea192894696361fada1e519caad35f74154
2024-07-26 09:57:46 -07:00
Riccardo Cipolleschi
b9764c0511 Connect maestro action to RNTester (#45705)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45705

## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.

Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.

## Change

Wire RNTester to the Maestro Action

Changelog:
[Internal] - Exploration to integrate maestro

Reviewed By: blakef

Differential Revision: D60282689

fbshipit-source-id: 51c624c2acf7a27ed5527e7453d9a04678df6c66
2024-07-26 09:57:46 -07:00
Riccardo Cipolleschi
151d4ea68c Create GHA action to run Maestro in CI (#45704)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45704

## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.

Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.

## Change
Create a reusable GHA to run Maestro tests on iOS

Changelog:
[Internal] - Exploration to integrate maestro

Reviewed By: blakef

Differential Revision: D60282657

fbshipit-source-id: 3a2a427f0954b46fc6c3a8bf753e807371eb0239
2024-07-26 09:57:46 -07:00
Nicola Corti
ac0c5fb8b5 Update ccache key to use github.ref (#45698)
Summary:
Update ccache key to use github.ref

## Changelog:

[INTERNAL] - Update ccache key to use github.ref

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

Test Plan: CI

Reviewed By: blakef

Differential Revision: D60277122

Pulled By: cortinico

fbshipit-source-id: 10437e56a398e817fb030d505fbdb6cf7c23031a
2024-07-26 03:02:27 -07:00
Nicola Corti
3df2a86a24 Update ccache path (#45674)
Summary:
The correct path for ccache storage dir is actually `/github/home/.cache/ccache`

## Changelog:

[INTERNAL] - Update ccache path

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D60236560

Pulled By: cortinico

fbshipit-source-id: bbce9081e6647e660c3f80d61d791268de5b75d1
2024-07-25 08:43:19 -07:00
Nicola Corti
eae2240bfc Adding ccache for Android builds (#45662)
Summary:
This adds `ccache` on the Android build to speedup the building process.

## Changelog:

[INTERNAL] - Adding ccache for Android builds

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D60229625

Pulled By: cortinico

fbshipit-source-id: bc7e416f4ed1b4932159feb672947669bfb498d7
2024-07-25 07:33:46 -07:00
Nicola Corti
9d9a8d2df6 Remove unnecessary git config --global --add safe.directory (#45663)
Summary:
`git config --global --add safe.directory` is no longer necessary because is done inside the Docker container.

## Changelog:

[INTERNAL] - Remove unnecessary git config --global --add safe.directory

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

Test Plan: CI

Reviewed By: blakef

Differential Revision: D60229662

Pulled By: cortinico

fbshipit-source-id: aa817ff27adaab3e3105ab22af74a871b377295b
2024-07-25 04:13:16 -07:00
Blake Friedman
4410899ec7 Only cache node_modules on main (#45544)
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
2024-07-19 13:04:07 -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
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
Nicola Corti
6e34283ab3 Remove report-app-size (#45483)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45483

We don't really use this functionality and is getting harder to migrate to GHA,
hence I'm removing it.

Changelog:
[Internal] [Changed] - Remove report-app-size

Reviewed By: cipolleschi

Differential Revision: D59822862

fbshipit-source-id: 2d082454aea3b3c5863bd34556a23c2fc847f841
2024-07-18 04:34:32 -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