Commit Graph

508 Commits

Author SHA1 Message Date
Alex Hunt
e97ba475aa Relocate and refactor set-rn-version script (#42730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42730

Reviewing and modernising this script as part of simplifying our release publish workflow.

- Drop unused `--dependency-versions` arg from CLI entry point
- Simplify templating approach
- Type as Flow
- Drop dependencies on `shelljs` and `yargs`
- Relocate under `scripts/releases/`
- Rewrite tests as snapshot tests

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D53001971

fbshipit-source-id: e55a71a0bb37e3e18ba1e582a5c46ddd58823d81
2024-01-30 06:46:50 -08:00
szymonrybczak
78967b33c0 Bump CLI to 13.5.1 (#42183)
Summary:
Updates CLI to v13.5.1.

## Changelog:

[GENERAL] [CHANGED] - Bump CLI to 13.5.1

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

Test Plan: CI

Reviewed By: christophpurrer

Differential Revision: D52600707

Pulled By: huntie

fbshipit-source-id: f314a405d8d7e9200595b42b62d354e61f0a2964
2024-01-25 02:32:45 -08:00
Nicola Corti
b8778abca5 Build Android on Ubuntu 22.04 (#42618)
Summary:
Bumping the Docker image we use to build Android from Ubuntu 20.04 to 22.04

## Changelog:

[INTERNAL] - Build Android on Ubuntu 22.04

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

Test Plan: CI

Reviewed By: NickGerleman

Differential Revision: D53003492

Pulled By: cortinico

fbshipit-source-id: 547d19628e67aeb7a6d32e0a006673c909b55f32
2024-01-24 00:54:51 -08:00
Riccardo Cipolleschi
c60b5f6867 Reintroduce OldArch Integration Tests (#42262)
Summary:
Yesterday we landed a change that removed tests for the Old Architecture for RNTester.
That was the right call as there are no build differences in RNTester between the two architectures. But we do have runtime differences, and we had an integration test running on RNTester that we deleted with the previous PR.
This change restores that test, adding this only new job to run that test

## Changelog:
[Internal] - Add back an old arch integration test

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

Test Plan: CircleCI is green

Reviewed By: cortinico

Differential Revision: D52730661

Pulled By: cipolleschi

fbshipit-source-id: 10fbc2540abeebc72f635451f6f650827cf20041
2024-01-12 07:02:51 -08:00
Oskar Kwaśniewski
3630138dcc remove old architecture pipeline for RNTester (#42245)
Summary:
As discussed with cipolleschi, RNTester shouldn't be tested for Old Arch. This PR removes those unnecessary pipeline runs

## Changelog:

[INTERNAL] [REMOVED] - remove old architecture pipeline for RNTester

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

Test Plan: CI Green

Reviewed By: cortinico

Differential Revision: D52694176

Pulled By: cipolleschi

fbshipit-source-id: a607bac4659b0611d5f49b5e45134f896bb96a91
2024-01-11 07:13:05 -08:00
Tim Yung
228cb80af9 RN: Remove Deprecated Prop Types (#42019)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42019

Removes the following deprecated properties from React Native:

- `Image.propTypes`
- `Text.propTypes`
- `TextInput.propTypes`
- `ColorPropType`
- `EdgeInsetsPropType`
- `PointPropType`
- `ViewPropTypes`

The deprecation history for these prop types is not super obvious, so here is a summary:

- `react@15.5` extracted `prop-types` into a separate package to reflect that not everybody uses them.
- `react-native@0.68` added a deprecation warning to built-in prop types. (3f629049ba)
- `react-native@0.69` removed built-in prop types. (3e229f27bc)
- `react-native@0.71` restored built-in prop types, along with bug fixes to isolate deprecated usage. (b966d29724)

We believe that by the next public release, enough time will have passed for the community to be able to upgrade without patching React Native or otherwise working around the removal of these deprecated prop types.

**If anyone has trouble identifying the source of a deleted prop types usage, please file an issue so we can help track it down with you.**

Changelog:
[General][Removed] - Removed deprecated prop types

Reviewed By: lunaleaps, NickGerleman

Differential Revision: D52337762

fbshipit-source-id: 9731f7e1dec29f3df535ab75cc50bed001fdfa0b
2023-12-20 16:31:37 -08:00
Riccardo Cipolleschi
479b4bb1ba Install bundler versions depending on Ruby version (#41962)
Summary:
Since yesterday evening (why it is always friday evening???) CircleCI or Gem decided to update the default bundler version that is installed with `gem bundle install`.
Therefore, CI for iOS stopped working.

This change installs bundler's versions so that they are compatible with the Ruby version.

## Changelog:

[Internal] - Fix CI for iOS installing versions of bundler that are compatible with Ruby

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

Test Plan: CircleCI is green

Reviewed By: GijsWeterings

Differential Revision: D52230544

Pulled By: cipolleschi

fbshipit-source-id: 2f96e16ecb94159953056e8de757ea4d249f80f0
2023-12-16 08:50:20 -08:00
Nicola Corti
d8aa1a3c64 Bump Android Docker Image to v12 (#41828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41828

Bumping the docker image used inside CircleCI to v12
This image contains NDK 26.0.10792818 which was bumped recently.

Without it the CI will attempt to download it everytime consuming time and bandwidth

Changelog:
[Internal] [Changed] - Bump Android Docker Image to v12

Reviewed By: NickGerleman

Differential Revision: D51897068

fbshipit-source-id: a510568efc2574917d94371eeab6f0a53550bc1d
2023-12-07 03:43:26 -08:00
Nick Gerleman
1c57e969fb Test against XCode 14.3 and 15 (#41798)
Summary:
Apple will require XCode 15 next year to ship to the app store, and it aligns with how we build and test React Native internally.

XCode 15 and 14.3 add support for a lot of [missing C++ 20 features](https://developer.apple.com/xcode/cpp/#c++20) from earlier versions as well.

Last I was aware, Riccardo was onboard with bumping min supported in 0.74 to XCode 15. This change does a slightly more conservative bump to min 14.3, and main of 15.0 (though we might want to move these before 0.74 comes out).

All of this will get migrated over to GHA soon enough as well, but... formalizing this is the only thing blocking usage of C++ 20 ranges today.

Changelog:
[ios][breaking] - Require XCode >= 14.3

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

Test Plan:
1. CircleCI Passes
2. Can still boot RNTester from XCode with code signing related changes.

Reviewed By: cortinico

Differential Revision: D51840617

Pulled By: NickGerleman

fbshipit-source-id: 58f8951a436eb7c892a00432a8aad0ddd0a49da1
2023-12-05 15:35:05 -08:00
Oskar Kwaśniewski
847f5dedcc Fix typo in circleci config (#41727)
Summary:
This PR fixes typo in CircleCI config

## Changelog:

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

Pick one each for the category and type tags:

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

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

[INTERNAL] [FIXED] - Typo in circleci config

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

Test Plan: CI Green

Reviewed By: cipolleschi

Differential Revision: D51748329

Pulled By: cortinico

fbshipit-source-id: 99f54c5b9ec4113205642076c010b748ab6229f6
2023-12-01 04:35:19 -08:00
Riccardo Cipolleschi
f1df4ceb84 Add CircleCI readme (#41706)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41706

This change introduces a ReadME in the CircleCI folder.
This can be used as documentation to learn more about our CircleCI setup and will also help GitHub employees in executing the migration.

## Changelog:
[Internal] - Add CircleCI documentation

Reviewed By: cortinico

Differential Revision: D51665453

fbshipit-source-id: f61325ed26572c4a8d4a68db1cca5934d3d968fb
2023-11-29 07:49:29 -08:00
Riccardo Cipolleschi
dc95568375 Remove duplicated jobs in CircleCI (#41698)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41698

With the previous changes on the Pod configuration, the build setup for the New and Old architecture are the same.
The only observable difference happens at runtime.

This change:
1. Removes the build job that are split by architecture (which is now duplicated work)
2. Add two more test jobs to run runtime tests (unit and integration test) to make sure that the two architectures continue working.

## Changelog:
[Internal] - [CI] Remove duplicated build jobs, add tests jobs

Reviewed By: cortinico

Differential Revision: D51659275

fbshipit-source-id: 769c9ee004e7f4f1a7444f39c02b7083e007b780
2023-11-29 04:17:48 -08:00
Riccardo Cipolleschi
ef3c022ebd Remove unnecessary workflows (#41453)
Summary:
This PR removes some jobs we don't need right now

## Changelog:
[Internal] - remove unnecessary jobs

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

Test Plan: CircleCI stays green

Reviewed By: NickGerleman

Differential Revision: D51257788

Pulled By: cipolleschi

fbshipit-source-id: e348a7ef7af469ba019b2ccc33feed79a9d4febe
2023-11-13 22:07:51 -08:00
Riccardo Cipolleschi
6962b5fdd0 Move test_windows under test_JS (#41455)
Summary:
CircleCI was broken since Friday because a change broke JS tests on Windows only.
The test_windows job didn't run on those changes because they were JS changes only, therefore won't affect the build of React Native on Windows.

The `test_windows` was listed among the various `test_android` jobs, but it is not actually building React Native android on windows machines.
Instead, the test_windows jobs is actually only running JS tests on a windows machines. Therefore, it makes more sense to have this test under the test_js group.

bypass-github-export-checks

## Changelog:
[Internal] - Move the test_windows job under the testJS configuration

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

Test Plan:
CircleCI is green.
test_windows run together with the JS tests

Reviewed By: mdvacca

Differential Revision: D51258120

Pulled By: cipolleschi

fbshipit-source-id: a523c48f697b64620433ec9672f13baa308d75a8
2023-11-13 10:09:13 -08:00
Riccardo Cipolleschi
7e7fefd2c1 Fix Ruby installation (#41263)
Summary:
Starting from Monday, Ruby jobs using Xcode 14.1 started failing on PRs but not on main.
While CircleCI is investigating why this is happening, we found a way to make sure that we can install Ruby even when the cache misses.

## Changelog:
[Internal] - Make sure we can install ruby 3.2.0 when rbenv cache misses.

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

Test Plan: CircleCI is green

Reviewed By: blakef

Differential Revision: D50885897

Pulled By: cipolleschi

fbshipit-source-id: 9a452fd24d779cc14c86c7a8a4e3bf8ec62d0ceb
2023-11-01 09:00:07 -07:00
Riccardo Cipolleschi
ecffc4d40c Update node installation on debian (#41274)
Summary:
Instruction to install node on Debiam machine [has changed](https://github.com/nodesource/distributions#new-update-%EF%B8%8F) and the previous script cannot be used anymore.
This change updates it.

## Changelog:
[Internal] - Fix CI

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

Test Plan: CircleCI is green

Reviewed By: rshest

Differential Revision: D50879481

Pulled By: cipolleschi

fbshipit-source-id: a1d2a3b06c42587e168d66746e2ccb2959c0f9e0
2023-11-01 03:29:50 -07:00
Riccardo Cipolleschi
3d1d2f5a23 Prevent test windows to pull in node 20 (#41200)
Summary:
Since yesterday, Chocolatey is pulling in Node 20 rather than Node 18 for tests.
It ends up that mock-fs is not working with Node 20, so, for the time being, we are going to keep 18.

## Changelog:
[Internal] - Use node 18 instead of 20 for Test Windows

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

Test Plan: CircleCI is green

Reviewed By: hoxyq

Differential Revision: D50690846

Pulled By: cipolleschi

fbshipit-source-id: 505b8e8f90b46019d8e582cc8dad2e2d1edffd54
2023-10-26 05:14:48 -07:00
Riccardo Cipolleschi
6aae713a18 Disable unstable E2E tests (#41153)
Summary:
E2E tests in OSS are expensive and flaky.
They already prevented some broken changes to land on main, but as of today:
- they are always green, so they are not bloking
- nobody is looking at the reporting job
- the reporting job takes a lot of time to run and prevent other useful signals to be available soon
- it is expensive

So we decide to disable them for the time being, while we iterate on those with Callstack and MSFT.

## Changelog:
[Internal] -  Disable E2E tests

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

Test Plan: CircleCI stays green

Reviewed By: cortinico

Differential Revision: D50552818

Pulled By: cipolleschi

fbshipit-source-id: 7160a8074492c3c9a55485d8a17a6883eb4b35b5
2023-10-23 07:15:00 -07:00
Riccardo Cipolleschi
fdd62e969c Try to parametrize executors to use the min Xcode version for some jobs (#39602)
Summary:
App can be submitted to the app store by using Xcode 14.1 as min Xcode version.
Right now we are testing everything against the latests Xcode, but it would be good to have some tests to check that we don't break the flow for people stuck on older Xcodes.
We already had issues like these in the past, unfortunately.

Plus, we are making some changes using C++20 which we don't know whether they are properly supported by older versions of Xcode.
This change should give us confidence on those changes too.

## Changelog:
[Internal] - Use Xcode 14.1 for some tests

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

Test Plan: CircleCI is green

Reviewed By: NickGerleman

Differential Revision: D49540292

Pulled By: cipolleschi

fbshipit-source-id: 71c07293598fd5b1f73f6d7d9425f385aa12fc4e
2023-10-23 04:55:44 -07:00
Riccardo Cipolleschi
0b8fd748ee Make hermes build more robust to avoid cache poisoning (#41076)
Summary:
In one of the latests commits on main, Hermes failed somehow to build dSYMs in some slices.
However, the slices were cached (so the cache is poisoned) and the overall process failed.

With this change, we aim to make the slice's build process fail if the dSYM or the actual framework is not built properly, before caching, so they are not poisoned

## Changelog:
[Internal] - Fail the build if dSYM or hermes.frameworks are not built

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

Test Plan: CircleCI is green

Reviewed By: huntie

Differential Revision: D50453598

Pulled By: cipolleschi

fbshipit-source-id: 06bf16ef1472bd9bc9825977b817445272477a10
2023-10-19 05:32:24 -07:00
Riccardo Cipolleschi
320dc4e6b8 RN][CI] Remove Flipper integration from iOS CI (#41003)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41003

Following up the deprecation of Flipper in 0.73 and preparing for the removal of Flipper in 0.74, we are removing Flipper integration from the CI.

## Changelog:
[Internal] - Remove the Flipper integration from CI

Reviewed By: dmytrorykun

Differential Revision: D50321335

fbshipit-source-id: 04885d3dbaab9b2834c9461e0580dfbef386244f
2023-10-17 02:33:19 -07:00
Nicola Corti
171a479150 Remove ReactNative/Flipper Integration (#40935)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40935

This is scheduled to land in 0.74, so I'm removed the native integration as this is not needed anymore.
The only thing I left is a stub class to ease the migration out of `ReactNativeFlipper`.

Changelog:
[Android] [Removed] - Remove ReactNative/Flipper Integration

Reviewed By: mdvacca, huntie, cipolleschi

Differential Revision: D50259817

fbshipit-source-id: 28427425340896635607202cd78936f6030e78e0
2023-10-16 05:32:55 -07:00
Rob Hogan
d282ebe5d1 Verdaccio: proxy @react-native/normalize-colors from NPM (#40971)
Summary:
To address the root cause of a recurring issue (https://github.com/facebook/react-native/issues/40797, https://github.com/facebook/react-native/issues/39692) where breaking changes to `react-native/normalize-colors` would be pulled into old versions of `deprecated-react-native-prop-types`, we recently change the dependency in the latter to use a semver range (https://github.com/facebook/react-native-deprecated-modules/pull/27, https://github.com/facebook/react-native/pull/40869).

For CI, we generally force `react-native/*` to be resolved only from Verdaccio locally published packages - ie, the current versions at source. The source version (currently `0.74.1`) isn't semver-compatible with `deprecated-react-native-prop-types`'s dependency (`^0.73.0`), so `npm install` was failing in CI with "no package found". We should be getting `0.73.2` from the public registry in this case.

This restores a previous workaround added in https://github.com/facebook/react-native/pull/34571 but not updated since https://github.com/facebook/react-native-deprecated-modules/pull/11 meant the dependency was now on the pluralised package. We have no dependency on the old non-plural package any more.

## Changelog:

[INTERNAL] [FIXED] - CI/Verdaccio: Proxy `react-native/normalize-colors` from NPM for the `deprecated-react-native-prop-types` dependency.

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D50298291

Pulled By: robhogan

fbshipit-source-id: 4bf6503108335ffa52654346d1874c217071ff91
2023-10-14 06:39:17 -07:00
Riccardo Cipolleschi
8f7ffc4d5e Run all the tests when not on a PR
Summary:
## Changelog:
[Internal] - Run all the tests in CI when not on a PR

Reviewed By: cortinico

Differential Revision: D50220596

fbshipit-source-id: be1a30d713e9d427858cf22bd3ca9549ad513057
2023-10-12 03:31:32 -07:00
Riccardo Cipolleschi
5217890df9 Back out "Make sure template is consuming the right buildToolsVersion" (#40854)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40854

This [commit](a5d5ead1a4) seems to break all the Android template tests: [CircleCI](https://app.circleci.com/pipelines/github/facebook/react-native/34139/workflows/b203bbea-d3c4-45aa-9ce1-1ddde6d88bc0).

## Changelog:
[Android][Changed] - revert commit a5d5ead1a4

## Facebook:
Original Phabricator Diff: D50019777

Reviewed By: sammy-SC

Differential Revision: D50217952

fbshipit-source-id: d9b93ad72f08cf9f04cacfc04ea9b418f8129079
2023-10-12 03:18:50 -07:00
Riccardo Cipolleschi
e91fef733b Configure CircleCI for double publishing (#40785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40785

## Changelog:
[Internal] - Configure CircleCI for double publishing

Reviewed By: cortinico

Differential Revision: D49957950

fbshipit-source-id: 56b9be1b7be374af68d8340abaf06f1c58ab173e
2023-10-11 10:09:57 -07:00
Nicola Corti
a5d5ead1a4 Make sure template is consuming the right buildToolsVersion (#39956)
Summary:
Currently, the template has a `buildToolsVersion = '34.0.0'` specified in the top level .gradle file but it's not currently using it.

This is causing the build to fallback to the default version provided by AGP which is 33.x
This is also causing the CI to download buildtools 34.0.0 as they're not in the container (causing network flakyness).

I'm also bumping the docker container to v12 as we bumped NDK 26 which is missing in the v11 container.

## Changelog:

[INTERNAL] [FIXED] - Make sure template is consuming the right buildToolsVersion

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

Test Plan: CI should be green

Reviewed By: christophpurrer

Differential Revision: D50019777

Pulled By: cortinico

fbshipit-source-id: a2ab7a7bd7c55624d5c050b45e69086c5f25ba6a
2023-10-11 10:04:47 -07:00
Riccardo Cipolleschi
c279db78c4 Bump RNTester Cocoapods cache keys after SocketRocket 6.1.0 bump (#40789)
Summary:
Commit 8b88883071 broke the Cache for RNTester because the cached version of the pods does not know about the exitence of SocketRocket 6.1.0
Bumping the keys should force a redownload of the cocoapods specs repo

## Changelog:
[Internal] - Bump RNTester cache keys

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

Test Plan: CircleCI is green

Reviewed By: GijsWeterings

Differential Revision: D50169281

Pulled By: cipolleschi

fbshipit-source-id: 83e251495bfa43d62384470efe97c5505d76684f
2023-10-11 05:02:08 -07:00
Riccardo Cipolleschi
acb88d477e Makes the Jobs required for Hermes to run in tagged build while releasing (#39806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39806

Same issue of the previous fix: jobs do not run by default on tagged build. I forgot to add the filter parameter in the jobs that build the slices for Hermes and packages it and therefore the build failed.

I added those filters, so now we should be able to release RC.1.

What puzzles me is how it is possible that the publish-npm jobs even started, given that it was set up to depends on a job called build_hermes_macos which was not executed in the pipeline. 🤔

https://pxl.cl/3w2rr

## Changelog:
[Internal] - Make sure that the Hermes jobs starts when releasing

Reviewed By: dmytrorykun

Differential Revision: D49906898

fbshipit-source-id: ebbceb6cbc4dcd2ac22445610da1c52000c8ae2a
2023-10-04 05:49:39 -07:00
Riccardo Cipolleschi
cc7ea9ed0a Fix caching for Template (#39786)
Summary:
While inspecting the pipelines for the template, I realized that the caching was failing because the keys were malformed.
This PR fixes the malformed keys adding the missing "

## Changelog:
[Internal] - Fix cache keys for the Template

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

Test Plan: The template jobs should not fail with `error computing cache key: template: cacheKey:1: unterminated quoted string`

Reviewed By: cortinico

Differential Revision: D49874270

Pulled By: cipolleschi

fbshipit-source-id: 5a23237ba826e87f2cd15566e63a1316291af595
2023-10-03 11:30:52 -07:00
Riccardo Cipolleschi
d2742cec42 Make the Choose CI Job run also on tags (#39776)
Summary:
CircleCI does not run jobs on tags by default. However, when we release a new version of React Native, we push a tag and we want to create a release from that tag only ([CircleCI Docs](https://circleci.com/docs/workflows/#executing-workflows-for-a-git-tag)).

The release job is already configured to run on tag. However, in August, we moved to the CircleCI continuation APIs and the starting job of the pipeline was not set up to run
also on tags.

This change fixes the issue, making the Choose CI Job run also on tags.

## Changelog:

[Internal] - Make the Choose CI Job run also on tags

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

Test Plan:
Tested manually on CircleCI in a separate branch with a test tag (which have been then removed).
See commit history in this PR: https://github.com/facebook/react-native/pull/39774

Reviewed By: dmytrorykun

Differential Revision: D49863095

Pulled By: cipolleschi

fbshipit-source-id: 89c4eaa9903c02322056a4b57f56a24865a58b46
2023-10-03 04:40:41 -07:00
Riccardo Cipolleschi
4dd6820aa5 Make template pods resilient to changes to internal podspec (#39601)
Summary:
With this small change, we are binding the cache for the template to the cache of RNTester.
This is helpful because, by default, templates don't have a Podfile.lock of their own. It is normal, as they are app created from the template and we don't enforce the initial
lock of those dependencies.

However, this can cause some hassle when we bump some internal podspec as the cache that is restored in CI will be outdated.
With this change, the podfile.lock for RNTester is different --  we push it when we change the internal podspecs -- so the cache for the template will be invalidated too.

## Changelog:
[Internal] - Invalidate Template caches when we bump internal podspecs

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

Test Plan: CircleCI is green

Reviewed By: christophpurrer

Differential Revision: D49536315

Pulled By: cipolleschi

fbshipit-source-id: 04f1952f029ea643f2d82d2d690fad147faace05
2023-09-22 10:16:18 -07:00
Riccardo Cipolleschi
780567c727 Refactor publish-npm args to be more safe (#39532)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39532

This change refactors how we handle the parameters of publish-npm so we can only accept the build types we actually support.

## Changelog:
[Internal] - Make publish-npm args stricter

Reviewed By: cortinico

Differential Revision: D49374263

fbshipit-source-id: a17ddecc0ddcb30858dd0baaab8990ae765d304f
2023-09-21 04:35:41 -07:00
Riccardo Cipolleschi
27979dcd21 Bump template cache to fix iOS CI (#39560)
Summary:
Earlier today we bumped boost and removed a fix for Xcode 15.
Boost is a pod we don't consume from source and for the template we don't have a Podfile.lock to update.
However, the pod we don't control are cached as they don't change often.

This PR fixes bumps the cache to fix the CI issue

bypass-github-export-checks

## Changelog:
[Internal] - Bump iOS CI cache keys for the template

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

Test Plan: CircleCI is green

Reviewed By: christophpurrer

Differential Revision: D49458677

Pulled By: cipolleschi

fbshipit-source-id: 957bb5bcc5fe940b9ea08c3f0b9031a39cee37ff
2023-09-20 08:05:44 -07:00
Riccardo Cipolleschi
47de1f6e56 Bumping the resource class for Analyze-pr to Medium (#39504)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39504

We are receiving "killed" signals in CircleCI for the analyze_pr jobs.
Looking at the doc, it seems that it is due to us allocating to much memory.

As a mitigation, let's bumpt the executor to Medium.

## Changelog:
[Internal] - Bump executors for Analyze-PR to Medium to avoid choking

## Facebook:

Small machines consume 5 cred/min. Medium consume 10.
On average, the job takes 7 min to complete. So we are paying 35 credits per job. We will be paying 70 creds.
The upper bound cost is $ 0.042 per execution.
In the past month we were running 1820 jobs. We will be spending 1820 * 0.042  = $76.44 per month, rather than $38.22.
This is roughly $500/year.

We can fix the script with a different approach in the future.

Reviewed By: cortinico, dmytrorykun

Differential Revision: D49368118

fbshipit-source-id: 7e04e4be79b0f07d02338834e543b707c93c4363
2023-09-18 04:51:26 -07:00
Nick Gerleman
17154a661f C++ 20 all the things (#39454)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39454

1. Build with C++ 20 everywhere.
2. Update folly in OSS build to avoid a warning, and let us opt out of heavy bits required for supporting coroutines (we are still more than a year behind).
3. Update the folly podspec for the new version of folly
4. Update the many, many, copy/pasted header search paths for folly dependencies to be able to resolve fmt, now exposed to folly headers
4. Replaces a deprecated atomic usage with equivalent.
5. Fixes a deprecated implicit capturing `this` by value in lambda (same behavior, added a TODO because it seems sus)

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D49271685

fbshipit-source-id: 16610f7bcd1032d5796cc11f1cfa92a33d8c2593
2023-09-15 01:17:55 -07:00
szymonrybczak
9d52767c01 fix(e2e): add versions when installing appium drivers (#39275)
Summary:
Right now we're fetching latests versions of drivers which isn't the best, we should always download the same versions.

## Changelog:

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

Pick one each for the category and type tags:

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

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

[INTERNAL] - Add versions when installing Appium drivers.

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

Test Plan: CI Green - (side note: if jobs `test_e2e_ios` and `test_e2e_android` are green it doesn't mean that they passed.)

Reviewed By: cipolleschi

Differential Revision: D49248778

Pulled By: NickGerleman

fbshipit-source-id: 5b114b7dc1172993afc4b02e9d3380afa9f03c40
2023-09-14 05:21:09 -07:00
Nick Gerleman
247717b091 disable test_e2e_android job (#39399)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39399

Even after making these never report command failures, and allowing no output for thirty minutes, there are still failures here (though less) which cause lands to be aborted, especially for stacks with multiple diffs (it has prevented a recent stack of mine from landing after multiple attempts).

```
yarn run v1.22.19
$ node ./../../scripts/e2e/run-e2e-tests.js android
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/home/circleci/project/node_modules/babel/types/lib/validators/generated/index.js:3940:35)
    at NodePath.<computed> [as isModuleDeclaration] (/home/circleci/project/node_modules/babel/traverse/lib/path/index.js:181:12)
/bin/bash: line 2: 14063 Hangup                  yarn test-e2e android 2>&1
     14064 Done                    | tee /tmp/test_log

Too long with no output (exceeded 30m0s): context deadline exceeded
```

We are not able to detect regressions from tests while they are configured to suppress all failures, and they are still causing issues (though less), so this disables them at the job level until improvements can be made.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D49175533

fbshipit-source-id: f8b99725a57500b027874f3ef51d74c869502a22
2023-09-11 22:47:59 -07:00
Blake Friedman
48c297e877 *Attempt* to use the hermesversion in the podfile.lock cache (#39379)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39379

We are seeing some failures in circleci that looks weird. By inspecting the tar of Hermes that should be used, they all have the right files. But then, the artifct actually used is missing something.
By looking at the log of the pod install step, it seems that the hermes-engine is not installed, thus using something stored in a previous cache.

This change should take into consideration the hermesversion also for the podfile.lock, so that we do have different Podfile.lock based on different versions of hermes.
I'm also bumping the versions of the keys to reset the caches and to keep them in sync.

## Changelog:
[Internal] - USe the hermesversion checksum in the podfile.lock keys.

Reviewed By: cipolleschi

Differential Revision: D49134827

fbshipit-source-id: c0e1dbc11ec61825f615315aa6215806b7577845
2023-09-11 06:51:26 -07:00
Moti Zilberman
01d7ec13b1 Use Hermes-engine version in caches for RNTester jobs (#39366)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39366

With the recent CI optimization, we were caching the hermes-engine stored in the Pods folder in order to reuse it.
However, by doing so, we would not avtually use the hermes-engine we were building in CI nor we were using the most recent version in the E2E tests as the Podfile.lock would not have actually changed and Cocoapods would have found a proper version for the Hermes-engine.

## Changelog:
[Internal] - use the hermes engine version to invalidate cocoapods caches

Reviewed By: blakef

Differential Revision: D49125000

fbshipit-source-id: 2af81522d02a7f461fe3ab5b98a4f314013c185a
2023-09-11 05:53:45 -07:00
Nicola Corti
c0244c6445 Add no_output_timeout: 30m to E2E jobs (#39322)
Summary:
Just increases the timeout as the E2E test runs

## Changelog:

[INTERNAL] - Add no_output_timeout: 30m to E2E jobs

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

Test Plan: CI should be green

Reviewed By: cipolleschi

Differential Revision: D49056677

Pulled By: cortinico

fbshipit-source-id: c9b9af4b0fe2331a217438e303316a1f379c9e8d
2023-09-07 08:31:25 -07:00
Dmitry Rykun
99a306dd9e Reuse test_ios_rntester to run iOS tests (#39277)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39277

When we were reworking the Build logic in CI, we thought that the `test_ios` job and the `test_ios_rntester` jobs were the same. But, actually, they aren't.
So, now, we are seeing failures in the `test_ios` because its caches are not updated.

This changes remove the duplication of the two jobs, making sure that they use the same job, adding the possibility to run tests directly in rntester.

## Changelog:
[Internal] - Reuse test_ios_rntester to run iOS tests

Reviewed By: motiz88

Differential Revision: D48950096

fbshipit-source-id: e297d77fbd18f03873ed7a16a595e186d0e2453a
2023-09-06 07:18:48 -07:00
Riccardo Cipolleschi
9552ed0ffc Persist Hermes MacOS Artifacts to Workspace Depending on Build Flavor (#39234)
Summary:
In some occasion, we have a race condition when:
- prepare hermes workspace has some artifacts but not all of them, and it store them to the workspace
- the pipeline rebuilds the missing artifacts
- the build_hermes_macos jobs tries to upload the pre-existing artifacts, uploading the whole folder.

So, for example, imagine that at the prepare_hermes_workspace time, we are able to restore both the `hermes-ios-release.tar.gz` and the `hermes-ios-debug.tar.gz`. When the two
concurrent `build_hermes_MacOS-Debug` and `build_hermes_MacOS-Release`, they will both try to upload both tars at the same time, and that results in the concurrent errors we
are seeing.

This change should fix this, by having the Debug job upload the Debug artifacts only and the Release jobs upload the Release artifacts only, so there will be no concurrent
upload of the same files.

## Changelog:

[Internal] - Upload Hermes macos artifacts depending on the Build flavor.

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

Test Plan: CircleCI stays green.

Reviewed By: GijsWeterings

Differential Revision: D48861430

Pulled By: cipolleschi

fbshipit-source-id: 02bd045cdb969ad1c173e78ffb42185c14ba171e
2023-08-31 03:46:50 -07:00
Riccardo Cipolleschi
b80122c48f Make the e2e Tests actually not blocking (#39175)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39175

Just `tee`-ing the e2e tests command into a log is not enough to make the command non-failing.
I'm wrapping it into a single command and `or`-int to true to ensure that it never fails.

## Changelog:
[Internal] - Make e2e tests not failing in CI

Reviewed By: rshest

Differential Revision: D48720827

fbshipit-source-id: cb1ed9a15c7761371ae48e7edca90f032688daa1
2023-08-29 01:59:47 -07:00
Sam Zhou
246b5cf414 Remove CI check jobs on .flowconfig.android in react-native (#39158)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39158

.flowconfig.android is the same as .flowconfig now. The check is meaningless. This diff removes it and the flowconfig.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D48629137

fbshipit-source-id: bc1bee9426eed7bc41dc7a1efe75333e1191e066
2023-08-26 10:00:22 -07:00
Riccardo Cipolleschi
a05858680a Make the e2e tests not land blocking (#39129)
Summary:
Given that the e2e tests are quite flaky, we want to reduce the flakyness making them non land blocking.
The idea is to:
1. always have them green in CircleCI
2. store the test logs in CircleCI artifacts, so we can explore them if needed.
3. use danger to read the artifacts from CircleCI and post a message to inform the user whether the Test ends up successfully or not.

## Changelog:

[Internal] - Make e2e tests non land-blocking. Use Danger to report the status of the E2E jobs

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

Test Plan: CircleCI stays green, logs are uploaded as artifacts.

Reviewed By: rshest

Differential Revision: D48642955

Pulled By: cipolleschi

fbshipit-source-id: 185862f46c47d59f949743a9b893162b2bb3a651
2023-08-25 05:11:28 -07:00
Riccardo Cipolleschi
1be2ac3162 Try to disable test on HermesC for linux (#39123)
Summary:
Build hermesc for linu is failing on a test. Let's try to disable testing of Hermes in React Native CI as it is expensive and not RN responsibility.

## Changelog:

[Internal] - Disable Hermes C++ tests in React Native CI

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

Test Plan: CircleCI get back to green

Reviewed By: cortinico

Differential Revision: D48597809

Pulled By: cipolleschi

fbshipit-source-id: 5eed8dff47d5adaf0da683b19fb4dfca3a4bc219
2023-08-23 05:30:33 -07:00
Riccardo Cipolleschi
641be98b1e Split Config.yml to run jobs selectively (#39042)
Summary:
Right now, every PR runs the whole test suite. For example, a changelog PR, will run all the tests. As of last month, that meant quite a few $s per single run.

With this PR, we are going to leverage dynamic configuration and file filtering to create a config.yml on the flight, depending on the files changed by the commit/pr.

They way it works is the following:
- It starts a setup workflow in CircleCI.
- This workflow fetch the list of files that have been changed in the current commit.
- It executes a bunch of filtering and computation to understand which tests makes sense to run.
- It creates a config on the flight to run those.
- It continue the pipeline on that config.

Currently, the way it works is the following:
- If a `.md` file has been modified => run nothing
- If only files in the `ReactAndroid` folder are modified => run tests for android only
- If only files in the `React` folder are modified or `ruby` files are modified => run only iOS tests
- If only js files, not in the scripts folder are modified => run only JS tests
- if only files in the e2e folder are modified => run only e2e tests
- else => run everything.

Of course, we can play and modify those filters t make sure that they reflect the work and the tests to the best we can.

bypass-github-exports-checks

## Changelog:
[Internal] - Split circleci config and run test selectively.

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

Test Plan:
- [X] Tested on the local branch for general sanity check.
- [X] Import it in fbsource
- [x] Create a stacked diff which changes only a md file => verify that no tests are run.
- [x] Create a stacked diff which changes only files in ReactAndroid => verify that only android tests run.
- [x] Create a stacked diff which changes only files in React => verify that only iOS tests run.
- [x] Create a stacked diff which changes only ruby files => verify that only iOS tests run.
- [x] Create a stacked diff which changes ruby files and file in React => verify that only iOS tests run.
- [x] Create a stacked diff which changes only files JS not in the script folder => verify that JS tests run.
- [x] Create a stacked diff which changes only JS files in the script folder => verify that the whole suite starts.
- [x] Create a stacked diff which changes only files in the E2E folder => verify that only E2E files runs.
- [x] Trigger a nightly pipeline => verify that parameters are passed to the generated config.

Reviewed By: NickGerleman

Differential Revision: D48394437

Pulled By: cipolleschi

fbshipit-source-id: 771f3e68daa8318d2b73dd91ce85a41488110c04
2023-08-18 07:22:22 -07:00
Riccardo Cipolleschi
c326ec0475 Add retry mechanism to test_e2e_android to reduce flakyness (#39068)
Summary:
We figured that android e2e tests are a bit flakier than needed. This change add a retry mechanism to rerun the tests up to 3 times in order to try and reduce the flakyness there.

## Changelog:

[Internal] - Add retry to Android e2e tests

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

Test Plan: CircleCI stays green

Reviewed By: cortinico

Differential Revision: D48463517

Pulled By: cipolleschi

fbshipit-source-id: cdf3dca047dce89cc5d2dccc9b847283b93bbd36
2023-08-18 04:08:56 -07:00
Riccardo Cipolleschi
623f44c7ce Revert D48118162: Split CircleCI config
Differential Revision:
D48118162

Original commit changeset: 73c8071a7e80

Original Phabricator Diff: D48118162

fbshipit-source-id: f070601c8631a9b91bb298ce94a9eb7cee13e059
2023-08-16 05:46:52 -07:00