Commit Graph

14 Commits

Author SHA1 Message Date
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
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
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
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
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
12f58a6452 Split the rntester APK artifacts in 4 (#45475)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45475

Instead of zipping all the RNTester's APK together, let's
upload them per buildVariant so it's easier to retrieve them later.

Changelog:
[Internal] [Changed] - Split the rntester APK artifacts in 4

Reviewed By: cipolleschi

Differential Revision: D59809721

fbshipit-source-id: 2d375475d5cee71c212f4d1f3a4a9edf3442358f
2024-07-16 10:01:21 -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