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

375 Коммитов

Автор SHA1 Сообщение Дата
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
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -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
Héctor Ramos 232d02c5f6 Move Docker test to GitHub Actions
Summary:
The test_docker_android job on Circle CI has a simple function: verify the base community RN Android image can be downloaded, and verify that we can use it to build a container with a compiled Android test app.

Since the job is not strictly running a suite of tests, it can be moved to GitHub Actions. It will run on GitHub Actions as a Check on commits to main and pull requests.

As building the test image requires the use of the base React Native Android image, we can skip downloading the base container and go straight to building the test image.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D31521978

fbshipit-source-id: ca8372a1464054e37f2da28a3ecfbc8f84db0408
2021-10-09 11:37:53 -07:00
Luna Wei 2a605c30e4 Comment on PR with link to PR artifact
Summary: Changelog: [Internal] Configure circleCI to comment on PR after building tarball

Reviewed By: hramos

Differential Revision: D31387660

fbshipit-source-id: 28902148cf5e2ea15320333b90a6a7fa9d553c3b
2021-10-08 17:55:00 -07:00
Gustavo Sverzut Barbieri 57aa70c06c Introduce Gemfile, ruby-version (#32303)
Summary:
Implement par of the discussion https://github.com/react-native-community/discussions-and-proposals/discussions/411, except the `.nvmrc` part, this includes:
 - Setting `.ruby-version` in the main project and also `template/`
 - Fixing the CocoaPods version with a project-level `Gemfile` and also `template/Gemfile`
 - Using all `pod` executions from `bundle exec pod`, using the determined version
 - Script to manage and update the ruby version

## Changelog

[iOS] [Added] - Gemfile with CocoaPods 1.11 and ruby-version (2.7.4)

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

Test Plan: Build for iOS and run all CircleCI tests to see if nothing changed

Reviewed By: RSNara

Differential Revision: D31344686

Pulled By: fkgozali

fbshipit-source-id: 25c63131ca9b16d3cf6341019548e0d63bdcaefe
2021-10-01 21:22:26 -07:00
Kevin Gozali 42dc8ddff4 OSS CircleCI: Unbreak analyze_pr cert issue (#32317)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32317

Context: https://github.com/nodesource/distributions/issues/1266#issuecomment-932583579

For now apply some workaround in analyze_pr docker image to unblock.

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D31356337

fbshipit-source-id: 4c5ea57e6f94eeb53c8a12b736d7d178b2b9c6e6
2021-10-01 17:01:56 -07:00
Kevin Gozali fabd253ef1 OSS Circle CI: upgrade iOS image Node installation to v14 (#32316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32316

Other tests/images are already using Node 14, let's upgrade.

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D31351912

fbshipit-source-id: a42addbf7aa7c2dcbf497519b7af18d0cdb31e65
2021-10-01 15:33:03 -07:00
Kevin Gozali 8b5906d209 OSS CircleCI: pinned Linux machines to ubuntu-2004:202010-01 (#32315)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32315

Some tests were running old Ubuntu with old Node.js etc, causing failures like this:
https://app.circleci.com/pipelines/github/facebook/react-native/10557/workflows/ddd94f8a-7200-40ab-9439-19683d691c67/jobs/220000

In this case, `node` in the machine was really old:

```
node -v
v6.1.0
```

So let's use the latest recommended one per: https://circleci.com/docs/2.0/executor-intro/#machine

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D31351763

fbshipit-source-id: e97aae638cc5b999e98129de64dad9092113cb5f
2021-10-01 15:33:03 -07:00
Kevin Gozali 34b7d22f3d OSS: install node via nvm on iOS image (#32309)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32309

With the iOS image using Xcode 13, the Circle CI guide mentioned to use `nvm` to manage node: https://circleci.com/docs/2.0/testing-ios/#images-using-xcode-13-and-later.

Note: doing this here also helps with Xcode build scripts that needs to invoke this line: https://github.com/facebook/react-native/blob/main/scripts/find-node.sh#L27. For some reason, with Xcode 13 Circle CI image, without explicitly sourcing find-node.sh beforehand, react-native-codegen script phase within Xcode would fail (permission denied), like: https://app.circleci.com/pipelines/github/facebook/react-native/10525/workflows/b68b10a3-325a-4892-8252-baed9017c613/jobs/219615

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D31331905

fbshipit-source-id: 387c7a8931b07ee76fa6cd081d04c8704c1f7da4
2021-10-01 10:27:37 -07:00
Kevin Gozali 95187f7ebc OSS: fix up .watchmanconfig file content
Summary:
The latest watchman requires non-empty config file, so `{}` works.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D31328467

fbshipit-source-id: fb1e8dee308e4ffeb035d7f9804c20edcb6b915d
2021-09-30 20:25:11 -07:00
Héctor Ramos 2d2de744bb Build release package on stable oss release branches
Summary:
Expands the building of npm tarballs to include branches that match the /^(\d+)\.(\d+)-stable$/ regexp.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D31272377

fbshipit-source-id: a536a0b5e14812ece8266f3c83497071405a164a
2021-09-29 11:02:22 -07:00
Héctor Ramos b29b05fa98 bump-oss-version: Add -v / --to-version argument and use it when bumping nightly releases (now at 20:00 UTC)
Summary:
Add a new -v or --to-version argument to the bump-oss-version script.

When the bump-oss-version script runs, it will use the version string that is passed in, instead of trying to infer it from the current commit. This fixes a bug in the last nightly release where the bump script used a different version string than what the publish script expected.

Nightlies now run at 20:00 hours UTC.

Changelog: [Internal]

Reviewed By: fkgozali, TheSavior

Differential Revision: D31261829

fbshipit-source-id: a9341f93c3c7bf0379aa3c5e7f345182df70f846
2021-09-29 00:11:32 -07:00
Héctor Ramos c6907ee488 Bump Xcode to 13.0.0 and CocoaPods to 1.11.2
Summary:
Bump the version of Xcode used in internal and external iOS tests, as well as the CocoaPods version used in RNTester (and therefore, the internal CocoaPods offline mirror).

New versions used:
* Xcode 13.0.0
* CocoaPods 1.11.2

See Circle CI Xcode 13.0.0 macOS Container Software manifest: https://circle-macos-docs.s3.amazonaws.com/image-manifest/v6052/index.html
* Xcode 13.0 Build version 13A233
* CocoaPods	1.11.2

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D31253170

fbshipit-source-id: c85f3ee12fa708d9e54fef1200f3124810211d2f
2021-09-28 22:28:06 -07:00
Héctor Ramos 6b86c834ae Circle CI: Build a release on pull-request commits
Summary:
Package a npm tarball for react-native on pull-request commits, for ease of testing during development.

Ensure npm/github secrets are not exposed on pull-request builds (e.g. Circle CI will only grab the CIRCLE_NPM_TOKEN and GITHUB_TOKEN on jobs triggered by tagged commits or commits on main)

Renames Circle CI `publish_npm_package` job to `build_and_release_npm_package`, and uses `build_npm_package` for dry runs (e.g. commitlies).

Changelog: [internal]

Reviewed By: fkgozali

Differential Revision: D31243726

fbshipit-source-id: 2907febac3286a1504984c2f14e84dec1d819858
2021-09-28 16:30:35 -07:00
Héctor Ramos 2254d95cdb Releases: tag nightlies with commit and timestamp
Summary:
Nightlies will be tagged with the commit they are based off and a timestamp.

> Example: `react-native-0.0.0-084a8b5f0-20210928-054053`

Commitlies now use the proper name on Circle CI for their job: `build_commit_package`.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D31224640

fbshipit-source-id: d1742a1d475aaf60d7b4c0708e30a5c5b205182d
2021-09-28 13:53:17 -07:00
Héctor Ramos 5bc9d91b10 Circle CI: (FIX) Build release package outside of publish-npm.js
Summary:
The version of npm available in Circle CI is 6.x, which does not support the `--pack-destination` argument. As a result, `npm pack --pack-destination build` was interpreted as a request to package the 'build' directory for distribution.

Since we need to make sure the output of `npm pack` is consumed by Circle CI's `store_artifacts` directive, we move the commitlies release packing logic to the Circle CI job config itself as to reduce coupling between `publish-npm.js` and the Circle CI config.

Changelog: [Internal]

Reviewed By: sota000

Differential Revision: D31183635

fbshipit-source-id: f0e0baae4ae31941dbb78dd1fec689f0f3398b52
2021-09-25 10:06:04 -07:00
Héctor Ramos c0b46f3487 Circle CI: Package a release on every commit, but do not publish it
Summary:
Otherwise known as "commitlies," these are per-commit releases that do not get published to npm. They can be downloaded from Circle CI's artifacts pane on the relevant "build_npm_package" job.

If `--dry-run` flag is passed to `publish-npm.js`, it will perform the same steps as a `--nightly` but it will stop short of publishing the nightly to npm. The tarball for the release will be available in the `build/` directory.

Commitlies are implemented by triggering a `--dry-run` publish step on any commit that is not tagged as an open source release (e.g. `/v[0-9]+(\.[0-9]+)*(\-rc(\.[0-9]+)?)?/`).

Changelog:
[Internal]

Reviewed By: sota000

Differential Revision: D31177828

fbshipit-source-id: 7d4f79e1ed15718a177d2cb8fc620d5fb860ccf9
2021-09-24 13:49:16 -07:00
Nicola Corti 12b0e024e1 Test the Android template on CircleCI (#32228)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32228

This setups a step on Circle to
test the Android template with the head of `main` of react-native to make
sure we're not actually breaking the Android template.

Changelog:
[General] [Added] - Test the Android template on CircleCI

Reviewed By: ShikaSD

Differential Revision: D31018850

fbshipit-source-id: 6f0abc9e0c22ef61e1aa79b513c70065ace5088e
2021-09-24 01:04:24 -07:00
Héctor Ramos ead19e13e1 Use Fabric by default in RNTester
Summary:
It is no longer necessary to specify USE_FABRIC=1 when running `pod install` in order to enable Fabric in RNTester.

Changelog: [INTERNAL]

Reviewed By: fkgozali

Differential Revision: D30977549

fbshipit-source-id: fccc3e433041a710b02ddc516cdff07ce7af2409
2021-09-15 18:34:30 -07:00
Nicola Corti 862a5fe147 Splits test_docker into smaller steps (#32215)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32215

Currently `test_docker` is the biggest offender in terms of time consumed
on CI (~70 minutes). I'm splitting it in smaller steps to let us investigate better
what is going on.

Changelog:
[General] [Changed] - Splits test_docker into smaller steps

Reviewed By: ShikaSD

Differential Revision: D30958906

fbshipit-source-id: 2a80535afe77f98427dd0d38e66c6de3fdf80188
2021-09-15 08:07:12 -07:00
Nicola Corti cad3effa92 Simplify the Circle CI setup steps (#32207)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32207

This diff is removing some of the unnecessary steps on our CircleCI setup.
Specifically all the `setup_` steps are just checking out the code on different runners and nothing more
therefore I'm cleaning that up. A simple `checkout` should do the job.

I'll do a couple of runs to understand if that is also impacting performances or not.

Changelog:
[Internal] [Changed] - Simplify the CircleCI setup steps

Reviewed By: mdvacca

Differential Revision: D30932949

fbshipit-source-id: 2dec1aaa829416fdf10f4f13089f024a81c14082
2021-09-15 01:34:34 -07:00
Moti Zilberman 8408d723ff Update Android Dockerfile to include root BUCK file (#31950)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/31950

Changelog: [Internal]

Adds the root BUCK file to the Docker image we use to test RNTester on CircleCI. See df9cd05621

Reviewed By: ShikaSD

Differential Revision: D30099261

fbshipit-source-id: 936c505a0f4e7b791743901a06fa3b14c40b183e
2021-08-04 04:35:45 -07:00
Tim Yung 2b7366e41d RN: Update CI & Bots to `main`
Summary:
Updates CI and bot configurations to use `main` instead of `master`.

I will land this after I conver the repository to `main`.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D29717337

fbshipit-source-id: 9aa9711df921cd7d3d94fbc3d8bb9d6e22abf5c1
2021-07-15 15:22:57 -07:00
Dulmandakh 4bacfe4806 CI: bump react-native-android to 4.0 (#31741)
Summary:
This PR bumps react-native-android docker image to version 4.0, which includes Android NDK 21 and other command line utilities used for CI.

## Changelog

[Internal] [Changes] - bump react-native-android to 4.0

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

Test Plan: CI is green again, especially test_docker

Reviewed By: mdvacca

Differential Revision: D29229964

Pulled By: ShikaSD

fbshipit-source-id: b50d376b94fe6d8f933a550133054b62267d21a7
2021-06-18 08:10:46 -07:00
Dulmandakh aa43aab77c Bump NDK to 21.4.7075529 (#31731)
Summary:
This PR bumps NDK_VERSION to 21.4.7075529, and patches FileUtil.cpp from folly based on patch from https://github.com/facebook/folly/pull/1593. We can remove the patch once PR lands in Folly and bump Folly version in RN.

FYI, NDK 20 is deprecated and 21 is LTS release.

## Changelog

[Android] [Changed] - Bump NDK to 21.4.7075529

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

Reviewed By: mdvacca

Differential Revision: D29166690

Pulled By: ShikaSD

fbshipit-source-id: 0792691404f718aaf5af1369f66f0cba046b4e20
2021-06-17 04:21:50 -07:00
Peter Argany eb30594f10 Bump CI Xcode and iOS Version to 14.5
Summary:
Similar to https://github.com/facebook/react-native/pull/31554 (D28547839 (b2ec89fdfc))

This diff bumps Xcode to 12.5.0 both internally, and in Circle CI.

According to [Circle CI docs](https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions), their environments support Xcode 12.5.0.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D28952323

fbshipit-source-id: e15871d72094cfbcf9edb633586b37042e79901a
2021-06-08 09:53:29 -07:00
Moti Zilberman d676cbe6c9 Use Node v14 in Windows CircleCI jobs (#31656)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/31656

CircleCI's Windows executor currently ships with a pre-LTS release of Node v12, breaking our Windows jobs ([example](https://app.circleci.com/pipelines/github/facebook/react-native/9280/workflows/21e6e59c-d853-47a1-af62-1368c8ce10ce/jobs/203983)) following https://github.com/facebook/react-native/pull/30637, ultimately due to https://github.com/facebook/jest/pull/10685 dropping support for non-LTS versions in the Node v12 release line.

Luckily, the Windows executor [does ship with nvm](https://github.com/circleci/circleci-docs/issues/3733) so we can use that to install a desired Node version. Rather than just pinning a later v12 release that is LTS, we pin a v14 release that is currently the most recent LTS version.

NOTE: The nvm on CircleCI is https://github.com/coreybutler/nvm-windows, not https://github.com/nvm-sh/nvm, and the two aren't interchangeable. [nvm-windows has no functionality to install the latest version of a release line](https://github.com/coreybutler/nvm-windows/issues/156) so we're forced to specify an exact version, which will need to be bumped manually in the future. This isn't great, but IMO it's no worse than the current situation, where we use whichever stale version of Node happens to be bundled with the Windows CircleCI executor.

Changelog:
[Internal]

Reviewed By: GijsWeterings

Differential Revision: D28896581

fbshipit-source-id: a412376cf36054de49efa49866fe60dd964567c5
2021-06-04 07:19:51 -07:00
Dulmandakh 5d01110b53 bump buildToolsVersion to 30.0.2 (#31627)
Summary:
Bump buildToolsVersion to 30.0.2, default version of Android Gradle Plugin 4.2.0. Fixes parity with https://github.com/facebook/react-native/pull/31593

## Changelog

[Android] [Changed] - Bump buildToolsVersion to 30.0.2,

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

Test Plan: Newly created projects will use build tools 30.0.2 to build dependencies.

Reviewed By: yungsters

Differential Revision: D28833598

Pulled By: ShikaSD

fbshipit-source-id: 009472d27ea7103bdc7e5a6a941ab529d982f2da
2021-06-03 14:32:00 -07:00
Ramanpreet Nara b2ec89fdfc Fix react-native-oss-ios by bumping Xcode to 12.4.0 (#31554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/31554

## Changes
This diff bumps Xcode to 12.4.0 both internally, and in Circle CI.

- According to [Circle CI docs](https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions), their environments support Xcode 12.4.0.
- According to the [Apple Docs](https://developer.apple.com/support/xcode/), Xcode 12.4.0 matches iOS 14.4.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D28547839

fbshipit-source-id: c9edde6a5825ae597bf56225d1b017c3af0f52ae
2021-05-19 14:18:50 -07:00
Héctor Ramos 6ccd0cdebb Bump Android compileSdkVersion and targetSdkVersion to 30 (#31078)
Summary:
## Summary

Bump Android compileSdkVersion and targetSdkVersion to 30

## Changelog

[Android][Changed] Bump Android compileSdkVersion and targetSdkVersion from 29 to 30

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

Test Plan: Circle CI and Sandcastle

Reviewed By: mdvacca

Differential Revision: D26765188

Pulled By: hramos

fbshipit-source-id: a971641cea4860df58ce6e9b0f14405bfc4e0979
2021-03-02 16:40:48 -08:00
David Vacca 5194183037 Revert D26470604: Bump Android compileSdkVersion and targetSdkVersion to 30
Differential Revision:
D26470604 (55c8833817)

Original commit changeset: ffd490f6e547

fbshipit-source-id: 71926781696ab7b7fb2b109198a8d02c3286b05f
2021-02-26 21:44:45 -08:00
David Vacca 55c8833817 Bump Android compileSdkVersion and targetSdkVersion to 30
Summary:
Bump Android compileSdkVersion and targetSdkVersion to 30
changelog: [Android][Changed] Bump Android compileSdkVersion and targetSdkVersion from 29 to 30

Reviewed By: ShikaSD

Differential Revision: D26470604

fbshipit-source-id: ffd490f6e547d16f9832ec46cf7bd2c0689aba96
2021-02-26 21:12:54 -08:00
Héctor Ramos 4384fb266b Refresh yarn gpg key in analyze_pr job (#30993)
Summary:
Workaround https://github.com/yarnpkg/yarn/issues/7866 by refreshing the yarn key before using apt.

## 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] - CI

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

Test Plan:
```
circleci config validate

Config file at .circleci/config.yml is valid.
```

Reviewed By: fkgozali

Differential Revision: D26428755

Pulled By: hramos

fbshipit-source-id: d64c37eb6678e12279075a060deecef5d2e04919
2021-02-12 11:34:21 -08:00
Andrei Shikov a70dc4bcad Renew yarn keys before apt-get update to avoid errors
Summary:
Yarn key had expired on 2nd of February. The owner has renewed it, but seems like Circle CI still has the old one cached. (see https://github.com/yarnpkg/yarn/issues/6865#issuecomment-772047314)

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D26276386

fbshipit-source-id: 093c7de94445b6ff9beb5792b16564e5c3bd1234
2021-02-05 09:32:03 -08:00
Andrew Coates f66dcab89f Try to install the SDK up to 3 times (#30742)
Summary:
The windows CI tests are flaky due to network failures trying to install the android SDK.  This modifies the CI to retry a couple of times if the first install fails.

CircleCI will timeout the command if there is no output to the console for 10mins.  I've added a timeout to the choco command for 9mins, which should cause it to timeout before the circleci one (assuming that it spends a non-zero time with output before hanging on the download)  On successful downloads runs the download seems to be substantially quicker than the 10min timeout.

I added --force and --forcedependencies on the retries, otherwise if the jdk package fails, but the androidsdk package installs, the retry will still not install the jdk package.

This doesn't fully fix the issue, since the CI is still hitting the network, which could be flaky all 3 attempts.  But hopefully it'll improve the success rate somewhat.  -- Really the Windows CI job should have some kind of docker image or something that already has all the prereqs installed.

## Changelog

[Internal] [Fixed] - Windows CI Android SDK install retry

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

Test Plan: We'll see if the windows CI becomes more reliable

Reviewed By: fkgozali

Differential Revision: D26231499

Pulled By: hramos

fbshipit-source-id: f4a7f2132b3317f4763ddadcd909ef1c2a43dc2f
2021-02-03 15:01:56 -08:00
Agastya Darma 5b34c98fa2 WIP: Add an explicit NDK version to RNTester and ReactAndroid (#29987)
Summary:
When I try to run RNTester with Gradle the RNTester Required me to use **NDK 20.0.5594570**. I can't seem to find an explicit NDK version anywhere in ReactAndroid and RNTester. This PR Aims to add an explicit NDK version to RNTester and ReactAndroid.

![Screenshot from 2020-09-19 21-13-17](https://user-images.githubusercontent.com/8868908/93669563-444fcf00-fabf-11ea-8822-93264c5bb736.png)

## Changelog
[Android] [Added] - Add an explicit NDK version to RNTester and ReactAndroid.

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

Test Plan: Build manually from RNTester

Reviewed By: fkgozali

Differential Revision: D23911371

Pulled By: ShikaSD

fbshipit-source-id: 2f297c73890c0eb0bfec0e2ba7ec5755b4d84243
2021-01-04 09:15:08 -08:00
Héctor Ramos f002a5710f Disable tests with USE_FRAMEWORKS=1 (#30655)
Summary:
Tests that set USE_FRAMEWORKS=1 will fail because Flipper does not currently support the use of frameworks. These tests should be re-enabled once this issue is addressed.

## 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] - Disable USE_FRAMEWORKS=1 tests

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

Test Plan: CI

Reviewed By: fkgozali

Differential Revision: D25718040

Pulled By: hramos

fbshipit-source-id: 1db1fc59b2d47922c3329e9f438e571bde370ecc
2020-12-28 14:28:55 -08:00
Héctor Ramos f45cb60e56 Use Fabric builds in iOS tests (#30639)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30639

# Changelog:
[Internal] Enable Fabric builds in iOS tests on Circle CI and Sandcastle.

Reviewed By: fkgozali

Differential Revision: D25700257

fbshipit-source-id: a250dbc9904efec9ded130912a993638f0992373
2020-12-23 22:26:11 -08:00
Scott Ngan defdb6d0be Add Java linting using google-java-format (#30444)
Summary:
Adds `google-java-format` linting for all `.java` files in the `ReactAndroid/` folder

- Linting requires java and is now performed on the android container
- https://github.com/google/google-java-format

## 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] [Added] - Linting for *.java files (google-java-format)

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

Test Plan: See this example PR for lint comments: https://github.com/facebook/react-native/pull/30512

Reviewed By: hramos

Differential Revision: D25253627

Pulled By: nganbread

fbshipit-source-id: e39e4411bf09a96c054afaf6c12b3d05a80f40fa
2020-12-07 03:12:35 -08:00
Janic Duplessis 053cd6b376 Make dependencies cache more reliable on CI (#30534)
Summary:
I was looking into why CI was failing and could not reproduce locally, also noticed the errors seemed to come from old version of files being used, for example a missing symbol added in a JSI commit ~1 month ago.  I noticed that we were using multiple cache keys for a lot of deps in the following format:

```
- v3-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}
- v3-pods-{{ .Environment.CIRCLE_JOB }}-
```

This means that if the cache doesn't exist for the checksum of the lockfile it will get one for any other checksum. This can lead to loading old version of files that cocoapod / yarn probably doesn't detect and keeps instead of getting the proper version. To make things worst it then caches the broken dep package after.

This removes all of these key fallbacks and use the cache only if we have a perfect match. This should make CI more reliable and fix random breaks after updating deps / pod configs.

## Changelog

[Internal] [Fixed] - Make dependencies cache more reliable on CI

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

Test Plan:
- Check that tests now pass when cache is bypassed
- Check that it still passes with cache
- Hope the issue stops happening the next time someone updates deps :)

Reviewed By: fkgozali

Differential Revision: D25326131

Pulled By: hramos

fbshipit-source-id: f21cdfca7b2456ac0edbdcce3f9eb0a828a9b977
2020-12-04 00:25:43 -08:00
Dulmandakh 9500eb8867 bump docker-android to 2.1 (#30296)
Summary:
docker-android released v2 which reduced image size.

## Changelog

[Internal] [Changed] - bump docker-android to 2.1

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

Test Plan: test_android, test_docker is green

Reviewed By: fkgozali

Differential Revision: D24686168

Pulled By: hramos

fbshipit-source-id: c240848f10f473b38a0967dd681254c21f877277
2020-11-03 16:57:39 -08:00
Mike Grabowski c95ee5ac18 feat: Enable Hermes to work on iOS (#29914)
Summary:
This PR makes it possible to build iOS applications with Hermes. Note that it doesn't work with `use_frameworks!` just yet.

Fixes https://github.com/facebook/react-native/issues/27845 (by downgrading iOS deployment target for RCT-Folly to 9.0)
Fixes https://github.com/facebook/react-native/issues/28810 (as above)

Checklist:
- [x] Adjust release scripts to create Hermes bytecode bundle
- [x] Release new Hermes npm package that includes iOS files (unreleased right now, if you want to try locally, you have to clone Hermes and `yarn link` its master to this project)
- [x] Test on a new React Native application in both Debug and Release (Device)
- [x] Test on an RNTester application in both Debug and Release (Device)
- [x] Add missing `i386` to Hermes framework and enable Bitcode
- [x] Inspect CI failures for possible regressions
- [x] Resolve Folly issue as reported https://github.com/facebook/react-native/issues/27845 and https://github.com/facebook/react-native/issues/28810
- [x] Release new Hermes and test against it that everything works

## Changelog

[IOS] [FEATURE] - Enable Hermes on iOS
[INTERNAL] - Upgrade to CocoaPods 1.10.0 to resolve Xcode 12.0 issues
[INTERNAL] - Upgrade to Xcode 12.0 on the CircleCI
[INTERNAL] - Fix building RNTester in Release mode
[INTERNAL] - Fix build-time errors of `libevent` with `use_frameworks!`
[INTERNAL] - Introduce `USE_HERMES` variable and test all RNTester configurations on the CI
[INTERNAL] - Do not fetch CocoaPods repository since we're using CDN anyway

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

Test Plan:
Turn on `hermes_enabled` to true in your `Podfile`, install pods, and run the iOS application. Your app should be running Hermes now.

Preview: (note "Engine: Hermes")

<img width="395" alt="Screenshot 2020-09-09 at 19 22 32" src="https://user-images.githubusercontent.com/2464966/92631584-d7c01d80-f2d1-11ea-9b40-33d73db96a53.png">

Reviewed By: hramos

Differential Revision: D24684845

Pulled By: cpojer

fbshipit-source-id: 900cbe3bf9398a6fd4a773d552899a001bf5146b
2020-11-03 01:14:38 -08:00
Kevin Gozali 49d41c93ad Docker android: addressing AVD launch issue (#30279)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30279

Take in the fix from https://github.com/facebook/react-native/pull/30273 + force starting adb server before launching AVD.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D24638504

fbshipit-source-id: 7a379eb1db49ab418d9d91d20b49a02bbc0bc71c
2020-10-31 12:48:54 -07:00
Héctor Ramos 864cdf3383 Stop using S3 CocoaPods Specs mirror (#30265)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30265

The CocoaPods Specs mirror provided by Circle CI is no longer supported, and is no longer necessary, as of CocoaPods v1.8. We are already using the CDN in the Podfile, so the step may be removed from the Circle CI config.

Reference: https://circleci.com/docs/2.0/testing-ios/#optimizing-cocoapods
Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24601585

fbshipit-source-id: c794102cf573e0cf47ae936bf3c1eb386e089315
2020-10-30 23:03:26 -07:00
Héctor Ramos 538446e755 Bump Xcode to 12.1.0, bump CocoaPods 1.10.0 (#30250)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30250

Upgrade the version of Xcode used in Circle CI to Xcode 12.1.0, and target iOS 14.1 in tests.

Reference:
* Circle CI Xcode 12.1 container manifest (new version):
https://circle-macos-docs.s3.amazonaws.com/image-manifest/v3985/index.html
* Circle CI Xcode 11.6.0 container manifest (previous version): https://circle-macos-docs.s3.amazonaws.com/image-manifest/v3299/index.html

> Source: https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions

The default version of CocoaPods used in the Xcode 12.1 container image has changed. Use `bundle exec` with `pod install` to ensure we use the same version of CocoaPods as prescribed in the Gemfile.

Changelog:
[iOS][Changed] - Update iOS project template for Xcode 12.1.0
[iOS][Changed] - Bump CocoaPods 1.10.0
[Internal] Bump Xcode version used for iOS tests.

Reviewed By: fkgozali

Differential Revision: D24545010

fbshipit-source-id: 4a39781352bc5a85dae55ed5cd4e1ed6043a4aeb
2020-10-30 23:03:26 -07:00
Jason Safaiyeh 4b92e2e53d Update Node version to >= 12 (#30252)
Summary:
Update engines to node >= 12

## 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] - Update node engine to version 12

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

Reviewed By: yungsters

Differential Revision: D24558093

Pulled By: fkgozali

fbshipit-source-id: 7a10bb935f89ba3374b0909161db9974e1fc477a
2020-10-29 07:40:36 -07:00
Kevin Gozali 17a8737ecb Codegen Android: update Docker configuration to support codegen (#30268)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30268

This addresses the following CI failure:
https://app.circleci.com/pipelines/github/facebook/react-native/6847/workflows/36d59aab-bc4a-4d21-9ce1-a8348e71aea3/jobs/173669

The problem was missing directories because we didn't copy the relevant ones for docker build.

In addition:
* The codegen depends on `invariant`, but didn't specify the dep in package.json. This fixes it.
* Also ask Metro to ignore buck-out

Note that this will depend on docker image v1.0.5 (to be released later) to fully build. v1.0.5 will need to install `rsync`, see this patch: https://gist.github.com/fkgozali/1d8cae92a5bc521e0f2e4f275008db93. With my test image (of 1.0.5 local build), I got the docker build to pass:

```
$ docker build -t reactnativeci/android -f .circleci/Dockerfiles/Dockerfile.android .
[+] Building 1624.2s (27/27) FINISHED
 => [internal] load build definition from Dockerfile.android                                                                                           0.0s
 => => transferring dockerfile: 52B                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                        0.0s
 => [internal] load metadata for docker.io/reactnativecommunity/react-native-android:1.0.5                                                             0.0s
 => [1/22] FROM docker.io/reactnativecommunity/react-native-android:1.0.5                                                                              0.0s
 => [internal] load build context                                                                                                                      5.6s
 => => transferring context: 7.11MB                                                                                                                    5.5s
 => CACHED [2/22] ADD .buckconfig /app/.buckconfig                                                                                                     0.0s
 => CACHED [3/22] ADD .buckjavaargs /app/.buckjavaargs                                                                                                 0.0s
 => CACHED [4/22] ADD Libraries /app/Libraries                                                                                                         0.0s
 => CACHED [5/22] ADD ReactAndroid /app/ReactAndroid                                                                                                   0.0s
 => CACHED [6/22] ADD ReactCommon /app/ReactCommon                                                                                                     0.0s
 => CACHED [7/22] ADD React /app/React                                                                                                                 0.0s
 => CACHED [8/22] ADD keystores /app/keystores                                                                                                         0.0s
 => CACHED [9/22] ADD packages/react-native-codegen /app/packages/react-native-codegen                                                                 0.0s
 => CACHED [10/22] ADD tools /app/tools                                                                                                                0.0s
 => CACHED [11/22] WORKDIR /app                                                                                                                        0.0s
 => CACHED [12/22] RUN buck fetch ReactAndroid/src/test/java/com/facebook/react/modules                                                                0.0s
 => CACHED [13/22] RUN buck fetch ReactAndroid/src/main/java/com/facebook/react                                                                        0.0s
 => CACHED [14/22] RUN buck fetch ReactAndroid/src/main/java/com/facebook/react/shell                                                                  0.0s
 => CACHED [15/22] RUN buck fetch ReactAndroid/src/test/...                                                                                            0.0s
 => CACHED [16/22] RUN buck fetch ReactAndroid/src/androidTest/...                                                                                     0.0s
 => CACHED [17/22] RUN buck build ReactAndroid/src/main/java/com/facebook/react                                                                        0.0s
 => CACHED [18/22] RUN buck build ReactAndroid/src/main/java/com/facebook/react/shell                                                                  0.0s
 => [19/22] ADD . /app                                                                                                                                28.1s
 => [20/22] RUN yarn                                                                                                                                  50.2s
 => [21/22] RUN ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog  235.8s
 => [22/22] RUN ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=1                                                                         1240.1s
 => exporting to image                                                                                                                                64.2s
 => => exporting layers                                                                                                                               64.2s
 => => writing image sha256:6449dc629ed12395c9c98d880fb421284193bc9b5d2a77578760a23b5c3c1acd                                                           0.0s
 => => naming to docker.io/reactnativeci/android
```

To test with a custom local docker image:
* https://docs.docker.com/get-started/ (install the Mac client)
* git clone https://github.com/react-native-community/docker-android
* Make the local change then create the fake v1.0.5 image:
  * `docker build --tag reactnativecommunity/react-native-android:1.0.5 .`
  * Run the image from Docker Mac client
* Then build RN docker test pasted above.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D24611539

fbshipit-source-id: 7435e720bbb2e8d6528ce2a7344f1def15803898
2020-10-28 21:48:20 -07:00
Héctor Ramos 0d1f93c317 Bump Node LTS to 14, and Node PrevLTS to 12. (#30237)
Summary:
On October 27, 2020, Node 14 will enter active LTS status, and Node 12 will enter maintenance LTS status at the end of November.

With these upcoming dates in mind, I am bumping the Circle CI NodeLTS executor to use Node 14, and the NodePrevLTS executor to use Node 12.

With these changes, Node 12 will be hereto considered the minimum supported version.

## 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
-->

[Changed] [JavaScript] - Bump minimum Node version to 12 LTS

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

Test Plan: Circle CI

Reviewed By: PeteTheHeat

Differential Revision: D24513133

Pulled By: hramos

fbshipit-source-id: 2651d954d546e5f7c9e40b54ef3ee976ad9b2d5e
2020-10-23 17:39:24 -07:00
Héctor Ramos ca00173fea Fix test_docker: Confirm envinfo package install during Docker container setup (#30235)
Summary:
With the release of Node 15 on October 20, 2020, the `nvm i node` command started installing Node 15 by default during the Docker setup step on Circle CI. This version of Node now requires user interaction down in `npx envinfo@latest` during the same step.

With these changes, we ensure we automatically accept the installation of any necessary packages.

## 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
-->

[CATEGORY] - Internal

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

Test Plan: Circle CI.

Reviewed By: fkgozali

Differential Revision: D24510043

Pulled By: hramos

fbshipit-source-id: bce72fd8ea8b0a4df501f75e48984eca0b10a090
2020-10-23 12:44:29 -07:00
Joshua Gross a17ff44adc Upgrade minsdkversion of RN OSS template to API level 21
Summary:
This diff updates the minsdkversion of RN OSS template to API level 21.

Changelog: [Android][Deprecated] Deprecate support of Android API levels 19 and 20. The new minSDK version will be 21+ moving forward.

Reviewed By: fkgozali

Differential Revision: D24379607

fbshipit-source-id: 6801cdcd363065807cdc11006bd94217f914fac7
2020-10-20 17:00:47 -07:00
simek 2160377574 remove most of tvOS remnants from the code (#29407)
Summary:
Refs: [0.62 release](https://reactnative.dev/blog/#moving-apple-tv-to-react-native-tvos), https://github.com/facebook/react-native/issues/28706, https://github.com/facebook/react-native/issues/28743, https://github.com/facebook/react-native/issues/29018

This PR removes most of the tvOS remnants in the code. Most of the changes are related to the tvOS platform removal from `.podspec` files, tvOS specific conditionals removal (Obj-C + JS) or tvOS CI/testing pipeline related code.

In addition to the changes listed above I have removed the deprecated `Platform.isTVOS` method. I'm not sure how `Platform.isTV` method is correlated with Android TV devices support which is technically not deprecated in the core so I left this method untouched for now.

## 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] [Removed]** - remove most of tvOS remnants from the code:
  * `TVEventHandler`, `TVTouchable`, `RCTTVView`, `RCTTVRemoteHandler` and `RCTTVNavigationEventEmitter`
* **[Internal] [Removed]** - remove `TARGET_TV_OS` flag and all the usages
* **[iOS] [Removed]** - remove deprecated `Platform.isTVOS` method
* **[iOS] [Removed]** - remove deprecated and TV related props from View:
  * `isTVSelectable`, `hasTVPreferredFocus` and `tvParallaxProperties`
* **[iOS] [Removed]** - remove `BackHandler` utility implementation

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

Test Plan: Local tests (and iOS CI run) do not yield any errors, but I'm not sure how the CI pipeline would react to those changes. That is the reason why this PR is being posted as Draft. Some tweaks and code adjustment could be required.

Reviewed By: PeteTheHeat

Differential Revision: D22619441

Pulled By: shergin

fbshipit-source-id: 9aaf3840c5e8bd469c2cfcfa7c5b441ef71b30b6
2020-09-28 21:26:41 -07:00
Héctor Ramos b26556125f Bump brew cache key (#29843)
Summary:
The Circle CI iOS jobs are failing when installing Watchman:

```
#!/bin/bash --login -eo pipefail
HOMEBREW_NO_AUTO_UPDATE=1 brew install watchman >/dev/null
Error: The `brew link` step did not complete successfully

Exited with code exit status 1
CircleCI received exit code 1
```

The commit associated with the job where this issue first appeared did not make any changes to Watchman, but it did change the VM used by Circle CI for these jobs. Flushing the homebrew cache might help.

## 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]

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

Test Plan: Run on Circle CI. Watchman install step succeeded: https://circleci.com/gh/facebook/react-native/166160?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

Reviewed By: fkgozali

Differential Revision: D23495409

Pulled By: hramos

fbshipit-source-id: 56a68bba3afc1350d4fc409d65f9229e3f38f467
2020-09-03 09:32:28 -07:00
Héctor Ramos 5fdb558104 Use Xcode 11.6.0 and CocoaPods 1.9.3 (#28837)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/28837

CocoaPods 1.9.3 is the version that is distributed by Circle CI to macOS machines alongside Xcode 11.6.0.

The upgrade to CocoaPods and Xcode is therefore tightly coupled due to our dependency on Circle for our open source CI.

With the upgrade to Xcode 11.6.0, we also bump our target OS to ensure iOS tests use an iOS Simulator that is part of the image.

Reference:
* Circle CI macOS Xcode 11.6.0 image manifest (new version): https://circle-macos-docs.s3.amazonaws.com/image-manifest/v3299/index.html
* Circle CI macOS Xcode 11.3.1 image manifest (previous version): https://circle-macos-docs.s3.amazonaws.com/image-manifest/v2244/index.html

> Source: https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions

Changelog:
[Internal] Bump Xcode version used for iOS tests.

Reviewed By: fkgozali

Differential Revision: D21415049

fbshipit-source-id: 7a5532e69cfef25999a5b31a09d844f48be9827c
2020-09-02 14:27:48 -07:00
stealthanthrax 63992c0b96 Migrating RNTester to Packages Directory (#29567)
Summary:
## 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
-->
This PR aims to migrate the RNTester App to `packages` directory. But is currently, open to inspect the CI issues and resolve the merge conflicts.

Currently done
 - Working on iOS
 - Working on Android
 - Detox Tests working on iOS

Need to work on
 - Errors generated by the CI builds

[General] [Changed] - Migrated the RNTester App to the packages directory.

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

Test Plan: It runs on both ios and android for now and the detox iOS builds are working.

Reviewed By: cpojer

Differential Revision: D23034761

Pulled By: rickhanlonii

fbshipit-source-id: e04bb06e1c7ef15d340206090d1575a871b9e6f5
2020-08-19 17:57:08 -07:00
Joshua Selbo 3094210bfe Fix test_android CI (#29509)
Summary: Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D22780016

fbshipit-source-id: 342465886748d379741e60181aafc68d46a169ee
2020-07-28 12:38:32 -07:00
Frieder Bluemle e629e94b46 Update Android build tools to 29.0.3 (#29350)
Summary:
A small patch update of the Android build tools from 29.0.2 to 29.0.3. It's the default for newly generated Android projects.

## Changelog

[Android] [Changed] - Update Android build tools to 29.0.3

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

Test Plan: Build project

Reviewed By: JoshuaGross

Differential Revision: D22521075

Pulled By: mdvacca

fbshipit-source-id: 967bbfc6e45c6457d4867282ba311f86dea96208
2020-07-16 12:07:36 -07:00
Héctor Ramos 120ff7ccde Disable Detox tests on Circle CI (#29329)
Summary:
Disabling Detox tests on Circle CI as the `test_ios_detox*` tests have been broken for a while.

Changelog:
[Internal]

Test Plan: Verified these no longer trigger on Circle CI

Reviewed By: cpojer

Differential Revision: D22476861

Pulled By: hramos

fbshipit-source-id: 3d46786cd7d088d363409e4d35a327e3e997a227
2020-07-10 07:15:29 -07:00
Christoph Nakazawa 6d6c68c2c6 "The Metro Server" -> Metro
Summary:
Pet Peeve: Metro is a brand name. You don't say "the Metro server" just like you don't say "the iPhone phone". This is a leftover from when it used to be called "the packager server".

Note: It makes sense to refer to "the Metro server" when talking about it in the context of Metro's features, like if you are discussing "Metro's bundling" and "Metro's server". However, when talking about the tool itself, just Metro is enough.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D22330966

fbshipit-source-id: 667618363c641884df543d88cac65d1e44956ad3
2020-07-02 14:51:18 -07:00
Héctor Ramos 25836bc239 Upgrade tests to Xcode 11.3.1 (#28498)
Summary:
Upgrade Sandcastle and Circle CI tests to use Xcode 11.3.1 across the board.

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

Changelog:
[Internal] - Use Xcode 11.3.1 in iOS tests

Reviewed By: fkgozali

Differential Revision: D20821844

fbshipit-source-id: b250ca82bdf2c9fb7faa765d3e2433eb46efd692
2020-04-03 11:56:21 -07:00
Héctor Ramos 23d0e7cae9 Circle CI Housekeeping: Windows, e2e (#28471)
Summary:
Circle CI Housekeeping:
* Integrate Windows job into `tests` workflow
* Add parametrized e2e tests command
* Move js e2e tests out of the disabled test quarantine area
* Parametrize and split `test_ios` job to reduce total execution time by ~13 minutes

**Before:**

Longest running iOS job at 39 minutes.

| Setup Job Runtime | Job | Job Runtime | Total Runtime |
| - | - | - | - |
| 01:24 | test_ios | 38:04 | **39:28** |
| 01:24 | test_ios_frameworks | 38:02 | 39:26 |

![Screen Shot 2020-03-31 at 12 40 29 PM](https://user-images.githubusercontent.com/165856/78068308-044c3280-734d-11ea-96bf-2e50691a0ef7.png)

**After:**

Longest running iOS job down to 26 minutes.

| Setup Job Runtime | Job | Job Runtime | Total Runtime |
| - | - | - | - |
| 01:26 | test_ios_unit | 20:48 | 22:14 |
| 01:26 | test_ios_unit_frameworks | 22:52 | 24:18 |
| 01:26 | test_ios_detox | 24:35 | 39:28 |
| 01:26 | test_ios_detox_frameworks | 24:54 | **26:20** |

![Screen Shot 2020-03-31 at 12 39 22 PM](https://user-images.githubusercontent.com/165856/78068294-fe565180-734c-11ea-96da-8836231d7747.png)

## Changelog

[Internal] [CI] - CI Housekeeping
Pull Request resolved: https://github.com/facebook/react-native/pull/28471

Test Plan: Circle CI

Reviewed By: cpojer

Differential Revision: D20774521

Pulled By: hramos

fbshipit-source-id: 4a2f5a4083cd76dcb51d5ccaf726cd204fca222e
2020-03-31 17:39:20 -07:00
Jesse Katsumata 7007df6198 feat: migrate appveyor to circleci (#28245)
Summary:
This issue closes https://github.com/facebook/react-native/issues/28241
Migrated Windows test from AppVeyor to CircleCI

## Changelog

[Internal] [Changed] - Migrated Windows test from AppVeyor to CircleCI
Pull Request resolved: https://github.com/facebook/react-native/pull/28245

Test Plan: For CircleCI to Pass

Reviewed By: cpojer

Differential Revision: D20689163

Pulled By: hramos

fbshipit-source-id: 285c762457ef00f7884ee9157b3f336044c0452f
2020-03-30 07:24:57 -07:00
Héctor Ramos 8ac00b3ef8 Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.

Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.

What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument

## Changelog

[Internal] [CI] -  Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392

Test Plan: Verified on Circle CI

Reviewed By: cpojer

Differential Revision: D20665512

Pulled By: hramos

fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 06:52:43 -07:00
Eloy Durán 14b423e969 Seed ssh known hosts with github's public key (#28370)
Summary:
The [previous attempt](https://github.com/facebook/react-native/pull/28304) to fix the publish step failed, so now reverting to manually configuring things. This PR adds an entry to SSH’s `known_hosts` file using github.com’s public key that I have verified as per [these instructions](https://serverfault.com/a/807363):

```
~/C/R/react-native [master] » nmap github.com --script ssh-hostkey
Nmap scan report for github.com (140.82.118.4)
rDNS record for 140.82.118.4: lb-140-82-118-4-ams.github.com
PORT     STATE SERVICE
22/tcp   open  ssh
| ssh-hostkey:
|   1024 ad:1c:08:a4:40:e3:6f:9c:f5:66:26:5d:4b:33:5d:8c (DSA)
|_  2048 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48 (RSA)
```

These fingerprints line up with [the ones posted by GitHub](https://help.github.com/en/github/authenticating-to-github/githubs-ssh-key-fingerprints), so my setup should be good and can be trusted to grab the public key from the right host:

```
~/C/R/react-native [master] » ssh-keyscan -t rsa -H github.com
# github.com:22 SSH-2.0-babeld-d48c3acd
|1|If6MU203eXTaaWL678YEfWkVMrw=|kqLeIAyTy8pzpj8x8Ae4Fr8Mtlc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
```

## Changelog

[Internal] [Fixed] - Make automated publishing of packages from CI work again
Pull Request resolved: https://github.com/facebook/react-native/pull/28370

Test Plan: I used the command being added in this PR in [a failed CI job](https://app.circleci.com/pipelines/github/facebook/react-native/4104/workflows/916127cb-177f-4583-9f90-cae5318041d8/jobs/140810). When I invoked the publish script manually I was not greeted by the blocking prompt and the package was successfully published: https://www.npmjs.com/package/react-native/v/0.0.0-56cf99a96

Reviewed By: cpojer

Differential Revision: D20601527

Pulled By: hramos

fbshipit-source-id: b1a4405228408cfc4a1b3b44ab88c79522af3a66
2020-03-24 11:08:49 -07:00
Sam Mathias Weggersen f2ffa03139 Change nightly build from hourly to nightly (daily at 00:00) (#28346)
Summary:
We initially added the nightly build test to run every hour, in order to more quickly validate it. Now that it has been validated we can run it every night as it is intended to do.

cc hramos

## Changelog

[General] [Changed] - Change nightly build from hourly to nightly
Pull Request resolved: https://github.com/facebook/react-native/pull/28346

Reviewed By: cpojer

Differential Revision: D20550143

Pulled By: hramos

fbshipit-source-id: 9487c6785684ad6ea7e877290d50a33118090a7f
2020-03-20 00:33:38 -07:00
Eloy Durán 79490d91ad Seed ssh-agent with github's fingerprint (#28304)
Summary:
Fixes https://github.com/facebook/react-native/issues/28295

Currently [the publish job](https://circleci.com/gh/facebook/react-native/138343) fails with:

```
The authenticity of host 'github.com (192.30.253.113)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)?
```

As per the [CircleCI docs](https://support.circleci.com/hc/en-us/articles/115015628247-Are-you-sure-you-want-to-continue-connecting-yes-no-), I’ve added a step to seed the ssh-agent with [github’s SHA256 RSA fingerprint](https://help.github.com/en/github/authenticating-to-github/githubs-ssh-key-fingerprints).

## Changelog

[Internal] [Fixed] - Make automated publishing of packages from CI work again
Pull Request resolved: https://github.com/facebook/react-native/pull/28304

Test Plan: We’ll have to see during the next round of releasing.

Reviewed By: cpojer

Differential Revision: D20490766

Pulled By: hramos

fbshipit-source-id: 9edfebb24226e7324855e5cb9c83875729492219
2020-03-17 09:42:34 -07:00
Héctor Ramos 07def55396 fbshipit-source-id: da15f69185e724eaf7d4bc78dbc61fcdcb3074d5 2020-03-13 21:46:45 -07:00
Tommy Nguyen 88fe05e8f1 iOS: Install Node 10 as 8 got dropped (#28199)
Summary:
We recently bumped our engine requirement in https://github.com/facebook/react-native/issues/28174 but are still installing an older Node version.

## Changelog

[Internal] [Fixed] - Install Node 10 as is required for `test_ios_e2e`
Pull Request resolved: https://github.com/facebook/react-native/pull/28199

Test Plan: `test_ios_e2e` should start building again.

Reviewed By: cpojer

Differential Revision: D20170498

Pulled By: hramos

fbshipit-source-id: 59822c50d38307f69824721db36a2c45185dd248
2020-02-29 07:27:41 -08:00
Sam Mathias Weggersen 7d2daa0a6d Add nightly build (#28066)
Summary:
Note: I'm currently testing this, so do not review just yet.

Adding a nightly CI build in preparation for further work on [React Native: Benchmark Suite](https://github.com/react-native-community/discussions-and-proposals/issues/186.)

Currently it will only run the job `nightly_job` which will simply run `$ echo "Nightly build run"`. The plan is to do nightly checks and performance status on the React Native repo, and create a dashboard where we can see performance changes over time. More on this in the proposal: [React Native: Benchmark Suite](https://github.com/react-native-community/discussions-and-proposals/issues/186.)

## Changelog

[General] [Added] - Add nightly CI build
Pull Request resolved: https://github.com/facebook/react-native/pull/28066

Test Plan: Individual jobs will have their own test plan.

Reviewed By: sebmck

Differential Revision: D20008434

Pulled By: hramos

fbshipit-source-id: a5e8aad616c28bfad8f3455b5ebadf7a7d174a55
2020-02-26 18:10:03 -08:00
Héctor Ramos 36111700f4 Use LTS and LTS-1 Node versions (#28048)
Summary:
Previous config used Node10 and NodeLTS executors, but the naming wasn't accurate. As of today, Node 12 is LTS, Node 10 is also LTS but entering maintenance in April: https://nodejs.org/en/about/releases/

This PR switches all jobs to use Node 12 as nodelts, and renames test_js_lts to test_js_prevlts to reflect it's use of Node 10 (the previous Node LTS release). The executors are named NodeLTS and NodeLTSPrev. Later this year, we can switch these to use Node 14 and Node 12 as Node 10 goes into maintenance.

## Changelog

[Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/28048

Test Plan: Circle CI

Reviewed By: TheSavior

Differential Revision: D19887240

Pulled By: hramos

fbshipit-source-id: a8d553dca0f47a5ab6132a3880830a60a1b28736
2020-02-13 23:14:05 -08:00
Tommy Nguyen 1b562929dc Report size of app bundles on PRs (#28041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/28041

Report size of app bundles on PRs. See [React Native Benchmark Suite](https://github.com/react-native-community/discussions-and-proposals/issues/186) for further discussion.

## Changelog

[Internal] [Added] - Report size of app bundles on PRs
Pull Request resolved: https://github.com/facebook/react-native/pull/28019

Test Plan: PRs should start seeing comments from a bot with app bundle sizes, given that they got built successfully.

Reviewed By: cpojer

Differential Revision: D19859187

Pulled By: hramos

fbshipit-source-id: 3920dc60e6fd073928388e6ae52fc2ba1bc745ac
2020-02-12 22:21:00 -08:00
David Vacca edcbfb9821 Bump Android build-tools to 29.0.2, compileSdk to 29
Summary:
bump Android build-tools to 29.0.2, compileSdk to 29

changelog: Bump Android build-tools to 29.0.2, compileSdk to 29

Reviewed By: hramos

Differential Revision: D19182040

fbshipit-source-id: f2fc1b953a16c14e33d561078ac50b5a47eaaa13
2020-01-22 17:02:36 -08:00
Héctor Ramos e69ce88ef6 Use Xcode 11.3.0 and iOS 13.3 in tests (#27783)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/27783

Use Xcode 11.3.0 to run tests, using an iPhone 8 simulator running iOS 13.3.

Snapshot tests disabled as they're failing on Circle CI.

Changelog:
[iOS] [Changed] - Use Xcode 11.3 and iOS 13.3 simulator in iOS tests

Reviewed By: PeteTheHeat

Differential Revision: D19411972

fbshipit-source-id: 3ddef9e6fbdbd3c35271732fc6d6d74de099230e
2020-01-17 16:42:56 -08:00
Héctor Ramos ace68f03e8 Use correct location for buck_to_junit (#27766)
Summary:
`test_android`'s Test Collection step fails when it attempts to convert buck's output to the junit-compatible format that Circle CI expects. Executing the script from the `okbuck` location should help here.

## Changelog

[Internal] - Use correct location for buck_to_junit in test_android CI step
Pull Request resolved: https://github.com/facebook/react-native/pull/27766

Test Plan: Circle CI

Differential Revision: D19403837

Pulled By: hramos

fbshipit-source-id: 44e599ab653e7412340c3dcfdc45c5d37bcea1ee
2020-01-14 18:23:48 -08:00
Héctor Ramos 05f1bb3dd4 Bump Homebrew cache key (#27764)
Summary:
Trivial: bump Circle CI Homebrew cache key to move past cache error in CI builds.

Changelog:
[Internal] - Bump Homebrew cache key on Circle CI

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

Differential Revision: D19401723

Pulled By: hramos

fbshipit-source-id: cec18ea68ac141ab85ad694ac261d98cbf0e4440
2020-01-14 16:36:29 -08:00
Héctor Ramos 9fb2ca0b53 Bump Xcode to 11.2.1 (#27434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/27434
Pull Request resolved: https://github.com/facebook/react-native/pull/27295

- Use Xcode version 11.2.1 in both internal and external tests.
- Update snapshot reference images to use iPhone 8 test device.

Xcode 11.3.0 will be available in Sandcastle in the next week or so.

Changelog:

[Internal] - Bump Xcode version used in tests to 11.2.1.
[Internal] - Update iOS Snapshots.

Reviewed By: cs01

Differential Revision: D18849584

fbshipit-source-id: 9e3b92f080a4dc6a15dac0535b7562ff6a5c08a9
2020-01-14 13:30:05 -08:00
Héctor Ramos d07b16488b Generate test results in a discoverable location (#27435)
Summary:
Test results were being written to ~/reports/, while Circle CI was configured to look for these in ~/react-native/reports/.

This simple fix makes it so that Circle CI's test result tab can now display line-by-line results without the need to dig through log spew to understand which tests failed.

## Changelog

[Internal] [Fixed] - Generate test results in discoverable location (CI)
Pull Request resolved: https://github.com/facebook/react-native/pull/27435

Test Plan:
See https://app.circleci.com/jobs/github/hramos/react-native/7112/tests
Compare with any other run, where this tab would show an error message due to lack of test results.

Differential Revision: D19185408

Pulled By: hramos

fbshipit-source-id: 5481a13874bd078deba4a58ddb83dfdfe6845151
2019-12-19 16:56:01 -08:00
Héctor Ramos 62a079ed12 Ignore js_coverage failures (#27488)
Summary:
The js_coverage step has failed on some recent PRs. While we want to continue collecting coverage data, we are not rejecting PRs that decrease coverage at the moment. Failing a PR in this step sends the wrong message, therefore, we should ignore whenever js_coverage fails.

> The actual coverage failures appear to be issues related to coveralls (the coverage service) failing to map the coverage data to a specific repository, not necessarily due to a decrease in coverage.

## Changelog

[Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/27488

Test Plan: CircleCI.

Differential Revision: D18962339

Pulled By: hramos

fbshipit-source-id: 46cbe32c70ecc01324a703073f390dad0de562f4
2019-12-12 12:21:01 -08:00
Héctor Ramos 7e6fae2a20 Fix test-ios by bumping Xcode version (#27356)
Summary:
iOS tests have been failing due to iOS 12.4 not being supported by Xcode 10.2.1. Bumping to 10.3 solves it.

Ideally, we'd bump to Xcode 11.2.1 and iOS 13.2.2. We can do this once all of our internal CI machines have Xcode 11.2.1 available.

## Changelog

[iOS] [Fixed] - Fix CI iOS tests by bumping Xcode version used in Circle CI
Pull Request resolved: https://github.com/facebook/react-native/pull/27356

Test Plan: Circle

Differential Revision: D18765501

Pulled By: hramos

fbshipit-source-id: 1a1ca78c5d8f8596476b0e56740ea1bdf7422161
2019-12-02 10:49:37 -08:00
Héctor Ramos 9bfb48e70d Bump Yarn cache key and fix JavaScript tests (#27343)
Summary:
Trivial - bumping the cache key used by yarn should help unblock the JS test failures on master.

Changelog:
[General] [Fixed] - Bump Yarn cache key in Circle CI config to address JS test failures

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

Differential Revision: D18717521

Pulled By: hramos

fbshipit-source-id: f241a6da410881c8c50c42993338f6ca4b6dc4f2
2019-11-27 07:48:40 -08:00
Andres Suarez aee88b6843 Tidy up license headers [3/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952693

fbshipit-source-id: 8fcb8e58a2e04e7a3169f4d525bffc00835768e6
2019-10-16 10:06:34 -07:00
Mike Grabowski 16d8802b22 Update CircleCI config as per support request (#26329)
Summary:
This is a cherry-pick of the fix on 0.61-stable that fixes an issue with CircleCI.
fafc58b62d
Pull Request resolved: https://github.com/facebook/react-native/pull/26329

Differential Revision: D17258952

Pulled By: cpojer

fbshipit-source-id: 5116a143b582ab4835d7a53f4037a7b7e749f3a8
2019-09-09 06:42:29 -07:00
gengjiawen 60601f541c update react native docker (#26325)
Summary:
upgrade docker, this brings NDK 20 and buck 2019.09.03.01.

## Changelog

[Android] [CI] - update react native docker
Pull Request resolved: https://github.com/facebook/react-native/pull/26325

Test Plan: Pass basic build

Differential Revision: D17234774

Pulled By: mdvacca

fbshipit-source-id: 40bfe3cbcb406dca5c1c0021720355a1bab2db8a
2019-09-06 13:54:54 -07:00
James Treanor bbde55ee11 Test RNTesterPods on CI with use_frameworks! enabled (#25818)
Summary:
This adds a `test_ios_frameworks` job to CircleCI to test the `RNTesterPods` project with `use_frameworks!` enabled. It will ensure the issue in https://github.com/facebook/react-native/issues/25349 is not reintroduced as suggested in https://github.com/facebook/react-native/pull/25619#issuecomment-514380653.

## Changelog

[iOS] [Internal] - Added CircleCI job for testing `RNTesterPods` with `use_frameworks!` enabled.
Pull Request resolved: https://github.com/facebook/react-native/pull/25818

Test Plan: Tests seem to be failing on `master` at the moment but you can see that the new job builds successfully [here](https://circleci.com/gh/facebook/react-native/103929?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link). You can confirm it installs the pods with `use_frameworks!` by seeing that `Installing pods with use_frameworks!` is at the start of the log for the `Generate RNTesterPods Workspace` step.

Reviewed By: hramos

Differential Revision: D16495016

Pulled By: fkgozali

fbshipit-source-id: 8ef607cc3a152f599d226f9f45d990fba50a65d4
2019-07-25 11:46:44 -07:00
Héctor Ramos 970101e1c6 Test collection step should succeed even if unit tests fail (#25621)
Summary:
This is a quick change to avoid having "Collect Test Results" fail on `test_android` when unit tests have not run. If the raw Buck results are not available, avoid running the buck-to-junit conversion tool.

You can find an example of the situation we want to avoid here: https://circleci.com/gh/facebook/react-native/101397?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

## Changelog

[Internal] [Changed] - Do not fail test collection step when unit tests fail
Pull Request resolved: https://github.com/facebook/react-native/pull/25621

Test Plan:
Verified on macOS + bash, the conditional will fail if all-results-raw.xml does not exist.

Circle CI:

The `test_android` job as a whole failed (as expected, master is broken), but Collect Test Results remained green even in the absence of a Buck results file.

https://pxl.cl/Fbjl

Reviewed By: fkgozali

Differential Revision: D16230885

Pulled By: hramos

fbshipit-source-id: 73a8290bc4679f2e0dfa88d1e7f71fed279c2104
2019-07-12 16:12:33 -07:00
Kevin Gozali 79a7828b91 deprecate iOS .xcodeproj (#25583)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/25583

We now use CocoaPods for better maintainability.

Reviewed By: hramos

Differential Revision: D16193719

fbshipit-source-id: 26382f2da4eaba14a71771540b587fdc80b41108
2019-07-11 12:02:39 -07:00
Héctor Ramos 9ece5bda9b Use CocoaPods-based RNTesterPods for iOS tests (#25416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/25416

Use CocoaPods-based RNTesterPods workspace to run iOS unit tests and integration tests.

This is necessary as new iOS projects now use CocoaPods by default. CocoaPods also powers the new package auto-linking feature.

In order to provide test coverage for this new default configuration, our iOS tests are being migrated to use a CocoaPods-managed RNTester workspace. This applies to both Circle CI, and Sandcastle.

Changelog:

[iOS] [Changed] - Use RNTesterPods for iOS Tests

Reviewed By: fkgozali

Differential Revision: D16052466

fbshipit-source-id: 724b0c51008882d3c06a9074693fe23e74abe86b
2019-06-28 19:18:10 -07:00
Daryl Johnas Sison 64282fd5b9 Revert D15958209: [RN] [RNTesterPods 5] Use CocoaPods-based RNTesterPods for iOS tests
Differential Revision:
D15958209

Original commit changeset: b51fb907812c

fbshipit-source-id: f0c499d8720ac91d5933c560281788e123269478
2019-06-28 00:57:57 -07:00
Héctor Ramos 39ab66793b Use CocoaPods-based RNTesterPods for iOS tests (#25416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/25416

Use CocoaPods-based RNTesterPods workspace to run iOS unit tests and integration tests.

This is necessary as new iOS projects now use CocoaPods by default. CocoaPods also powers the new package auto-linking feature.

In order to provide test coverage for this new default configuration, our iOS tests are being migrated to use a CocoaPods-managed RNTester workspace. This applies to both Circle CI, and Sandcastle.

Reviewed By: fkgozali

Differential Revision: D15958209

fbshipit-source-id: b51fb907812cb2d4d78cce445d39bc253ae5acf8
2019-06-27 23:57:45 -07:00
Michał Pierzchała 488a91bdc4 WIP: install watchman in e2e tests (#25257)
Summary:
An attempt to fix CI.
This PR includes changes from https://github.com/facebook/react-native/pull/25241, to be removed once synced to master

## Changelog

[General] [Fix] - install watchman in e2e tests to fix CI
Pull Request resolved: https://github.com/facebook/react-native/pull/25257

Differential Revision: D15804513

Pulled By: cpojer

fbshipit-source-id: 33d4494ffaa340f99f1dae8764449e81e552c943
2019-06-13 15:46:36 -07:00
Dulmandakh 146d1f7578 Bump Android NDK to r19c (#25140)
Summary:
In 2019-6-4 version of Docker Android image, we've added Android NDK r19c. So this PR will change CI to use NDK r19c.

I'll create a PR to website once this merged.

Note: I tried to build RN with NDK 19 while I was setting up my laptop after format, and it worked.

## Changelog

[Android] [Changed] - Bump Android NDK to r19c
Pull Request resolved: https://github.com/facebook/react-native/pull/25140

Differential Revision: D15631301

Pulled By: cpojer

fbshipit-source-id: b9a5600df1dadeba328932b694493960b242c2f7
2019-06-04 13:59:36 -07:00
Héctor Ramos 4a6676dc18 Cache CocoaPods specs-repo (#25095)
Summary:
The `test_end_to_end` job has been timing out due CocoaPods taking too long to check out the Specs repo. This repo is stored at `~/.cocoapods`, therefore by caching this folder we can keep the individual e2e test run from exceeding 10 minutes w/o output.

## Changelog

[Internal] [Added] - Cache CocoaPods
Pull Request resolved: https://github.com/facebook/react-native/pull/25095

Differential Revision: D15587702

Pulled By: hramos

fbshipit-source-id: 6669ff09a5021f012ac8a829db70442d8f7f07e8
2019-05-31 16:50:15 -07:00
Héctor Ramos 171cc0edb7 Migrate to Circle CI 2.1 (#25036)
Summary:
Migrate the Circle CI configuration to the 2.1 schema and take advantage of new config reuse features.

I've enabled pipelines in the facebook/react-native Circle CI project, a requirement for Circle CI 2.1 features.

### Overview

* Use executors to provide a common set of execution environments.
* Use commands to provide reusable steps (running yarn with cache, installing Android dependencies, ...)
* Use parametrized commands/jobs to reuse job definitions for `test_js` and `test_js_lts` where the only difference is the version of node provided by the environment.
* Reduce total execution time by [storing the git repo in a cache as opposed to using workspaces](https://circleci.com/blog/persisting-data-in-workflows-when-to-use-caching-artifacts-and-workspaces/)
* Fix various flaky end-to-end test failures related to CocoaPods and the CLI.
* Move `analyze` job to `analysis` workflow and rename to `analyze_pr`
* Rename `test_javascript` as `test_js`.
* Split up end-to-end test job into `test_ios_e2e` and `test_js_e2e`.

## Changelog

[Internal] [Changed] - Migrate to Circle CI 2.1 and fix e2e tests
Pull Request resolved: https://github.com/facebook/react-native/pull/25036

Differential Revision: D15565515

Pulled By: hramos

fbshipit-source-id: cfba2154a9fdc96400cbf778bd5d13e9411ee3f8
2019-05-30 15:11:13 -07:00
Héctor Ramos 9c3f4c021e Bots cleanup, avoid leaving inline reviews when N>5 (#24923)
Summary:
This PR cleans up some of our GitHub bots. The overall goal is to make the contribution process just a tad nicer.

### analysis-bot

* The bot will continue leaving GitHub Reviews when it finds lint issues, but will abstain from leaving inline comments if they would exceed 5 in number.
* The review comment left by the bot has instructions on how to reproduce the lint issues locally. This will educate PR authors on how to run lint and fix the issues without unnecessarily spamming the PR with 50+ comments, while still providing useful reviews to authors when only a handful of lint issues slip by.
* Code moved to `bots/` directory for ease of discovery and co-location with pull-bot.
* Added `yarn lint-ci` command. This seems like the right choice: it's running `yarn lint` and other linters, and it is only intended to run on CI.
* It's still possible to run `yarn lint-ci` locally, though the script will stop short of posting a review to GitHub unless the necessary envvars are provided.
* Added `yarn shellcheck` command. This can be run locally, though it requires `shellcheck` to be installed.
* Outside of this PR, I added instructions on using shellcheck to https://github.com/facebook/react-native/wiki/Development-Dependencies
* Updated Circle CI config to use these new commands, and streamlined the `analyze_pr` step.
* Documented analysis-bot in `bots/README.md`.

### pull-bot

* Bumped `danger-js` dependency. No breaking changes found in this minor bump from what I can tell.
* Documented pull-bot in `bots/README.md`.

### misc

* PR template: don't use jargon.

## Changelog

[Internal] [Changed] - GitHub Bots cleanup
Pull Request resolved: https://github.com/facebook/react-native/pull/24923

Differential Revision: D15399744

Pulled By: hramos

fbshipit-source-id: 32632e775f8554424072270e3f98542de84bfb8c
2019-05-21 19:38:54 -07:00
nossbigg 30a0a03b80 Fix ios/android e2e tests (#24974)
Summary:
Fixes broken ios/android e2e tests for CI.

Changes:
1. Use `npm pack` instead of `yarn pack` during e2e test
2. Update test string assertions in ios/android e2e tests
3. Use `Step One` as candidate for source code replacement to test for page changes (since the "Welcome to React Native" string exists in the `Header` component instead of being on `App.js`)

## Changelog

[Internal] [Fixed] - Fix ios/android e2e tests
Pull Request resolved: https://github.com/facebook/react-native/pull/24974

Differential Revision: D15431539

Pulled By: cpojer

fbshipit-source-id: 054af2c2fff6bbdb2263c15d7f5cd416aaa507fd
2019-05-21 05:44:29 -07:00
Héctor Ramos 9785a572ee Disable iOS end-to-end tests (#24962)
Summary:
The iOS end-to-end tests are currently broken. I'm disabling them to bring the tests back to green and unblock other PRs, until they can be fixed.

## Changelog

[Internal] [Removed] - Disable iOS e2e test
Pull Request resolved: https://github.com/facebook/react-native/pull/24962

Differential Revision: D15415872

Pulled By: hramos

fbshipit-source-id: 1a146a2eb36d5bf9b4e1f8cc9daf9b3e4d0cfab1
2019-05-20 10:24:11 -07:00