Граф коммитов

358 Коммитов

Автор SHA1 Сообщение Дата
Rob Hogan a0483991f4 CircleCI: Remove `test_codegen` (#34733)
Summary:
The CircleCI `test_codegen` job currently runs tests under `packages/react-native-codegen`. Because it runs from that working directory, it doesn't pick up the project root's `jest.config.js`, which is a problem for https://github.com/facebook/react-native/pull/34724 (snapshot format configuration in `jest.config.js`)

`react-native-codegen` tests are *already run* by the `test_js` job, as can be seen from the CircleCI logs
https://app.circleci.com/pipelines/github/facebook/react-native/15818/workflows/41034d00-7061-46e8-a03d-abdcc7fd7e2f/jobs/295804/parallel-runs/0/steps/0-107 , so the job isn't necessary, and this PR removes it. CC cipolleschi

## Changelog

[Internal] [Fixed] - Remove redundant `test_codegen` job from CircleCI.

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

Test Plan: CircleCI!

Reviewed By: lunaleaps

Differential Revision: D39660829

Pulled By: robhogan

fbshipit-source-id: d7b09cc90a30e7604e2645e2bd0c16f840443153
2022-09-20 11:08:28 -07:00
Rob Hogan 408471f041 CircleCI: Use `nodejs-lts` for Windows tests (#34726)
Summary:
Currently we use `nvm install 16` in the `test_windows` CircleCI job. With the "official" non-Windows NVM, this means latest 16 (16.17.0), but that's not the case for NVM-Windows, [which simply appends `.0.0`](https://github.com/coreybutler/nvm-windows/blob/1.1.7/src/nvm.go#L384) unless [the major version is one character long](https://github.com/coreybutler/nvm-windows/blob/1.1.7/src/nvm.go#L210). The Windows orb includes NVM-Windows 1.1.7 (even on the latest 5.0.0 orb), which does not support `nvm install lts` (added 1.1.9). Updating NVM isn't trivial as the system/orb version takes precedence over any Chocolately installation.

Running tests on 16.0.0 blocks Jest 29, which requires [`^16.10.0`](https://github.com/facebook/jest/blob/v29.0.3/packages/jest-create-cache-key-function/package.json#L17).

I initially tried installing a specific Node JS version with NVM, but NVM-Windows 1.1.7 doesn't support newer Node versions due to https://github.com/npm/cli/issues/4234.

So this PR switches from using NVM-Windows to just using Chocolately Node JS packages. `nodejs-lts` tracks the latest LTS. IMO, given we're only testing against one Node JS version with Windows, the latest LTS is a good option, but versions can be specified with `--version` if we want to pin it instead.

Yarn is available through [corepack](https://nodejs.org/api/corepack.html#corepack) since 16.9, so doesn't need to be installed separately.

## Changelog

[Internal] [Fixed] - CircleCI: Update Node JS version used on Windows tests from 16.0.0 to 16.17.0

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

Test Plan: Tested via painful trial and error on my fork: https://app.circleci.com/pipelines/github/robhogan/react-native/19/workflows/0c23a77f-40d2-4c36-933b-53c14acb7907

Reviewed By: cipolleschi

Differential Revision: D39647377

Pulled By: robhogan

fbshipit-source-id: 733da49c632eab26a09ba9cd0175419b9144f9d2
2022-09-20 03:32:04 -07:00
Luna Wei 6b2a511cbb Move TypeScript declarations into react-native (#34614)
Summary:
## Changelog
[General] [Added] - Add `types` folder to house TypeScript types.

Release TypesScript types with react-native and eventually deprecate [types/react-native](https://www.npmjs.com/package/types/react-native).

The current plan is to release types/react-native for 0.70 and 0.71 while also maintaining types here. This will result in some double maintenance until 0.72 but will give community time to move off of types/react-native.

After this lands, there have been changes on `main` of types that we need to update. Then, when we release 0.71 from DefinitelyTyped, we can simply copy over the `types` folder from this repo.

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

Test Plan:
`yarn run test-typescript` for linting types

* Created a new project using the TS template and my local clone of `react-native` on this branch.
`npx react-native init MyTSApp --version <path-to-my-local-rn-repo> --template react-native-template-typescript`
* Updated the `package.json` to remove `types/react-native`
* Deleted my node_modules and re-ran yarn
* Opened MyTSApp in VSCode and verified the type suggestions appeared and cmd+click to defnitions took me to the node_module dependency `react-native/types`

## Danger is failing on this PR and it's expected
 as it runs off the changes on `main`.  [This is expected](https://docs.github.com/en/github-ae@latest/actions/using-workflows/events-that-trigger-workflows?fbclid=IwAR2_AE0Jwndt8Gu-iTQnxGxLJq7nakbi7sz8jwZ6U62JWLSdcZuvjcQ6WvE#pull_request_target). However testing it locally passes. Once merged, and these changes are on `main`, danger will pass again.

```
$ react-native/packages/react-native-bots
❯ yarn danger pr https://github.com/facebook/react-native/pull/34614
yarn run v1.22.19
$ ..react-native/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/34614
Starting Danger PR on facebook/react-native#34614

Danger: ✓ found only warnings, not failing the build
## Warnings
🔒 package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>

  Done in 13.24s.
```

Reviewed By: mdvacca

Differential Revision: D39479137

Pulled By: lunaleaps

fbshipit-source-id: 1d506f812d566b783b6e79104cd6339b077a42a7
2022-09-19 12:26:00 -07:00
Luna Wei 767f8e0249 Add bots as a yarn workspace and update danger action (#34652)
Summary:
allow-large-files

When working on https://github.com/facebook/react-native/pull/34614, danger is failing because it doesn't share `node_modules` with the root directory where `typescript` is installed as we added it as a parser in our eslint config.

By setting `bots` as a yarn workspace, dependencies are all installed under the root `node_modules` folder and in local testing (detailed in test section) we no longer have the `typescript module not found` error. However, danger will continue to fail on https://github.com/facebook/react-native/pull/34614 as the `danger_pr` Github action runs from what's defined on `main`.

Once these changes land, I can rebase https://github.com/facebook/react-native/pull/34614 on it and danger's eslint should pass.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal][Fixed] - Add `bots` directory as a yarn workspace and update `danger_pr` Github action

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

Test Plan:
To verify this fix I had to run:
```
react-native $ yarn && cd bots
react-native/bots$ yarn run danger pr https://github.com/facebook/react-native/pull/34614
```

which resulted in
```
❯ yarn run danger pr https://github.com/facebook/react-native/pull/34614
yarn run v1.22.19
$ lunaleaps/react-native/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/34614
Starting Danger PR on facebook/react-native#34614

Danger: ✓ found only warnings, not failing the build
## Warnings
🔒 package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>

  Done in 12.78s.
```
Verified this also on another PR:
```
yarn run danger pr https://github.com/facebook/react-native/pull/34650
```

Reviewed By: NickGerleman

Differential Revision: D39435286

Pulled By: lunaleaps

fbshipit-source-id: 8c82f49facf162f4fc0918e3abd95eb7e4ad1e37
2022-09-12 22:03:34 -07:00
Vincenzo Vitale 90e7f510dc Test the Android Template with the JSC engine (#34664)
Summary:
https://www.internalfb.com/T131530362

We are testing the New App template in CircleCI.

For Android we test the combination of Debug/Release and Old/New Architecture, and always use the Hermes engine.
We don't test the JSC engines (in iOS this is already happening).

We're not automatically testing that we can create a new project with JSC, forcing release managers to do it manually.

## Changelog

[Android] [Added] - Automatic testing of the new project template with the JSC engine.

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

Test Plan:
- Open the circle-ci dashboard
- Verify there are now 8 jobs adeed to the pipeline:
```
test_android_template-Debug-Hermes-false
test_android_template-Debug-Hermes-true
test_android_template-Debug-JSC-false
test_android_template-Debug-JSC-true
test_android_template-Release-Hermes-false
test_android_template-Release-Hermes-true
test_android_template-Release-JSC-false
test_android_template-Release-JSC-true
```
- Verify they are all passing.

Reviewed By: cortinico

Differential Revision: D39426388

Pulled By: vincenzovitale

fbshipit-source-id: e5d606b1cc3ace53f8dab0f7d6d7d06ab11a2b46
2022-09-12 12:33:07 -07:00
Riccardo Cipolleschi 0e8050dbca Update debian to fix CI (#34634)
Summary:
The keys of the current debian version expired again. This PR is an attempt to use a different version

## Changelog

[General] [Fixed] - Update debian version

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

Test Plan: CircleCI is green

Reviewed By: sammy-SC

Differential Revision: D39350344

Pulled By: cipolleschi

fbshipit-source-id: 6c77cc60cbc56a9fe8362ffa0472f96bce58b28e
2022-09-08 08:19:11 -07:00
Riccardo Cipolleschi 18119422ae Run Codegen Tests in CI (#34596)
Summary:
This PR runs the Jest test for the Codegen package in CI.

## Changelog

[General] [Added] - Run Codegen Tests in CI

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

Test Plan: CircleCI should show a new job for the tests. The job should be green.

Reviewed By: NickGerleman

Differential Revision: D39275645

Pulled By: cipolleschi

fbshipit-source-id: 29133c933f134802029406ff255b62d27681c8ff
2022-09-07 02:57:28 -07:00
Riccardo Cipolleschi bf6a24bd46 Add Matrix tests for Flipper/NoFlipper (#34595)
Summary:
This PR adds some tests to verify that we can build the template in every Debug configuration using Flipper and without Flipper.

## Changelog

[iOS] [Added] - Add CircleCI tests to verify that we can run the Template with and without Flipper

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

Test Plan: CircleCI is green

Reviewed By: cortinico

Differential Revision: D39262137

Pulled By: cipolleschi

fbshipit-source-id: dae45b106cd13fb69442ea216005cee114d861f4
2022-09-06 03:25:45 -07:00
Riccardo Cipolleschi 12e5842e11 Fix/android (#34573)
Summary:
This PR should fix the issues introduced by commit c34659a5d3.
The problem is that `Collections.emptyList` creates a `List<Object>` which is not compatible with the `List<TargetView>` type.

## Changelog

[Android] [Fixed] - Make Android CI build again.

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

Test Plan: test_buck and the "test Docker android"  must be green.

Reviewed By: cipolleschi

Differential Revision: D39235674

Pulled By: cortinico

fbshipit-source-id: 574338e74aeb4635c67d91de28780fb784c9f405
2022-09-02 03:23:45 -07:00
Riccardo Cipolleschi 4352459781 Add matrix for Debug/Release, New/Legacy Architecture, (No)Hermes (#34469)
Summary:
This PR is the dual of the Matrix Tests we added to the Android Template a couple of weeks ago. It adds the same tests to iOS, to verify that the template builds with both architectures and with both configurations (Debug/Release).. And it tests that the template works with both Hermes and without it.

## Changelog

[iOS] [Added] - Test iOS template with both architectures and configurations

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

Test Plan: CI is green in all the 8 new jobs.

Reviewed By: hramos, cortinico

Differential Revision: D39087876

Pulled By: cipolleschi

fbshipit-source-id: 1205b2339bac87cf11b4f356a2e50e1e93ba52bc
2022-08-31 08:54:06 -07:00
Riccardo Cipolleschi ff7f5a332f Update the cache keys to fix Hermes (#34491)
Summary:
This PR bumps the Hermes cache keys because they got corrupted due to some sync delay between Hermes and React Native.

## Changelog

[iOS] [Fixed] - CI broken due to Hermes Commit

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

Test Plan: CI should be green

Reviewed By: dmitryrykun

Differential Revision: D38976132

Pulled By: cipolleschi

fbshipit-source-id: 16df11ede8947d8376d316b126eefcf0177d16de
2022-08-24 05:16:33 -07:00
Riccardo Cipolleschi 49a235484e Reverting shallow checkout in circleci because its breaking CI (#34480)
Summary:
As per title, the shallow checkout was breaking some workflows, so we are reverting it

## Changelog

[General] [Changed] - Revert shallow checkout

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

Test Plan: CI should be green

Reviewed By: dmitryrykun

Differential Revision: D38940528

Pulled By: cipolleschi

fbshipit-source-id: 691faf2749911278923ca2d42c974e5307a06261
2022-08-23 06:43:01 -07:00
Héctor Ramos 5f0fac572d Bump Xcode version to 13.4.1 (#34472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34472

Use Xcode 13.4.1 in Circle CI.

Changelog: [Internal]

Reviewed By: dmitryrykun

Differential Revision: D38880494

fbshipit-source-id: 2e24b411c448ed6de7099416122bf3c97ddcf985
2022-08-22 14:37:41 -07:00
Breadman Da e142de0928 Make CircleCI run shallow clones of the React Native repo (#34455)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34455

# Changelog
[General][Fixed] - Fix shallow cloning break on main.

Introduced in [#34438](https://github.com/facebook/react-native/pull/34438)
Failed to fix in [#34453](https://github.com/facebook/react-native/pull/34453)

Reviewed By: cipolleschi

Differential Revision: D38859731

fbshipit-source-id: 8c5f5ee04ff0f08a6a3af1266ef399a36fde9ae8
2022-08-19 04:42:47 -07:00
Breadman Da fb936dfffb Make CircleCI run shallow clones of the React Native repo (#34453)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34453

# Changelog
[General][Fixed] - Fix shallow cloning break on main.

Introduced in [#34438](https://github.com/facebook/react-native/pull/34438)

Reviewed By: cipolleschi

Differential Revision: D38858746

fbshipit-source-id: c632bad0dd4ed646065a6daa838035dc9ee5caf2
2022-08-19 03:15:55 -07:00
throwaway-fishery 674783574a Make CircleCI run shallow clones of the React Native repo (#34438)
Summary:
## Changelog
[General][Changed] - Change all instance of `checkout` to shallow checkout with a default `--depth` value of 1.
Keep booleans fully lowercase `true`, `false`.

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

Reviewed By: cipolleschi

Differential Revision: D38784506

Pulled By: throwaway-fishery

fbshipit-source-id: 679f25219d9099da1cb0c5b6cff6db6f48ab6f2e
2022-08-19 01:39:48 -07:00
Nicola Corti 4699a39489 Isolate the buck OSS commands inside test_buck (#34378)
Summary:
This isolates and parallelize all the BUCK related work inside a `test_buck` job, so it's immediately clear where a failure happend.

I've also added a couple of minor improvements:
- Don't clone okbuck just to consume a script. I've copied the script over instead.
- Removed unnecessary `buck_cache_key`

This should reduce ~5 minute of build time from Test Android which was already beyond 10 minutes.

## Changelog

[Internal] - Isolate the buck OSS commands inside test_buck

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

Test Plan: Let's wait for a `test_buck` and `test_android` output.

Reviewed By: cipolleschi

Differential Revision: D38580359

Pulled By: cortinico

fbshipit-source-id: 8b3915bbc28b4a7a169011fe9047f402c2d1f6ee
2022-08-11 02:46:00 -07:00
Nicola Corti b4f6262bcc Setup a build matrix for test_android_template (#34355)
Summary:
I'm extending `test_android_template` to use a CI Matrix. This will allow us to make sure that we test a new app template against Debug/Release and against New/Old Arch.

This will make sure we catch a lot of bugs early on 👍

## Changelog

[Internal] - Setup a build matrix for test_android_template

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

Test Plan: Will wait for a green CI

Reviewed By: cipolleschi

Differential Revision: D38499773

Pulled By: cortinico

fbshipit-source-id: 5a24c21d111fb4ae0f4600d86b786021f6ad2abe
2022-08-08 04:44:48 -07:00
Riccardo Cipolleschi 2fa04be062 Fix edge case where prepare_hermes_workspace and build_hermes_macos where using different hermes commits (#34329)
Summary:
This PR fixes an edge case where `prepare_hermes_workspace` job was using a commit to build hermes but `build_hermes_macos` was using a different one. This resulted in cache poisoning where subsequent jobs thoughts to be using a version of Hermes while the restored cache was loading a different one.

<img width="1440" alt="Screenshot 2022-08-03 at 06 26 14" src="https://user-images.githubusercontent.com/11162307/182570809-5c6d9323-c3fb-4834-952f-7d07b99c4880.png">

This PR simplifies the flow, creating a single `.hermesversion` file in the `prepare_hermes_workspace` workspace and using that file as key for all the caches.

## Changelog

[iOS] [Changed] - upload test result as artifact

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

Test Plan:
CircleCI is now green and all the caches are using the same file to create the checksum.

We can verify that by looking at the `Save cache`/`Restore cache` commands related to Hermes. (In the workflow, their hash is always `B1NEL0P0OKhQYtk8DE150bXSoGrdWUweedHKmqNqnjo`)

Also, we removed completely the code that could create a version misalignment.

Reviewed By: cortinico

Differential Revision: D38382895

Pulled By: cipolleschi

fbshipit-source-id: 5f5501a7ef313eb56abda336716b24b486a34a1f
2022-08-03 03:34:29 -07:00
Riccardo Cipolleschi ccdf9ac985 Reduce flakiness of CI (#34235)
Summary:
How the Hermes cache worked had a concurrency issue. It used to work by asking the Hermes repository for the latest commit and using that commit as cache key to try and retrieve a built version of Hermes to avoid to compile it more than once.

The problem happened when the `build_hermes_macos` was building Hermes using a commit A.
While building, another PR could be merged into `hermes:main`, creating commit B.
When this happened, the tasks `test_ios` and `test_ios_rntester`would try to retrieve a cached version of Hermes using commit B. That version did not exist because Hermes was created using commit A, and the job would either fail or trying to build Hermes from source, ending up taking a lot of time.

This PR attaches the `.hermes-cache-key-file` to the workspace and restores it in the other jobs, making sure that the same cache key is used in all three jobs.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Changed] - Attach the `.hermes-cache-key-file` to the workspace to avoid race conditions for new PR landing on Hermes and changing the head commit between the time Hermes is built and the time it has to be consumed.

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

Test Plan:
Tested manually, looking at the messages in CI.

**build_hermes_macos**
<img width="881" alt="Screenshot 2022-07-21 at 15 40 02" src="https://user-images.githubusercontent.com/11162307/180241834-776f2291-63bb-4bb2-8837-14434b50fe61.png">

**test_ios_rntester**: notice that the `echo` is not executed, meaning that the `if` does not evaluate to true and, therefore, the file has been correctly attached.
<img width="956" alt="Screenshot 2022-07-21 at 15 40 52" src="https://user-images.githubusercontent.com/11162307/180242004-d9db0336-18d3-4321-a997-b538baa6beee.png">

**test_ios**: notice that the `echo` is not executed, meaning that the `if` does not evaluate to true and, therefore, the file has been correctly attached.
<img width="900" alt="Screenshot 2022-07-21 at 15 46 33" src="https://user-images.githubusercontent.com/11162307/180243359-79de5c7a-d2f0-4331-90c6-5bd2c0b5e1ac.png">

Reviewed By: cortinico

Differential Revision: D38037386

Pulled By: cipolleschi

fbshipit-source-id: 4db4f7c478e1afb2e4a18ba3d3f70896ed41d235
2022-07-22 05:56:02 -07:00
Riccardo Cipolleschi 9923ac1b52 Properly cache sdk/hermes to improve build times (#34209)
Summary:
Currently, iOS jobs takes up to 2 hours to run.
This is firstly due to Hermes being rebuilt at least 3 times during the CI process.

One issue I discovered is that the `Hermes-SDK-Cache-Key` was depending on the `{{ .Environment.CIRCLE_JOB }}` which is different from all the jobs (`test_ios_rntester`, `test_ios` and `build_hermes_macos`) which forced hermes to be build 3 times.

Another issue I found was that we were not caching hermes at all the first time we build it, during the `build_hermes_macos` step.

To ensure that `test_rn_tester` and `test_ios` has a valid version of Hermes from the cache, they now depend on the `build_hermes_macos` job

## Changelog

[iOS] [Changed] - Add caching for Hermes when we build it, updated the hermes_sdk_cache_key, update job dependencies

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

Test Plan:
CircleCI must be green and take less than 2 hrs
**Before**
{F753846143}

**After**
{F753846214}

Reviewed By: cortinico

Differential Revision: D37959500

Pulled By: cipolleschi

fbshipit-source-id: c3435717bfa71e7488326894cd1ad7638044004e
2022-07-20 09:12:47 -07:00
Riccardo Cipolleschi 361d939afd Build Hermes in CI also when it is against stable branch (#34224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34224

This Diff is a copy of this [PR](https://github.com/facebook/react-native/pull/34228) that we have against 0.69-stable.

This Diff makes sure we can build Hermes also in PR that are created against a stable branch

## Changelog

[General] [Changed] - Make sure we can build Hermes from source when PR are opened agains -stable

Reviewed By: cortinico

Differential Revision: D37961092

fbshipit-source-id: 65577fcc69f0e2a68377cbd46e3bd3a6af24e7c3
2022-07-20 08:53:38 -07:00
Héctor Ramos cd8dbd15ff Circle CI: Create GiHub Release draft when bumping version
Summary:
Automatically create a GitHub Release draft when a new React Native release is created.

The GitHub Release will be created by the same Circle CI job that publishes the package to npm.

This job will also upload the built Hermes binaries to the GitHub release.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D36646696

fbshipit-source-id: 0a863dc4e3215fc95f7852f8dc43858cdd852aaa
2022-07-14 13:42:08 -07:00
Héctor Ramos 340612a200 Hermes: Use shared JSI from React Native on iOS (#33885)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33885

When building Hermes for React Native, point to the React Native JSI location to ensure both React Native and Hermes use the exact same version of JSI.

Changelog:
[iOS] [Changed] - When Hermes is enabled, it will use the same copy of JSI as React Native

Reviewed By: cortinico, cipolleschi

Differential Revision: D36567471

fbshipit-source-id: 97d954ef34007bd31f008fab451512194060d670
2022-06-09 13:11:46 -07:00
Héctor Ramos d592bdcbd3 Hermes: Use pre-built Hermes runtime in iOS Template tests (#33974)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33974

Enable Hermes in iOS Template tests and use pre-built Hermes binaries from Circle CI.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D36989241

fbshipit-source-id: a240713d0bd0383fa218f8fc031e81467ebeb376
2022-06-09 11:18:30 -07:00
Nicola Corti d5e0659fcc Backport Changes needed to let Hermes actually download the compiled tarball.
Summary:
I'm backporting PR https://github.com/facebook/react-native/pull/33945 to main
as it was merged on the release branch to unblock 0.69.

Those changes are necessary as Hermes was not being donwloaded at all during `pod install`
on .69 and the app was failing to build with a missing `hermes/hermes.h` import.

Changelog:
[iOS] [Fixed] - Fix Hermes not being properly downloaded during pod install

Reviewed By: hramos

Differential Revision: D36810787

fbshipit-source-id: f898e61b6536dfcfc81feeff740703fbd697b000
2022-06-02 12:34:15 -07:00
Héctor Ramos 0ad38a0eae Bump React Native iOS tests to Xcode 13.3.1
Summary:
Upgrade the version of Xcode used in Sandcastle to Xcode 13.3.1, and the version used on Circle CI to Xcode 13.3.1.

Added a reminder to the Circle CI config to ensure we keep these versions in sync in future updates.

Circle CI software manifest: https://circle-macos-docs.s3.amazonaws.com/image-manifest/v7555/index.html

Changelog: [Internal]

Reviewed By: makovkastar

Differential Revision: D36671468

fbshipit-source-id: 8c028915d38738c92b5f759186b0fb95a9274211
2022-05-25 11:44:42 -07:00
Héctor Ramos 8e80dc844c Circle CI: Build Hermes apple runtime artifacts on CI (#33876)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33876

WIP. Published so we can export and test on CI.

These two jobs can likely be merged onto the existing build_hermesc_macos job.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D36538847

fbshipit-source-id: e52c39ccfe652e70c54fd4892513c0060c3f021d
2022-05-23 12:14:29 -07:00
Franco Meloni b149d2a0d6 Run Danger on all the PRs and use fail or warning where is needed (#33872)
Summary:
Run Danger on all the PRs, not just on the forks, use fail or warning where is needed and make CircleCI fail if danger fails

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] - Run Danger on all the PRs and use fail or warning where is needed.

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

Test Plan: Run the change on CirlceCI

Reviewed By: cortinico

Differential Revision: D36516847

Pulled By: f-meloni

fbshipit-source-id: 2c956295a56cc8aa47df4c64f8ca0a211796c73c
2022-05-23 01:12:25 -07:00
Franco Meloni 7b703eb78b Cache .git to improve checkout time (#33845)
Summary:
Caching the .git to speed up the checkout.

https://circleci.com/docs/2.0/caching/#source-caching

<img width="1429" alt="Screenshot 2022-05-17 at 11 11 54" src="https://user-images.githubusercontent.com/17830956/168787771-5501b113-674e-4d43-b93f-90bf46882c14.png">

This doesn't work on the machines that use a docker executor

<img width="1426" alt="Screenshot 2022-05-17 at 12 17 14" src="https://user-images.githubusercontent.com/17830956/168789017-538a6d04-c53d-4ac7-ba12-0eccff397675.png">

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Infrastructure] - Cache .git to improve checkout time

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

Test Plan: Run the change on Circle

Reviewed By: hramos, cortinico

Differential Revision: D36443844

Pulled By: f-meloni

fbshipit-source-id: 7b07e177f4527ed5956f03ad622838f20ad64950
2022-05-18 07:43:51 -07:00
Nicola Corti afb0307036 Setup a toplevel downloadAll task (#33852)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33852

Similarly to buildAll and cleanAll, I'm creating a downloadlAll task
which is aligning the behavior of the download task we're doing on CIs.

I've also updated the Offline Cache as we're now storing a bigger set of dependencies.

Changelog:
[Internal] [Changed] - Setup a toplevel downloadAll task

allow-large-files

Reviewed By: cipolleschi

Differential Revision: D36441728

fbshipit-source-id: f847b5e665c64e0b4b93d984bbc1b64c00a3b4f7
2022-05-17 15:31:48 -07:00
Franco Meloni b331229b06 Remove build_ios and use only test_ios (#33837)
Summary:
build_ios is a subset of test_ios.
The Hermes cache takes 20-30 minutes to be downloaded and unarchived, that is the slowest part of both the jobs and that was duplicated.
This means that if we remove build_ios we save a lot of time, and the CI is still covering the build and the testing of the code.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] - Remove build_ios and use only test_ios

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

Test Plan: Checked on CircleCI

Reviewed By: cipolleschi

Differential Revision: D36437775

Pulled By: f-meloni

fbshipit-source-id: 53adf77e3511963d2dbfadf26122fd70b0de1113
2022-05-17 04:02:19 -07:00
Nicola Corti 4994b8b5de Setup a top level buildAll Gradle task (#33838)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33838

The idea behind this diff is to set a top level `buildAll` task that will be responsible
of invoking all the tasks we want to verify both in the internal and in the external CI.

This should ideally remove the breakages of the External CI happening from internal changes.

Changelog:
[Internal] [Changed] - Setup a top level buildAll Gradle task

Reviewed By: cipolleschi

Differential Revision: D36376384

fbshipit-source-id: d810b59577340628bb49562bfedf28440bd0f792
2022-05-16 09:27:54 -07:00
Héctor Ramos 12f6081865 Circle CI: Cache Hermes dirs in iOS jobs (#33828)
Summary:
Avoid re-building Hermes if a cache hit is found for the required Hermes version.

Cache sdks/hermes and sdks/hermesc in Circle CI iOS jobs: `test_ios_rntester`, `build_ios`, and `test_ios`.

`test_ios_rntester` "Install CocoaPod Dependencies" step reduced from 37m40s to 3m35s.

`test_ios` "Generate RNTesterPods workspace" step reduced from 36m54s to 1m34s.

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

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36365596

fbshipit-source-id: b5b6fe639f18b1724f80ab61c2262659c4987ff6
2022-05-13 12:51:09 -07:00
Franco Meloni e3a0eea969 Remove with_brew_cache_span from Circle's config (#33831)
Summary:
The machines have on their env `HOMEBREW_NO_AUTO_UPDATE=1`, hence I believe that `with_brew_cache_span` is not needed anymore.

If this works it should save the cache downloading and unarchiving time

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] - Remove with_brew_cache_span from Circle's config

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

Reviewed By: cortinico

Differential Revision: D36374646

Pulled By: f-meloni

fbshipit-source-id: 0e6a35bb2c2dfe44e340e95a1b5e158389a3dfe9
2022-05-13 10:51:41 -07:00
Franco Meloni 0c7543df92 Delete simulators in background on CircleCI (#33822)
Summary:
Instead of wait for Circle to delete the simulators, we can do it in background and save 40 seconds

Changelog:
[Internal] - Delete iOS simulators in background

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

Reviewed By: cortinico

Differential Revision: D36348573

Pulled By: f-meloni

fbshipit-source-id: 89d9e7caddb44e085734e74f417687ee031dd67b
2022-05-13 07:15:15 -07:00
Héctor Ramos d7921f0504 Hermes: Use prepare-hermes-for-build in Circle CI (#33811)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33811

Use `scripts/hermes/prepare-hermes-for-build.js` in Circle CI, eliminating redundant steps in the `prepare_hermes_workspace` Circle CI job.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D36335122

fbshipit-source-id: b7e8c7aeb2aac5afaf37677cd3ac949ac3f96de1
2022-05-13 00:08:04 -07:00
Franco Meloni 58bc9815ec Use anchors to avoid cache key duplication (#33821)
Summary:
Unify the different cache keys in one unique place to avoid duplication, and possible issues with typos.

## Changelog

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

Test Plan: Check Circle CI jobs to verify that caches are working correctly

Reviewed By: cortinico

Differential Revision: D36347758

Pulled By: f-meloni

fbshipit-source-id: 2a02855e938c7cb27eaa5ebee221f5861f72aee9
2022-05-12 11:08:29 -07:00
Héctor Ramos 83f474147c Hermes: Always use Unix Makefiles for Apple build, and use all available cores
Summary:
Hermes' build scripts use the Ninja build utility if available, otherwise they default to Unix Makefiles. When Unix Makefiles were used, builds would take far too long due to the use of a single core.

To reduce the surface area of issues that may arise as we switch to building Hermes from source, we will now focus on a single build system using Unix Makefiles. We will also ensure all available cores are used when building on macOS.

Changelog: [Internal]

Reviewed By: cortinico, neildhar

Differential Revision: D36296838

fbshipit-source-id: 4be23739fb022e3ae8e974ad3c2c70e7011abb5a
2022-05-11 15:49:48 -07:00
Héctor Ramos ae28880fbc Hermes: Copy build scripts to RN
Summary:
Copy Hermes build scripts to React Native repository for greater control over the build pipeline when used in RN.

Changelog: [Internal]

Reviewed By: neildhar

Differential Revision: D36295406

fbshipit-source-id: 54bf4173b6c75db35de828378e6f5782a248ed2e
2022-05-11 15:49:48 -07:00
Riccardo Cipolleschi c171a6e157 Run script phases tests in CI and Sandcastle (#33802)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33802

We use to have a couple of tests for the script phases script that were not running during the CI.

This diff connect them with the two CI, so that they run together with the other ruby tests.

## Changelog
[iOS][Added] - Run script phases tests in CI

Reviewed By: fkgozali

Differential Revision: D36283211

fbshipit-source-id: 01b257cdc99b0bc196d60d49ac76cf044d61a7e9
2022-05-11 10:00:28 -07:00
Nicola Corti 6e2fea8127 Store Hermes Debug Symbols inside CircleCI (#33779)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33779

This diff adds a `store_artifacts` to CircleCI so the Hermes debug symbols are retained and can be used to symbolicate native crashes for Hermes.

Changelog:
[Internal] [Changed] - Store Hermes Debug Symbols inside CircleCI

Reviewed By: cipolleschi

Differential Revision: D36201978

fbshipit-source-id: ef9a71e2953180aef5caea9f5eb0047190ed6198
2022-05-06 10:50:10 -07:00
Héctor Ramos 09878c8acd Circle CI: Cache Hermes builds
Summary:
Use Circle CI caching to avoid re-building Hermes. The cache key will be determined by the Hermes tag specified in sdks/.hermesversion; if the file does not exist (as is the case in builds from main), the commit sha for the latest Hermes commit from facebook/hermes will be used.

This should significantly speed up builds across all workflows: builds from main (commitlies), nightlies, and release builds.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D36158296

fbshipit-source-id: b80457fdefad0d63e62feeb4d509265e2762f253
2022-05-06 08:02:33 -07:00
Riccardo Cipolleschi a649675160 Connect Ruby tests with CircleCI (#33747)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33747

This Diff connects the ruby tests setup with CircleCI, making sure that we are executing the same script in Sandcastle and CircleCI.

At the moment, the scripts runs somedummy tests to make sure that everything works.

## Changelog
[iOS][Changed] - Add ruby tests to circleci

Reviewed By: dmitryrykun

Differential Revision: D36091716

fbshipit-source-id: c432e5f8b5269754db2b7ec278b159dcedf3b3b9
2022-05-03 07:11:54 -07:00
Nicola Corti 07a63a2376 Fix publish_release not running on release tags correctly.
Summary:
During RN 0.69 we realized that we're failing to publish a version.
The reason is that only the `prepare_hermes_workspace` was executed
after a TAG got published.

The problem is a missing `filter:` key which made CircleCI skipping
some steps for a tag. Here I'm fixing it.

Run for 0.69.0-rc0 (broken)
https://app.circleci.com/pipelines/github/facebook/react-native/13123/workflows/3cb781d2-f81c-4856-9686-2260c020c3bd
Run for 0.68.1
https://app.circleci.com/pipelines/github/facebook/react-native/12938/workflows/a1bcf306-9d81-4149-9d4a-bc7b988fb53f

Changelog:
[Internal] [Changed] - Fix publish_release not running on release tags correctly

Reviewed By: hramos

Differential Revision: D36005374

fbshipit-source-id: 5664369f008e60e334c1db5fa2e7c3089369d7ad
2022-04-28 10:44:06 -07:00
Riccardo Cipolleschi fdbe4719e2 fix: Make WebSocketTests work in CI (#33721)
Summary:
This PR reestablish the WebSocketTest in CI which is making the `test_ios_unit` fail.

**Note:** the test_ios_unit is actually running integration tests...

## Changelog

[iOS] [Changed] - Fix the test_ios_unit test

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

Test Plan: The CI of this PR is green. 😬

Reviewed By: cortinico

Differential Revision: D36002823

Pulled By: cipolleschi

fbshipit-source-id: 20eeb08bfd02658ad6579085241f81654f74c1af
2022-04-28 08:53:24 -07:00
Héctor Ramos ff80493d6e Circle CI: Include pre-built Hermes compiler in react-native npm package (#33679)
Summary:
Build Hermes on Circle CI, and pull in the osx-bin, win64-bin, linux64-bin directories into sdks/hermesc when react-native is packaged for npm.

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

Changelog:
[General][Added] - Hermes Compiler binaries will be provided in react-native/sdks/hermesc

Reviewed By: cortinico

Differential Revision: D35793916

fbshipit-source-id: b9322abec29dd90b8bad6b803b1b1dff87d62669
2022-04-27 11:48:25 -07:00
Héctor Ramos 476330a86e Circle CI: Re-enable iOS unit tests (#33547)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33547

Now that Hermes is being built from source, Circle CI iOS unit tests can be re-enabled.

Changelog: [Internal]

Reviewed By: cortinico, neildhar

Differential Revision: D35328103

fbshipit-source-id: ea99d8f1fa02997e9c4f55048012b4b55c0bb2b3
2022-04-21 13:49:40 -07:00
Héctor Ramos 29c5461114 Circle CI: enable BUILD_HERMES_SOURCE for build_ios / test_ios_unit jobs
Summary:
Build Hermes from source when testing Hermes on Circle CI.

Changelog: [Internal]

Reviewed By: cortinico, dmitryrykun

Differential Revision: D35679571

fbshipit-source-id: 7829242db28871731821d36f752d0479fd83bb49
2022-04-20 16:51:54 -07:00
Nicola Corti ae3c426c58 Re-enable bundling of hermesc inside the react-native NPM package (#33677)
Summary:
This PR re-enables bundling of the precompiled `hermesc` binary inside the react-native NPM package. To handle this I've stripped over all the unnecessary files and kept only the relevant binary. It now follows the same structure as the `hermes-engine` NPM package.

## Changelog

[Internal] - Re-enable bundling of hermesc inside the react-native NPM package

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

Test Plan:
Will wait for a successful CI job to produce a commitlies of RN.

https://app.circleci.com/pipelines/github/facebook/react-native/13020/workflows/9b59c6e0-4e90-4008-be73-aaa3155cefc9/jobs/248841

Here the output of the RN commitlies with the file correctly placed:

```
tar -tvf ~/Downloads/react-native-1000.0.0-1520d36ba.tgz | grep hermesc
-rwxr-xr-x  0 0      0     3516952 Oct 26  1985 package/sdks/hermesc/linux64-bin/hermesc
-rwxr-xr-x  0 0      0     2618232 Oct 26  1985 package/sdks/hermesc/osx-bin/hermesc
-rwxr-xr-x  0 0      0     1613312 Oct 26  1985 package/sdks/hermesc/win64-bin/hermesc.exe
```

Reviewed By: neildhar

Differential Revision: D35784619

Pulled By: cortinico

fbshipit-source-id: 334ed03c40f6838ae8365a1f1c6e86e38a8dbc59
2022-04-20 13:03:29 -07:00
Danilo Bürger 2c87b7466e Bump ruby to 2.7.5 (#33485)
Summary:
This bumps ruby to the latest 2.7.x versions which includes bug fixes and 3 CVEs (https://www.ruby-lang.org/en/news/2021/11/24/ruby-2-7-5-released/)

## Changelog

[iOS] [Changed] - Bump ruby to 2.7.5

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

Test Plan: no test plan, should just pass tests.

Reviewed By: cortinico

Differential Revision: D35116757

Pulled By: GijsWeterings

fbshipit-source-id: a8e96bfcc6086b70dac21aee24bae46fe6b072bb
2022-04-12 07:59:52 -07:00
Simek 77d2834c7e Circle CI: switch to next-gen images (#33590)
Summary:
<img width="819" alt="Screenshot 2022-04-07 at 20 42 30" src="https://user-images.githubusercontent.com/719641/162288224-1f360edd-3d9f-4f82-aac9-341d97480dfc.png">

This PR switches the Circle CI images to the next-gen ones, according to the migration guide.

With new images, specifying the minor version is required, and I have selected the latest version for each major release.

References:
* https://discuss.circleci.com/t/legacy-convenience-image-deprecation/41034
* https://circleci.com/developer/images/image/cimg/node

 ---

Orbs are still using the full `circleci` name, however during the update I have spotted that used Windows Orb is quite outdated. I will push another PR and try the Orb bump in there, unless there is a reason, why the specific Orb version is used.

## Changelog

N/A

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

Test Plan: Run the CI.

Reviewed By: neildhar, sshic

Differential Revision: D35550086

Pulled By: cortinico

fbshipit-source-id: b37aa9c8157b5b4f7ab3d9aac20dcb5aed028482
2022-04-11 09:39:10 -07:00
Riccardo Cipolleschi 0480f56c5b Introduce .xcode.env configuration file to source `node` (#33546)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33546

This Diff does 2 things:
1. Removes all the remnant of the `find-node.sh` script. This allows React Native to stay agnostic from any other node manager
2. Introduces a way for the developers to specify which `node` executable they want to use, through a simple `.env` file.

## Changelog
[iOS][Changed] - This PR removes the `find-node.sh` scripts and replaces it with an `.xcode.env` file that is sourced by the script phases that needs it. The `.xcode.env` file is versioned: to customize a local environment, an unversioned `.xcode.local.env` can be used.

Reviewed By: cortinico

Differential Revision: D35317070

fbshipit-source-id: 4b400ba56aa2d574db563fa67b2008e1ddde1c59
2022-04-11 02:50:57 -07:00
matinzd 8de1c9ce91 Circle CI: enable BUILD_HERMES_SOURCE for test_ios_rntester job (#33585)
Summary:
Fix CircleCI build for test_ios_rntester.

Broken due to [this commit](fefa7b6ac8) after adding dev tools profiler.

## Changelog

[Internal] [Fixed] - Fix rn tester app CI

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

Test Plan: CI should be green.

Reviewed By: neildhar

Differential Revision: D35462642

Pulled By: cortinico

fbshipit-source-id: dbcb0a7e2e58fac1c77b2dbe4b833812175dc87c
2022-04-07 07:20:15 -07:00
Neil Dhar 9f1fa9183b Fix Windows build in CI (#33566)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33566

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35379924

fbshipit-source-id: 90f776afa095d99a6a6d2c7d002fb1f731ff34ef
2022-04-05 01:48:36 -07:00
Neil Dhar 68fd7de115 Directly invoke CMake when compiling Hermes
Summary:
Changelog: [Internal]

Working towards removing configure.py, switch to invoking CMake directly.

Note that with this change, ninja is no longer a requirement, since it will use the default build system on the host.

Reviewed By: cortinico, jpporto

Differential Revision: D35342731

fbshipit-source-id: f04a367bda9fb22642f17e7c2c5cf493e44013d3
2022-04-04 15:47:29 -07:00
Riccardo Cipolleschi 44de392603 Reintroduce `find-node.sh` as mitigation measure (#33538)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33538

This Diff is a revert of this other diff: D34352049 (802b3f778b).

Following a discussion with the Open Source Community, the removal of `find-node.sh` script will break some configurations that leverages different node managers.

The landed diff will block the release of version 0.69, that's the reason why we are reverting it.

However, we still want to abstract RN from knowing which node manager the user is going to use. After discussing with the community, we will deprecate the usage of this script and we will move toward a configurable `.xcode.env` file that developers can configure on their own. The task for this is tracked here: T115868521.

## Changelog
[Internal][Removed] - Reintroduce the old `find-node.sh` script to prevent broken builds for some users

Reviewed By: cortinico

Differential Revision: D35280778

fbshipit-source-id: 7a0b269af207e13998fd85c0c4839e75028cda65
2022-04-04 02:43:07 -07:00
Héctor Ramos 472d531ae8 Circle CI: Rename jobs and use underscore by convention
Summary:
Other jobs in the React Native Circle config use underscores as the delimiter, so let's standardize on that.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35301098

fbshipit-source-id: 4c720db44faa8c42dece9dccc592b53330d42cc4
2022-04-02 00:02:11 -07:00
Héctor Ramos 235896aca8 Circle CI: Free up space in test_ios_rntester job
Summary:
When Hermes is used, and if it is built from source on Circle CI, the macos executors can run out of storage space.

Earlier, we solved this issue in the iOS unit test jobs by splitting them into build/test pairs. In the case of test_ios_rntester, there is no convenient way to split the job.

Since test_ios_rntester does not require the use of the iOS simulator, we can go ahead and delete it from the image at run time in order to free up some space and allow the job to finish when Hermes is built from source.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35297994

fbshipit-source-id: a0cddba2fc2900813fecc63eaf23d53e5b8f6e92
2022-04-02 00:02:11 -07:00
Héctor Ramos d1de641a1c Circle CI: Split test_ios job into build_ios->test_ios_unit
Summary:
Split test_ios job into build_ios and test_ios_unit. This allows us to build Hermes from source in `build_ios`, and to subsequently run unit tests in `test_ios_unit` in a fresh macOS machine. Otherwise, the Circle CI machine may run out of space when building the RNTester app.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35295708

fbshipit-source-id: 16833dfec517f6237d125f3e06ec1efa3f967b08
2022-04-02 00:02:11 -07:00
Héctor Ramos b308f14788 Circle CI: Test Hermes by default on iOS
Summary:
In preparation for the upcoming migration towards using Hermes by default, Circle CI jobs will only test using Hermes. With this, we no longer have a matrix where test_ios runs once with JSC and once with Hermes. Instead, there is a single `test_ios_unit` job that runs with Hermes.

This change is necessary in order to avoid unnecessary complex Circle CI config files in the JSC->Hermes transition.

The CocoaPods cache key needs to be updated to avoid using a stale cache. Keys v4-pods and v5-pods were used during tests and may already be present in the Circle CI cache for the next two weeks, so we must skip ahead to v6-pods-*

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35299690

fbshipit-source-id: 96c146c8b114c3874c64a8d7b6721c90acac0c33
2022-04-02 00:02:11 -07:00
Héctor Ramos 370f1ca0cd Circle CI: Use new generation machines in macOS jobs
Summary:
Use Circle CI's new generation macOS resource class in all iOS and macOS jobs. This resource provides additional resources and should reduce execution time in our iOS and macOS jobs by about 40-50%.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35294738

fbshipit-source-id: 817a8f80e774a11d23d9466d938064ac41625256
2022-04-01 16:19:29 -07:00
Héctor Ramos fdab98be87 Circle CI: Use xlarge in Android jobs
Summary:
Use Circle CI's "xlarge" resource class in all Android jobs. This resource provides additional resources and should reduce execution time in our Android jobs.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35294718

fbshipit-source-id: 53a0df2926011b5ac75b2671733a1b1f881150fd
2022-04-01 16:19:29 -07:00
Héctor Ramos 8452aea466 Circle CI: Use xlarge in Node jobs
Summary:
Use Circle CI's "xlarge" resource class in all Node jobs. This resource provides additional resources and should reduce execution time in our Node jobs.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35294648

fbshipit-source-id: cfc175b4b327ca02d7094688f870cfea757915e6
2022-04-01 16:19:29 -07:00
Héctor Ramos 3649355942 Circle CI: Install Hermes make dependencies
Summary:
Adds necessary dependencies to build Hermes from source on Circle CI.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35298738

fbshipit-source-id: 85ab98f7052ab80a4a9293cab3eabc26c01fba60
2022-04-01 14:42:02 -07:00
Héctor Ramos 457dd45552 Remove Hermes Compiler from react-native package (restore nightly jobs)
Summary:
Restore `nightly` jobs to green by removing `hermesc` from `react-native` package.

As a result, when building Hermes from source on developer's machines, the Hermes compiler will need to be built as well.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35289425

fbshipit-source-id: 2a058f714d670fbb4d0486e7280cab7dd923fc63
2022-04-01 02:41:04 -07:00
Héctor Ramos 3c2ce2906f Build hermesc on all commits and include binaries in all releases (#33398)
Summary:
Extend the hermesc build jobs to cover nightlies, commitlies, and stable releases.

The Hermes Compiler will be packaged alongside react-native releases in order to save on build time.

# Changelog:

[Internal]

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

Reviewed By: cortinico

Differential Revision: D34727676

fbshipit-source-id: cc147b4d015abc8b5c798e8e3b5497a5de653b69
2022-03-23 13:18:52 -07:00
Nicola Corti 5c92471b52 Use Debian Buster for linux jobs (#33446)
Summary:
Linux tests are failing because the default version of CMake in Debian stretch, upgrade to Buster.
That's similar to 1838d6f2ce

## Changelog

[Internal] - Use Debian Buster for linux jobs

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

Test Plan: Will rely on CI results

Reviewed By: javache, cipolleschi

Differential Revision: D34987732

Pulled By: cortinico

fbshipit-source-id: e6c528013c9fa20561a8f75ba1435a365c5e4e08
2022-03-21 04:54:32 -07:00
Nicola Corti a3d9892ed9 Build Hermes from Source (#33396)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33396

This commit fully unplugs the `ReactAndroid` from using hermes from the NPM package and plugs the usage of Hermes via the `packages/hermes-engine` Gradle build.

I've used prefab to share the .so between the two builds, so we don't need any extra machinery to make this possible.

Moreover, I've added a `buildHermesFromSource` property, which defaults to false when RN is imported, but is set to true when RN is opened for local development. This should allow us to distribute the `react-native` NPM package and users could potentially toggle which source to use (but see below).

Changelog:
[Android] [Changed] - Build Hermes from Source

Reviewed By: hramos

Differential Revision: D34389875

fbshipit-source-id: 107cbe3686daf7607a1f0f75202f24cd80ce64bb
2022-03-11 15:23:36 -08:00
Héctor Ramos 5a033e668b Build hermesc on Circle CI (#33393)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33393

Build `hermesc` on React Native CI for Linux, Windows, macOS platforms. Provided as a build artifact on nightly releases.

Changelog:

[Internal]

Reviewed By: cortinico

Differential Revision: D34662671

fbshipit-source-id: cd7921423fa92195e1b32bca39a41e579ca28335
2022-03-07 17:02:08 -08:00
Andrei Shikov fc9dec9a35 Download kotlin compiler JARs for Buck instead of checking them in (#33209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33209

Downloads Kotlin compiler JARs with Buck before starting docker build. This solution is slower than checking in JARs directly, but it allows to keep lighter size of the repo for people who want a complete checkout.

Changelog: [Internal] - Update CI build to download Kotlin jars for buck

Reviewed By: cortinico

Differential Revision: D34582932

fbshipit-source-id: 290398579ce2a4d57c7af318c66526689db6073c
2022-03-02 13:04:49 -08:00
Riccardo Cipolleschi 802b3f778b Remove `find-node.sh` script (#33146)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33146

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

It removes the find node script that introduced complexity in the system.

## Changelog
[Internal][Removed] - Removed the old `find-node.sh` script which was only adding complexity without doing nothing really useful.

Reviewed By: cortinico

Differential Revision: D34352049

fbshipit-source-id: 9ba4275c3863a1ae4bc2b4e2f1694a7ac994cdc8
2022-02-21 03:23:40 -08:00
Nicola Corti 062c1f7277 Unblock CI by disabling integration testing for `test_ios_unit_hermes` (#33128)
Summary:
I'm disabling the integration test step for `test_ios_unit_hermes` as they're currently failign wiht a
`SIGSEGV` introduced by 9010bfe457

The change is legit, but is introducing an ABI incompatibility that is making the app crash at runtime.
We can re-enable them as soon as Hermes 0.12.0 is released.

## Changelog

[Internal] - Unblock CI by disabling integration testing for `test_ios_unit_hermes`

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

Test Plan: Will wait for a Circle CI green before merging

Reviewed By: neildhar

Differential Revision: D34285751

Pulled By: cortinico

fbshipit-source-id: 40f8e3d1b41fc4d5f0459003dcd19d651aefbeb7
2022-02-16 15:18:56 -08:00
Nicola Corti 8ee1f832b6 Update `test_android_template` to use `build_npm_package` (#33068)
Summary:
I'm updating the `test_android_template` CI step to use the result of `build_npm_package` instead of sed-ing the RN version to `file:..`.
This should be more robust and will allow to install transitive deps automatically, without having to deal with separate installation steps.

This also fixes the broken CI for Android

Changelog:
[Internal] [Changed] - Update `test_android_template` to use `build_npm_package`

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

Reviewed By: ShikaSD

Differential Revision: D34083047

Pulled By: cortinico

fbshipit-source-id: de34472d5737db445cfc0d4b1c6feaf1e746bb61
2022-02-09 08:38:56 -08:00
Gabriel Donadel Dall'Agnol 1b44e5c040 ci: Optimize Android RNTester build job (#33042)
Summary:
Optimize Android RNTester build workflow to run in a single job instead of running two separate Gradle invocations as Nicola suggested here https://github.com/facebook/react-native/pull/33033#discussion_r799066446

## Changelog

[General] [Changed] - Optimize CicleCI Android RNTester build job to run a single gradle invocation

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

Test Plan: Make sure builds are working as expected and CI is green

Reviewed By: ShikaSD

Differential Revision: D34001440

Pulled By: cortinico

fbshipit-source-id: 90845482b69e5c2839d570db359223ee614ebf1b
2022-02-04 06:06:23 -08:00
Gabriel Donadel Dall'Agnol 70062c1322 ci: Add build tests for RNTester (#33033)
Summary:
Add 4 new jobs to CI in order to test RNTester builds on both Android and iOS using Hermes and JSC

Closes https://github.com/facebook/react-native/issues/32676

## Changelog

[General] [Added] - Add build tests for RNTester to CircleCI

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

Test Plan: Make sure builds are working as expected and CI is green

Reviewed By: lunaleaps

Differential Revision: D33982864

Pulled By: philIip

fbshipit-source-id: 00b2116be1b6484324e8162cc691b1d0863d282d
2022-02-03 11:10:33 -08:00
Lorenzo Sciandra f1488db109 bump Node references from 12/14 to 14/16 (#32980)
Summary:
Node 16 has been the LTS for quite some time now ([Oct 2021](https://nodejs.org/en/blog/release/v16.13.0/)), so this PR just wants to bring the RN OSS CI up to speed.

(I realized that this was needed while doing the same for macos https://github.com/microsoft/react-native-macos/pull/997)

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Changed] - CI moved to Node 16.

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

Test Plan: CI itself is the test � locally no significant changes were experienced.

Reviewed By: cortinico

Differential Revision: D33821288

Pulled By: ShikaSD

fbshipit-source-id: 4480ae1cb909e2b8d0b6abba4db76bbe71f0193e
2022-01-28 05:07:18 -08:00
Luna Wei 76a2cf3569 Use CircleCI API to trigger releases (#32937)
Summary:
Changelog: [Internal]
* Refactor release automation so it doesn't use intermediate tags to trigger the release workflow. Now, we POST to CircleCI's ["trigger pipeline" API](https://circleci.com/docs/api/v2/#operation/triggerPipeline)
* This does have the con of needing to give CircleCI project permission for whoever wants to run a release as you'll need a token to trigger
* See related discussion: https://github.com/reactwg/react-native-releases/discussions/7#discussioncomment-1836420

Description of changes:
* Changes to config.yml allow us to use our POST data to trigger a certain workflow. There is no direct API to trigger a workflow, CircleCI only has an API to trigger pipelines, so the suggestion is to leverage conditionals: https://support.circleci.com/hc/en-us/articles/360050351292-How-to-trigger-a-workflow-via-CircleCI-API-v2
* Update `bump-oss-version` to make the api call -- the instructions for running a release are still the same: https://github.com/facebook/react-native/wiki/Release-Process#creating-0minor0-rc0
   * Would be good to make this a yarn script as tido64 mentioned
* Remove unused utilities now that we don't use intermediate tags like `publish-...`

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

Test Plan:
Have this on a Github branch and tried this out locally:

## Running release script
Running the bump-oss script (I had to hack it locally to be allowed to run on a non-release branch):
{F694804729}
* Link to resulting workflow: https://app.circleci.com/pipelines/github/facebook/react-native/11836 -- you can [verify that the parameters are the same as I passed](https://app.circleci.com/pipelines/github/facebook/react-native/11836/workflows/59ac0c86-5fe3-4d7a-80e9-c61129d49e9f/jobs/232388?invite=true#step-106-2)

## Other attempts triggering this workflow
Notice that when I tried to run it on an actual release-branch (0.67-stable) but because the `config.yml` changes aren't on that branch, the job faisl
| {F694804321} |

## Verifying the right workflows trigger on a regular push
* Notice that the workflows "analysis" and "test" are still triggered on push (ie, the `unless:` clause isn't messing things up)
{F694804320}

Reviewed By: sota000

Differential Revision: D33715336

Pulled By: lunaleaps

fbshipit-source-id: 82672d6d50768015bdfc9f4ea4d22aa801b84f06
2022-01-24 14:08:43 -08:00
Lorenzo Sciandra ac206aa814 removing unused Detox (#32907)
Summary:
I realized while checking for a few other things that Detox's presence in the repo is actually not really motivated - since Jul 2020 the few tests that were using it were disabled 120ff7ccde never to be reactivated since.

I noticed this while attempting to updating the Detox version to latest... which made me notice that the repo is still on a 16.x version while latest is 19.x (there are like 10 pages of releases between them: https://github.com/wix/Detox/releases) and I came to the conclusion that it's probably easier to just remove the old dusty code and eventually reintroduce it in the future if we ever consider it necessary.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Removed] - Removing Detox from CI.

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

Test Plan: CI - nothing breaks.

Reviewed By: lunaleaps

Differential Revision: D33623199

Pulled By: cortinico

fbshipit-source-id: 7d8d133629b62b66959b309f2ca21852d396c9fc
2022-01-20 08:51:47 -08:00
Nicola Corti bd7caa64f5 Use side-by-side NDK for Android (#32848)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32848

If we leverage the side-by-side configuration of the NDK
(see https://developer.android.com/studio/projects/configure-agp-ndk#agp_version_41)
we will not have to specify the NDK Path or Version at all.

We will automatically pick the best NDK version selected by AGP.

Changelog:
[Android] [Changed] - Use side-by-side NDK for Android

Reviewed By: ShikaSD

Differential Revision: D33475818

fbshipit-source-id: 16aa4acfc44b94e2f92df89d71e104bf46d7f162
2022-01-11 10:00:54 -08:00
Nicola Corti b4b9c54978 Make `test_android_template` work regardless of the version (#32841)
Summary:
Fixes https://github.com/facebook/react-native/issues/32835

## Changelog

[Internal] - Make `test_android_template` work regardless of the version

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

Test Plan: Tested locally. Will wait for `test_android_template` to be green.

Reviewed By: hramos

Differential Revision: D33476511

Pulled By: cortinico

fbshipit-source-id: 29a96683afae64cadc9ae4332410cd4d5d9d3e6d
2022-01-11 02:02:34 -08:00
Nicola Corti 252b2a63c5 Updating Yarn Cache path to fix broken CI (#32834)
Summary:
The CI is currently failing with:
```
Error extracting tarball /tmp/cache1419328940 : tar: root/.cache/yarn: Cannot mkdir: Permission denied tar: root/.cache/yarn/v6
```

The problem is that we're sharing the Yarn cache between two jobs (`test_js` and `test_ios_unit_jsc`) which are executed on two difference executors (a Machine vs a Docker container).

I've update the cache key to be `v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "yarn.lock" }}` so the job name is accounted when computing the Cache Key.

Moreover the `test_js` test was also failing on `flow check` as one of the library we depend on (`resolve`) added a test with a malformed JSON. I'm fixing this failure as well so the CI is back green.

## Changelog

[Internal] - Updating Yarn Cache path to fix broken CI

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

Test Plan: Verified that the external CI is green: https://github.com/facebook/react-native/pull/32834

Reviewed By: lunaleaps

Differential Revision: D33453702

Pulled By: cortinico

fbshipit-source-id: 52bf42db583eaf6aa913f1bb164566f8c3563d36
2022-01-06 10:46:15 -08:00
Luna Wei 3bd11599c9 Update bump-oss-version.js to guide releaser through release actions (#32769)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32769

Changelog: [Internal] Re-purpose bump-oss-version to guide releaser to correctly tag the release and trigger relevant CircleCI jobs

Reviewed By: sota000

Differential Revision: D33121691

fbshipit-source-id: 739f920cd9a04dfb436aff1abe9a05a51df4c32c
2021-12-17 18:37:38 -08:00
Luna Wei fcf3fd84ec Use tag to set publish version (#32757)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32757

Changelog: [Internal] - Update release automation to still be manually triggered as from discussion: https://github.com/reactwg/react-native-releases/discussions/7

A releaser needs to do the following on a release branch like `0.99-stable`:
* For an initial release branch cut:
   * Tag the head of the branch `git tag publish-v0.99.0-rc.0`
   * `git push origin 0.99-stable --follow-tags`
* For cherry-picks on the pre-release:
   * Make the picks on `0.99-stable`
   * Tag the head of the branch `git tag publish-v0.99.0-rc.1`
   * `git push origin 0.99-stable --follow-tags`
* For promoting pre-release to stable with intention of making this the `latest` npm version:
   * Tag the head of the branch `git tag publish-v0.99.0`
   * Tag the head of the branch `git tag latest`
   * `git push origin 0.99-stable --follow-tags`

Follow-up diff to make this codified via a script

Reviewed By: sota000

Differential Revision: D33101594

fbshipit-source-id: 74b065229a3705fccbe1a25ed7ece4a28d9aa76d
2021-12-17 18:37:37 -08:00
Luna Wei 50e109c78d Fix test_js/test_js_prev_lts
Summary:
Changelog: [Internal] Remove un-necessary package installs which was using `npm install flow-bin --save-dev` which was wiping out our `node_modules` from the circleCI yarn install.

It was un-necessary as we already have `flow-bin` as a dependency in our current set-up.

In addtion, we were running `npm pack` without properly copying over our package.json dependencies (which occurs in `prepare-package-for-release`) for a consumable react-native package.

This may not have caused issue but technically we were creating an "incomplete" package to do our e2e testing on.

Reviewed By: charlesbdudley

Differential Revision: D33197965

fbshipit-source-id: 6583ef1f8e17333c0f27ecc37635c36ae5a0bb62
2021-12-17 18:37:37 -08:00
Sota Ogo d7768a5e94 Unbreak analyze_pr (#32724)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32724

Changelog: [internal] Fix analyze_pr which was getting stuck at apt-get install openssl ca-certificates

Added -y so that it will install openssl without asking Y/n question.

```
The following packages will be upgraded:
  openssl
1 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Need to get 620 kB of archives.
After this operation, 1024 B disk space will be freed.
Do you want to continue? [Y/n]
```

Reviewed By: TheSavior

Differential Revision: D32977991

fbshipit-source-id: 6a2e88f7fe61061fd5c18fc8cb28a3b9bfeedaf0
2021-12-08 22:15:13 -08:00
Luna Wei 583471bc48 Fix workflow for automating version bumps
Summary: Changelog: [Internal] - Fix bugs in automate workflow

Reviewed By: cortinico, sota000

Differential Revision: D32810597

fbshipit-source-id: 13503fea871043224f673f2c5301804e1f4cf614
2021-12-03 13:17:31 -08:00
Sota Ogo 363ff5c0fc Build codegen package in pod install (#32678)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32678

In D32420306 (3d8b5a35f9) (3d8b5a35f9), I added a phase which uses a codegen, but it assumed that the codegen package has already been built. This diff fixes the issue where it checks and build the codegen packaage.

I also reverted the change that I made for the circle CI test since it now builds the codegen when running pod install.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D32707588

fbshipit-source-id: a287ff96e8123833da093228fe60e2069884eb45
2021-11-30 17:11:17 -08:00
Luna Wei 94abcffe2f Update CircleCI to auto-deploy release branch on push
Summary:
Changelog: [Internal] Update CircleCI to auto-deploy release branch on push

This work is part of an effort to automate the release process by using a push to a release branch as a trigger to prepare, package and deploy react-native to npm from CircleCI

The following diagram describes the context (what kind of releases we do, relevant scripts and what they do), the pre-existing process for the different types of release and how I've modified the process.
{F683387103}

This diff updates the relevant CircleCI workflows

Reviewed By: sota000

Differential Revision: D32702420

fbshipit-source-id: e20cdeb53eb4a8ce7e54e083e3e14bd89e11b789
2021-11-30 16:52:18 -08:00
Andrei Shikov 00ac034353 Bump OSS Android build to SDK 31 (#32606)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32606

Updates OSS builds for internals and template to target SDK 31, corresponding to Android 12.

Changelog:
[Updated][Android] - Bump Android compile and target SDK to 31

Reviewed By: cortinico

Differential Revision: D32107409

fbshipit-source-id: 57f219d33e884200ca4f49e1afe1bfd65b0d6315
2021-11-24 12:27:26 -08:00
Sota Ogo 43f8a4c989 Build codegene to fix the build error
Summary:
This diff fixes the circle CI error introduced with a recent commit (3d8b5a35f9).

Changelog: [internal]

Reviewed By: philIip

Differential Revision: D32516744

fbshipit-source-id: 522b6815f0486a5ec1c97cffc19fb6f7a5da2dbd
2021-11-17 19:26:39 -08:00
Dulmandakh a6eec50a02 CI: bump react-native-android docker image to 5.1 (#32603)
Summary:
CI: bump react-native-android docker image to 5.1

## Changelog

[Internal] [Changed] - CI: bump react-native-android docker image to 5.1

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

Test Plan: Android CI is green

Reviewed By: makovkastar

Differential Revision: D32459898

Pulled By: cortinico

fbshipit-source-id: 09dab6e34086199251631bc85af60d0cdf635a23
2021-11-16 03:28:48 -08:00
Dulmandakh c180627ac7 bump gradle to 7.3 (#32588)
Summary:
Bump Gradle to 7.3, also configure gradle cache key to include gradle version so that we don't keep cache for other versions and have smaller cache, faster CI.

## Changelog

[Android] [Changed] - Bump Gradle to 7.3

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

Test Plan: CI is green

Reviewed By: ShikaSD

Differential Revision: D32427806

Pulled By: cortinico

fbshipit-source-id: 776406ef3aa7962cf3a4abc178e3c8a4762a01e0
2021-11-15 06:47:39 -08:00
Luna Wei a5079987bb Trigger rn-diff-purge action from release publish
Summary: Changelog: [Internal] - Trigger rn-diff-purge action from release publish

Reviewed By: cortinico

Differential Revision: D32335711

fbshipit-source-id: 29d9910d7b013b612d1d423ce960782dc8c6cd4c
2021-11-12 11:34:32 -08:00
Dulmandakh 9e7223537a CI: bump react-native-android docker image to 5.0, includes JDK 11 (#32186)
Summary:
Bump react-native-android docker image to 5.0, which includes JDK 11.

## Changelog

[Internal] [Changed] - bump react-native-android docker image to 5.0, which includes JDK 11.

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

Test Plan: Android CI must be green

Reviewed By: ShikaSD

Differential Revision: D30897954

Pulled By: cortinico

fbshipit-source-id: 9b6696bac424ab188a0443b8315edbb9596dd166
2021-11-12 11:29:03 -08:00
Luna Wei ec84a56da6 Don't fail this test when we can't post
Summary:
Changelog: [Internal] - Don't fail build_npm_package when there is no PR environment set to post the link to.

The script will fail with an error thanks to changes: 86491749ee

Reviewed By: fkgozali

Differential Revision: D32221758

fbshipit-source-id: ceb7fb654e4c13e195f20e28798e66e6854bcbcd
2021-11-05 17:30:34 -07:00
Tommy Nguyen 86491749ee ci: ignore bundle size reporter failures (#32490)
Summary:
CircleCI stopped populating `CIRCLE_PULL_REQUEST` without providing an
alternative, so now it's impossible to get the PR number unless it comes
from a forked repo.

## Changelog

[Internal] [Fixed] - ignore bundle size reporter failures

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

Test Plan: CI should ignore bundle size reporter failures.

Reviewed By: fkgozali

Differential Revision: D32008694

Pulled By: lunaleaps

fbshipit-source-id: 68e25ac2fbb23c1d7a55e667c90aec3a61302b8a
2021-11-03 12:10:31 -07:00
Nicola Corti b0711f1d35 Update ReactAndroid to use the AGP NDK Apis (#32443)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32443

This diff removes all the custom Gradle machinery to build the native code and delegates to AGP
the triggering of the `ndk-build` command. This means that the native build will be now invoked
with the `:ReactAndroid:externalNativeBuild<Variant>` task.

An important thing to notice is that that task will always run, and will delegate to Make the
compilation avoidance. If you invoke the task twice, the second time it will be significantly faster.
On my machine this takes ~6/7 mins the first time, and 30 seconds the second time.

There are some gotchas that are worth noting:
* The native build will run on every build now. Given the complexity of our native build graph,
even with an up-to-date build, Make will still take ~30 seconds on my machine to analyse all the
targets and mention that there is no work to be done. I believe this could be impactful for local
development experience. The mitigation I found was to apply an `abiFilter` to build only the ABI
of the target device (e.g. arm64 for a real device and so on).
This reduces the native build to ~10 seconds.
* All the change to the `react-native-gradle-plugin` source will cause the Gradle tasks to be
considered invalid. Therefore they will re-extract the header files inside the folders that are
used by Make to compile, triggering a near-full rebuild. This can be a bit painful when building
 locally, if you plan to edit react-native-gradle-plugin and relaunch
 rn-tester (seems to be like an edge case scenario but worth pointing out). The mitigation here
 would be to invoke the tasks like

```
gw :packages:rn-tester:android:app:installHermesDebug -x prepareBoost -x prepareLibevent -x prepareGlog \
   -x prepareJSC -x extractNativeDependencies -x generateCodegenArtifactsFromSchema \
   -x generateCodegenSchemaFromJavaScript
```

Changelog:
[Internal] [Changed] - Refactor Extract Headers and JNI from AARs to an internal task

Reviewed By: ShikaSD

Differential Revision: D31683721

fbshipit-source-id: fa85793c567796f4e04751e10503717a88cb0620
2021-11-01 05:59:15 -07:00
Luna Wei a6d8a9970d Add ios template build test
Summary: Changelog: [Internal] - Add iOS template app test

Reviewed By: sota000

Differential Revision: D31747179

fbshipit-source-id: d49c32c7652f91bdfd463509787096a41bbcc7b0
2021-10-28 15:48:29 -07:00
Luna Wei d47c487f7e install_github_bot_deps for posting link
Summary: Changelog: [Internal] - Install dependencies for posting as bot

Reviewed By: hramos

Differential Revision: D31552246

fbshipit-source-id: 83e4953730cbd8dc5f3475ced20fb6556f97a4c6
2021-10-11 21:25:11 -07:00