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

223 Коммитов

Автор SHA1 Сообщение Дата
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