Summary:
I'm moving nightlies from scheduled workflow to scheduled pipeline.
We're not able to manually retrigger nightlies as they're a scheduled workflow and don't expose a parameter. Here I'm cleaning it up.
Plus I'm:
1. Removing the `main_only` reference which is unused
2. Setting up the `run_release_workflow` and `run_nightly_workflow` parameters.
## Changelog
[INTERNAL] - Migrate nightly from scheduled workflow to scheduled pipeline
Pull Request resolved: https://github.com/facebook/react-native/pull/35977
Test Plan: Will wait for CI results.
Reviewed By: cipolleschi
Differential Revision: D42776969
Pulled By: cortinico
fbshipit-source-id: d4ef9654d23cb91f85ce2b38e75e27dc0c575e95
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35857
It seems like there is an incompatibility between NDK 23 (shipped in 0.71)
and the usage of custom `CMAKE_BUILD_TYPE` we do for Hermes.
Specifically the `-DCMAKE_BUILD_TYPE=Release` we specify for the debug
variant of Hermes is partially ignored by the new Android native build toolchain.
See https://github.com/android/ndk/issues/463 for mentions on how the
toolchains requires CMake 3.20+
As AGP 7.3 defaults to use CMake 3.18 unless specified, and NDK 23 unless specified.
AGP 7.4 defaults to use CMake 3.22 unless specified, and NDK 23 unless specified.
See: https://developer.android.com/studio/releases/gradle-plugin#7-4-0
Here I'm:
1. Bumping the docker image to an image that contains the CMake 3.22
2. Updating the logic for building `react-native` & `hermes-engine` to use 3.22
3. Provide fallbacks if the user specified `CMAKE_VERSION`
Template tests will run on AGP 7.3 and will still use CMake 3.18, but I forecast
no problem there as the user is not supposed to specify custom `CMAKE_BUILD_TYPE`.
This is only a problem as we build `hermes-engine` with custom build types.
Changelog:
[Android] [Fixed] - Bump CMake to 3.22.1 to properly honor CMAKE_BUILD_TYPE
Reviewed By: cipolleschi
Differential Revision: D42544864
fbshipit-source-id: efd0f51120370fb808337c201df31d71f4ddfdbc
Summary:
Update the CircleCI configuration to use the proper `exclude` parameter of matrix rather then bootstrap a machine and then kill it.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
## Changelog
[Internal] - Use the `exclude` parameter of matrices to avoid spinning up unnecessary machines
Pull Request resolved: https://github.com/facebook/react-native/pull/35794
Test Plan: The number of jobs on CircleCI should decrease.
Reviewed By: dmytrorykun
Differential Revision: D42475445
Pulled By: cipolleschi
fbshipit-source-id: 3d733ac459a3bc9747440a62cb2caecb7a235fec
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35767
Changelog: [Internal]
Introducing a script, which can be used to identify all packages inside `/packages`, which contain any changes after the last time its version was changed
How it works step by step:
```
check that no git changes are present
for each package:
if package is private -> skip
grep id of the last commit that changed package
grep id of the last commit that changed version of the package
if these ids are different:
bump package patch version
commit changes if required
```
Can be executed only in git environment and by running: `node ./scripts/bump-all-updated-packages`
---
Also adding a separate script `align-package-versions.js`, which can be used to update versions of packages inside consumer packages
```
check that no git changes are present
for each package x:
for each package y:
if y has x as dependency:
validate that y uses the latest version of x
if some changes were made:
run yarn
```
---
Q: Why `run_yarn` step was removed from CircleCI flow?
A: For *-stable branches, there are no yarn workspaces and all packages are specified as direct dependencies, so if we update `react-native/assets-registry` to the next version, we won't be able to run `yarn` for react-native root package, because updated version is not yet published to npm
To avoid this, we first need publish new versions and then update them in consumer packages
---
The final flow:
1. Developer uses `node ./scripts/bump-all-updated-packages` to bump versions of all updated packages.
2. Commit created from step 1 being merged or directly pushed to `main` or `*-stable` branches
3. A workflow from CircleCI publishes all updated versions to npm
4. Developer can use `align-package-versions.js` script to create required changes to align all packages versions
Reviewed By: cortinico
Differential Revision: D42295344
fbshipit-source-id: 54b667adb3ee5f28d19ee9c7991570451549aac2
Summary:
Removing a stale configuration that was configuring username/password before publishing to NPM. This is effectively unused + the Github Token there is invalid therefore can be removed.
## Changelog
[INTERNAL] - Remove unused .netrc file from CircleCI
Pull Request resolved: https://github.com/facebook/react-native/pull/35785
Test Plan: n/a
Reviewed By: cipolleschi
Differential Revision: D42385163
Pulled By: cortinico
fbshipit-source-id: 0dbbf44459d59f792da4221d6100800a2f4efda2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35709
This change refactors the logic to choose which version of hermes we have to pick
## Changelog:
[iOS][Changed] - Refactor hermes choosing logic
Reviewed By: cortinico, dmytrorykun
Differential Revision: D42211405
fbshipit-source-id: d19c0f2c523c5596d18a1f904e3b26d96ea1a77a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35633
Changelog: [Internal]
These changes add usage of `forEachPackage` as a replacement for `yarn --json workspaces info`.
This is because at some point in release cycle there is a script which removed `workspaces` block from react-native's `package.json`, so `yarn --info workspaces info` produces an error
Reviewed By: cortinico
Differential Revision: D41996732
fbshipit-source-id: 2c62c1a5eb41d711c563f9f7b0de3d67fc11823d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35621
Changelog: [Internal]
1. Added `for-each-package.js` script. This can be used to iterate through all of the packages inside `/packages` with the access to package manifest. This soon can be used as a replacement for `yarn workspaces --info`
2. Added `find-and-publish-all-bumped-packages.js` script. This script iterates through all the packages and detects if the version was changed via `git log -p` (same as `git diff`). If so, it tries to publish it to npm.
3. Added corresponding job and workflow to CircleCI config, which will use this script
Reviewed By: cortinico
Differential Revision: D41972733
fbshipit-source-id: c5d0ed5b852b744a699ecb88861ea3e82200e1f3
Summary:
This is a backport of 0edcbc30c8. It fixes inconsistencies in caching strategies of Hermes tarball and Hermes workspace on CircleCI.
## Changelog
[INTERNAL] [FIXED] - Update CircleCI config to use the RN version in Hermes workspace caching.
Pull Request resolved: https://github.com/facebook/react-native/pull/35617
Test Plan:
1. Create and push a new branch.
2. Change version in. react-native/package.json
3. Push those changes.
Before:
CircleCI restores cached Hermes workspace for the old version.
After:
CircleCI creates new workspace for the new version.
Reviewed By: cipolleschi
Differential Revision: D41970943
Pulled By: dmytrorykun
fbshipit-source-id: 7e343b7a8d4b1c5a63016ec53538abe4ad7808cc
Summary:
A flakey CDN is 404'ing the Java dep. Caching the Choco dependencies should stop this.
## Changelog
[Internal] [Fixed] - Cache Choco dependencies to stop erratic 404s on Java 8 install.
Pull Request resolved: https://github.com/facebook/react-native/pull/35399
Test Plan: Bump the PR to see if it's caching.
Reviewed By: huntie
Differential Revision: D41684462
Pulled By: blakef
fbshipit-source-id: f3eac9e8a00be33f7c3f0996f35abb63146cb3c4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35497
In 0.71.0-RC.2, we had a regression in `use_frameworks!`.
This adds some CircleCI jobs to make sure we do not regress on those. It also updates the template to support these tests.
## Changelog
[iOS][Added] - CircleCI jobs to keep the use_framework! setup in check for the Old Arch
Reviewed By: cortinico
Differential Revision: D41551288
fbshipit-source-id: 531fabb1a7b6aceab2926bb83cf2887129df1776
Summary:
This PR updates the Cache strategy for the tarballs to include the React Native version we are building. In this way, when we publish a new Release/RC we are sure that we are going to rebuild a nmew
tarball. This should fix caching problems like:
- we have misconfigured the build script for the Hermes tarball, we then fix it, but we distribute the wrong cached artifacts
- the cached artifact has the wrong version
## Changelog
[Internal] - Fixed Hermes Tarball Cache Logic
Pull Request resolved: https://github.com/facebook/react-native/pull/35471
Test Plan:
1. CircleCI
The real way to check this is in the next RC cycle or in the next nightly.
Reviewed By: cortinico
Differential Revision: D41530651
Pulled By: cipolleschi
fbshipit-source-id: 45e8fd3b62c8e108d393d9463ff6762dfc6d3ec8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35459
Changelog:
[Internal] [Changed] - now bootstrapping Verdaccio before template app initialization, this is required because react-native migh depend on some package which version is not yet published to npm
Reviewed By: cipolleschi
Differential Revision: D41521496
fbshipit-source-id: 6183ab02c697d9d08e9dca5b323bd7a11a749c3a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35464
This extends the buildAll task to build both RNTester Debug and Release
We can finally do this now as debug and release are fully isolated
and don't clash on each other.
Changelog:
[Internal] [Changed] - Build RNTester Release inside buildAll
Reviewed By: cipolleschi
Differential Revision: D41521995
fbshipit-source-id: 37ec5e3b55080372f01f2736c1bb020b3776b193
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35463
This will allow us to easily retrieve debug/release APK for
both RN-Tester and the Template jobs for every run of the CI.
Changelog:
[Internal] [Changed] - Store RN Tester and Template APKs for Android on CI
Reviewed By: cipolleschi
Differential Revision: D41521977
fbshipit-source-id: e2ed60921fd005425d3915323b18dde2851e7fc2
Summary:
We don't really run AVD (Emulators on CI) so those steps
are entirely unnecessary and skipped every time. I'm removing them.
Changelog:
[Internal] [Changed] - Remove AVD code from Android CI
Reviewed By: cipolleschi
Differential Revision: D41521976
fbshipit-source-id: 2737ef0dfc84198ab9b837819c16ae46280ba43f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35444
Changelog:
[Internal][Changed] - now using Verdaccio to publish necessary packages for template app
- Adds script `/scripts/template/install-dependencies.js`, which incapsulates the logic of installing dependencies of template app
- The idea of the script is to run verdaccio and publish all necessary packages to node_modules, since these packages might not yet be present on npm
- This should also potentially resolve some template app test failures on CircleCI related to package-ifying Animated, VirtualizedList, FlatList modules
Reviewed By: cortinico
Differential Revision: D41498086
fbshipit-source-id: 48fbbb1c9334e7a9e7657e6275b7b04f9ce290b5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35296
This change adds some version checks and enforces that every version matches some specific format based on the build type we are trying to run.
## Changelog
[General][Changed] - Improve version checks
Reviewed By: cortinico
Differential Revision: D41161756
fbshipit-source-id: 4172195c5e031c1eaf7b33bb74f381c04e9adaf5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35285
While doing the release 0f 0.71.0-RC0, we noticed that having the RN version in the hermes tarball was causing more harm than good.
With the version in the name, we ended up with multiple tarballs for debug and release and we were not able to explicitly pick the right tarball given a build.
This change remove the version from the tarball name.
## Changelog
[General][Changed] - Remove React Native version from Hermes tarball name
Reviewed By: lunaleaps
Differential Revision: D41156353
fbshipit-source-id: 8899d5e1e1555bc728d923f3b78d1261e6ff09c7
Summary:
This PR backport two fixes we did in 0.71 to unblock the release process:
* the change in `publish-npm` is needed because of the introduction of .strict() from 4f3ca8facf
* the removal of the other script (added originally here e4b5d3eec9) is because:
1) that step is not needed anymore (we don't publish/upload hermes artifacts to the GH release)
2) by the time this job gets run the release crew has already setup the GH release
3) the logic for the versioning was broken and even on the 0.71-rc pipeline it was tagging stuff as 1000.0.0
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Fixed] - Fix release scripts for "release" pipeline scenario
Pull Request resolved: https://github.com/facebook/react-native/pull/35258
Test Plan: The fact that 0.71-rc0 was released is the ✅ for this.
Reviewed By: jacdebug
Differential Revision: D41120888
Pulled By: cipolleschi
fbshipit-source-id: 06d108f0659ad1db53c6324fe1d735f52c34a3c5
Summary:
This PR updates he cache strategy for the `checkout_with_cache command`.
The previous strategy was using three keys in descending priority order to restore from the cache:
* `<< parameters.checkout_base_cache_key >>-{{ arch }}-{{ .Branch }}-{{ .Revision }}`
* `<< parameters.checkout_base_cache_key >>-{{ arch }}-{{ .Branch }}`
*`<< parameters.checkout_base_cache_key >>-{{ arch }}`
When it saves, it always saves using the first key.
The restore works as it follows:
1. It tries to restore the cache using the first key
2. If it fails, it checks whether there is a cache hit for a key that matches the second key as a pattern
3. If it fails, it checks whether there is a cache hit for a key that matches the third pattern
4. Otherwise, it is a cache miss.
This does not work well. Imagine that you submit some code in commit `xxxx` for branch `abc`.
The CI run the first time, it misses all the three keys and checks out the code normally.
Then, it stores the checked out code in the `checkout_key-abc-xxxx` key.
Then, you submit a commit `yyyy` in the same branch.
The CI starts, it tries with the key `checkout_key-abc-yyyy` but it misses
It tries with the key `checkout_key-abc` and it finds the cache for `checkout_key-abc-xxxx` and it restores it, forgetting about your changes.
While doing the release, we created a tag in a commit X. Then we manually had to remove it, but the CI had a cached version of .git with the tag for
the `0.71-stable` branch. And the release failed because the tag was already existing.
### Why this should work
With this solution, we are going to cache using the commit. If there is no cache for a specific commit, it will be a miss. It won't try to be smart and
retrieve the code from previous caches.
This should prevent stale caches and if we manually remove a tag, and then we do a new commit, it should work.
This is a good trade-off that allows to pay the checkout cost only for the first batch of jobs of the pipeline.
**NOTE:** This still won't work if we don't do a new commit.
## Changelog
[General] [Fixed] - Change Cache strategy to avoid cache bumps in Release
Pull Request resolved: https://github.com/facebook/react-native/pull/35259
Test Plan: 1. CircleCI must be green
Reviewed By: jacdebug
Differential Revision: D41120895
Pulled By: cipolleschi
fbshipit-source-id: 2b45da01803197dbe4a25a313a9dfc53a976d096
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35108
I've rewritten the comment in the android/app/build.gradle.
They were really old, contained wrong links and most of the people ignored it.
I've also moved the enabling of Hermes to the `gradle.properties` file.
RNGP still supports the old method, but we must be sure that we notify
library authors if they were reading project.ext.react.enableHermes in the past
(also the website needs to be updated).
I've also cleaned up the CircleCI setup as now we can specify Hermes enabled/disabled
via the CLI (this will also make easier to do e2e testing).
Changelog:
[Android] [Changed] - Cleanup the template documentation after RNGP & hermesEnabled to gradle.properties
Reviewed By: cipolleschi
Differential Revision: D40762872
fbshipit-source-id: 2c09245e0a923faac53cc6c8a89e99788ae47f8a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35079
This bumps the Docker image for React Native Android to 6.0
shipping the NDK 23 with it, finalizing all the work needed
to support NDK 23.
Changelog:
[Internal] [Changed] - Bump the Android Docker image to 6.0 (for NDK 23)
Reviewed By: cipolleschi
Differential Revision: D40675449
fbshipit-source-id: 5fb53080ce796263cd592dbc489743e6295060ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35075
This diff updates the New App template for Android to use the React Native Gradle Plugin.
With this we can:
1. Get rid of all the C++ code.
2. Remove a lot of New Architecture logic in the build.gradle
3. Reuse the prebuilts of React Native/Hermes via prefab
Changelog:
[Android] [Changed] - Update the template to use RNGP
Reviewed By: cipolleschi
Differential Revision: D40673732
fbshipit-source-id: 70935248993d1e24904c982e75f12ad580faa9d8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35015
React Native releases are cut every few months. Without testing, the workflow is prone to breakage.
Dry-run the release workflow on every commit in order to surface any issues as they are introduced instead of at release time.
Fixed issues that surfaced during testing of this workflow:
- Upload both Hermes tarballs
Changelog: [internal]
Reviewed By: mdvacca
Differential Revision: D40483764
fbshipit-source-id: 5ca6bd4dcdfd64c24882ffb202edbfd701efd462
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35013
Previously, release builds were only built for stable RN releases. This creates a discrepancy between CI jobs that run on commits versus CI jobs that run on releases. We are working on reducing these differences in order to limit the number of issues we may face when cutting a React Native release.
Now, build_hermes_macos will be run as a matrix of Debug/Release builds in every workflow.
Updated build_hermes_macos to take 'flavor' as a Enum, not a string.
Store hermesc in separate directories as Circle CI does not allow two different jobs (e.g. build_hermes_macosDebug and build_hermes_macosRelease) to write to the same path when storing artifacts.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D40308952
fbshipit-source-id: b96b9a6c7cf8d0becafcf2fdcb761540816ae336
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34983
This sets up our CircleCI logic to publish artifacts to Maven Central.
I will check if tomorrow's nightly successfully landed on Maven Central
Snapshot repository.
I've added a --dry-run to the the close and release step of the publishing
to avoid accidentally publishing to Maven Central. We'll remove this if
we decide to go with the Maven Central publishing.
Changelog:
[Internal] [Changed] - Configure CircleCI to publish artifacts to Maven Central
Reviewed By: jacdebug, huntie
Differential Revision: D40377691
fbshipit-source-id: 36a74074ea95097bb7268352e40f4d2670f3cd65
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34962
For jobs that take a string parameter, where that string parameter is expected to be one of a set of accepted values, use an enum instead.
If an unexpected value is passed to a enum parameter, then `circleci config validate` will flag the issue.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D40310118
fbshipit-source-id: b8416c415705ff6eba80cc5f0d9bfe670569f732
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34886
## Reduced cache size
The `build_hermes_macos` job can spend over 20 minutes restoring cached build artifacts (over 5 GB), when only `build_macosx` and `destroot` are required to be cached: `build_macosx` as it may contain a pre-built `hermesc` from previous builds, and `destroot` which contains the artifacts for previous iOS/macOS builds.
This is the `build_hermes_macos` Restore Cache step, before the changes in this diff:
```
Found a cache from build 308044 at v1-hermes-build_hermes_macos-debug-PEiMHp9XQ13KtYFQMKoT27DmHkkoxOi_PJUyW7PacZE=
Size: 5.2 GiB
Cached paths:
* /Users/distiller/react-native/sdks/hermes/build_host_hermesc
* /Users/distiller/react-native/sdks/hermes/build_iphoneos
* /Users/distiller/react-native/sdks/hermes/build_catalyst
* /Users/distiller/react-native/sdks/hermes/build_iphonesimulator
* /Users/distiller/react-native/sdks/hermes/build_macosx
* /Users/distiller/react-native/sdks/hermes/destroot
Downloading cache archive...
Unarchiving cache...
```
Size: 5.2 GiB
Time to restore cache: 183s
This is the `build_hermes_macos` Restore Cache step, after the changes in this diff:
```
Found a cache from build 310128 at v2-hermes-build_hermes_macos-debug-e7WmoA0+mfveXq1zsMYpgR6BYqVuuDjmVeLLyjqPJWk=
Size: 1.3 GiB
Cached paths:
* /Users/distiller/react-native/sdks/hermes/build_macosx
* /Users/distiller/react-native/sdks/hermes/destroot
Downloading cache archive...
Unarchiving cache...
```
Size: 1.3 GiB
Time to restore cache: 42s
**This is a size reduction of 75%, and execution time reduction of 77%.**
This savings will apply to every workflow that runs afterwards until the Hermes cache is invalidated due to a new commit landing in `facebook/hermes`.
## Added `export_hermesc`
As part of the work mentioned above, a reusable `export_hermesc` command was added, which will export hermesc for use in downstream steps. Either of the macOS or iOS build scripts will generate this binary. As we now only cache the macOS build dir, that version is loaded from cache by default if available:
- If the cache contains hermesc, both the macOS and iOS builds will use it.
- If the cache does not contain hermesc, then the iOS job will use the hermesc that was built by the macOS job previously.
- The `export_hermesc` command will work regardless of the order of the Hermes build scripts
## Refactoring of magic strings into reusable yaml references
Some additional changes to the Circle CI config were done in order to reduce repetition of artifacts/cache paths that are re-used across workflows.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D40153737
fbshipit-source-id: b9f07302ccc9bac1ce72a09b944d3210e6db2ec1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34884
Xcode 14 is now stable. Updating CI to use latest Xcode command line tools.
The Circle CI 14.0.1 container ships with Ruby 2.7.6 and CocoaPods 1.11.3, see full manifest here: https://circle-macos-docs.s3.amazonaws.com/image-manifest/v8824/index.html
Changelog: [iOS][Changed] Bump to Ruby 2.7.6 and CocoaPods 1.11.3
Reviewed By: mdvacca
Differential Revision: D40148796
fbshipit-source-id: b1eab68e159ec3237ff2ef596163b73fc1e511e4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34875
Create common script for generating a Hermes tarball after Hermes is built from source.
Use after building Hermes from source to create a tarball of the resulting build artifacts. The path to the tarball can be passed to CocoaPods via a `HERMES_ENGINE_TARBALL_PATH` envvar in order to use these pre-built Hermes artifacts when installing the `hermes-engine` pod with `pod install`.
Use in Circle CI when creating a Hermes tarball for caching and for use in stable React Native releases.
Usage:
```
pod install
# When Hermes is built from source via CocoaPods, the build artifacts will be located in the Pods directory for hermes-engine
node ./scripts/hermes/create-tarball.js \
--inputDir ./sdks/hermes \
--buildType Debug \
--releaseVersion 1000.0.0 \
--outputDir .
```
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D40124378
fbshipit-source-id: f9712e87526ccc737afac4599b0ab0a7bb3f3956
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34885
We use workflows extensively in Circle CI, so caching a git checkout should help speed up tests when downstream jobs need to checkout the repository. In the current configuration, the Windows job is most likely to run and write to the .git cache first, which results in permission issues when the .git cache is loaded onto macOS or linux hosts.
By splitting the cache by architecture, we may lose on some reusability across jobs with distinct architectures, but it ensures we avoid cross-platform permission issues.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D40150781
fbshipit-source-id: 4a4b2a4da5e20f754b72db0c9852c7c1616b610c
Summary:
Added a new job to testing RNTester app on both architectures
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Added] - Support both architectures to test RNTester iOS app
Pull Request resolved: https://github.com/facebook/react-native/pull/34864
Test Plan: CircleCI jobs
Reviewed By: cortinico, cipolleschi
Differential Revision: D40062371
fbshipit-source-id: 1a28890edc57b64232d647d85694b34d50a9cd64
Summary:
Moves the `retry3` utility function into its own file so that it can be reused in other steps that are not related to Android.
Changelog:
[Internal]
Reviewed By: rickhanlonii, cipolleschi
Differential Revision: D39889996
fbshipit-source-id: bf79cc19ad6178af0a0d8117a81116e0c32f4333
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34704
Create separate hermes-engine tarballs for release and debug builds, and only include the debugger in debug builds.
Changes the hermes-engine podspec to use a debug Hermes build by default in order to preserve the inclusion of the debugger.
Upcoming changes should split the hermes-engine Pod to allow Xcode to use release and debug builds as needed.
Changelog:
[iOS][Changed] - Use debug Hermes builds by default
Reviewed By: cipolleschi
Differential Revision: D39326467
fbshipit-source-id: 94c5fe7db80194d22fced6717c5efc7accd36d48
Summary:
## Changelog
[General] [Added] - Add `types` folder to house TypeScript types.
Release TypesScript types with react-native and eventually deprecate [types/react-native](https://www.npmjs.com/package/types/react-native).
The current plan is to release types/react-native for 0.70 and 0.71 while also maintaining types here. This will result in some double maintenance until 0.72 but will give community time to move off of types/react-native.
After this lands, there have been changes on `main` of types that we need to update. Then, when we release 0.71 from DefinitelyTyped, we can simply copy over the `types` folder from this repo.
Pull Request resolved: https://github.com/facebook/react-native/pull/34614
Test Plan:
`yarn run test-typescript` for linting types
* Created a new project using the TS template and my local clone of `react-native` on this branch.
`npx react-native init MyTSApp --version <path-to-my-local-rn-repo> --template react-native-template-typescript`
* Updated the `package.json` to remove `types/react-native`
* Deleted my node_modules and re-ran yarn
* Opened MyTSApp in VSCode and verified the type suggestions appeared and cmd+click to defnitions took me to the node_module dependency `react-native/types`
## Danger is failing on this PR and it's expected
as it runs off the changes on `main`. [This is expected](https://docs.github.com/en/github-ae@latest/actions/using-workflows/events-that-trigger-workflows?fbclid=IwAR2_AE0Jwndt8Gu-iTQnxGxLJq7nakbi7sz8jwZ6U62JWLSdcZuvjcQ6WvE#pull_request_target). However testing it locally passes. Once merged, and these changes are on `main`, danger will pass again.
```
$ react-native/packages/react-native-bots
❯ yarn danger pr https://github.com/facebook/react-native/pull/34614
yarn run v1.22.19
$ ..react-native/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/34614
Starting Danger PR on facebook/react-native#34614
Danger: ✓ found only warnings, not failing the build
## Warnings
🔒 package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>
✨ Done in 13.24s.
```
Reviewed By: mdvacca
Differential Revision: D39479137
Pulled By: lunaleaps
fbshipit-source-id: 1d506f812d566b783b6e79104cd6339b077a42a7
Summary:
allow-large-files
When working on https://github.com/facebook/react-native/pull/34614, danger is failing because it doesn't share `node_modules` with the root directory where `typescript` is installed as we added it as a parser in our eslint config.
By setting `bots` as a yarn workspace, dependencies are all installed under the root `node_modules` folder and in local testing (detailed in test section) we no longer have the `typescript module not found` error. However, danger will continue to fail on https://github.com/facebook/react-native/pull/34614 as the `danger_pr` Github action runs from what's defined on `main`.
Once these changes land, I can rebase https://github.com/facebook/react-native/pull/34614 on it and danger's eslint should pass.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal][Fixed] - Add `bots` directory as a yarn workspace and update `danger_pr` Github action
Pull Request resolved: https://github.com/facebook/react-native/pull/34652
Test Plan:
To verify this fix I had to run:
```
react-native $ yarn && cd bots
react-native/bots$ yarn run danger pr https://github.com/facebook/react-native/pull/34614
```
which resulted in
```
❯ yarn run danger pr https://github.com/facebook/react-native/pull/34614
yarn run v1.22.19
$ lunaleaps/react-native/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/34614
Starting Danger PR on facebook/react-native#34614
Danger: ✓ found only warnings, not failing the build
## Warnings
🔒 package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>
✨ Done in 12.78s.
```
Verified this also on another PR:
```
yarn run danger pr https://github.com/facebook/react-native/pull/34650
```
Reviewed By: NickGerleman
Differential Revision: D39435286
Pulled By: lunaleaps
fbshipit-source-id: 8c82f49facf162f4fc0918e3abd95eb7e4ad1e37
Summary:
https://www.internalfb.com/T131530362
We are testing the New App template in CircleCI.
For Android we test the combination of Debug/Release and Old/New Architecture, and always use the Hermes engine.
We don't test the JSC engines (in iOS this is already happening).
We're not automatically testing that we can create a new project with JSC, forcing release managers to do it manually.
## Changelog
[Android] [Added] - Automatic testing of the new project template with the JSC engine.
Pull Request resolved: https://github.com/facebook/react-native/pull/34664
Test Plan:
- Open the circle-ci dashboard
- Verify there are now 8 jobs adeed to the pipeline:
```
test_android_template-Debug-Hermes-false
test_android_template-Debug-Hermes-true
test_android_template-Debug-JSC-false
test_android_template-Debug-JSC-true
test_android_template-Release-Hermes-false
test_android_template-Release-Hermes-true
test_android_template-Release-JSC-false
test_android_template-Release-JSC-true
```
- Verify they are all passing.
Reviewed By: cortinico
Differential Revision: D39426388
Pulled By: vincenzovitale
fbshipit-source-id: e5d606b1cc3ace53f8dab0f7d6d7d06ab11a2b46
Summary:
The keys of the current debian version expired again. This PR is an attempt to use a different version
## Changelog
[General] [Fixed] - Update debian version
Pull Request resolved: https://github.com/facebook/react-native/pull/34634
Test Plan: CircleCI is green
Reviewed By: sammy-SC
Differential Revision: D39350344
Pulled By: cipolleschi
fbshipit-source-id: 6c77cc60cbc56a9fe8362ffa0472f96bce58b28e
Summary:
This PR runs the Jest test for the Codegen package in CI.
## Changelog
[General] [Added] - Run Codegen Tests in CI
Pull Request resolved: https://github.com/facebook/react-native/pull/34596
Test Plan: CircleCI should show a new job for the tests. The job should be green.
Reviewed By: NickGerleman
Differential Revision: D39275645
Pulled By: cipolleschi
fbshipit-source-id: 29133c933f134802029406ff255b62d27681c8ff
Summary:
This PR adds some tests to verify that we can build the template in every Debug configuration using Flipper and without Flipper.
## Changelog
[iOS] [Added] - Add CircleCI tests to verify that we can run the Template with and without Flipper
Pull Request resolved: https://github.com/facebook/react-native/pull/34595
Test Plan: CircleCI is green
Reviewed By: cortinico
Differential Revision: D39262137
Pulled By: cipolleschi
fbshipit-source-id: dae45b106cd13fb69442ea216005cee114d861f4
Summary:
This PR should fix the issues introduced by commit c34659a5d3.
The problem is that `Collections.emptyList` creates a `List<Object>` which is not compatible with the `List<TargetView>` type.
## Changelog
[Android] [Fixed] - Make Android CI build again.
Pull Request resolved: https://github.com/facebook/react-native/pull/34573
Test Plan: test_buck and the "test Docker android" must be green.
Reviewed By: cipolleschi
Differential Revision: D39235674
Pulled By: cortinico
fbshipit-source-id: 574338e74aeb4635c67d91de28780fb784c9f405
Summary:
This PR is the dual of the Matrix Tests we added to the Android Template a couple of weeks ago. It adds the same tests to iOS, to verify that the template builds with both architectures and with both configurations (Debug/Release).. And it tests that the template works with both Hermes and without it.
## Changelog
[iOS] [Added] - Test iOS template with both architectures and configurations
Pull Request resolved: https://github.com/facebook/react-native/pull/34469
Test Plan: CI is green in all the 8 new jobs.
Reviewed By: hramos, cortinico
Differential Revision: D39087876
Pulled By: cipolleschi
fbshipit-source-id: 1205b2339bac87cf11b4f356a2e50e1e93ba52bc
Summary:
This PR bumps the Hermes cache keys because they got corrupted due to some sync delay between Hermes and React Native.
## Changelog
[iOS] [Fixed] - CI broken due to Hermes Commit
Pull Request resolved: https://github.com/facebook/react-native/pull/34491
Test Plan: CI should be green
Reviewed By: dmitryrykun
Differential Revision: D38976132
Pulled By: cipolleschi
fbshipit-source-id: 16df11ede8947d8376d316b126eefcf0177d16de
Summary:
As per title, the shallow checkout was breaking some workflows, so we are reverting it
## Changelog
[General] [Changed] - Revert shallow checkout
Pull Request resolved: https://github.com/facebook/react-native/pull/34480
Test Plan: CI should be green
Reviewed By: dmitryrykun
Differential Revision: D38940528
Pulled By: cipolleschi
fbshipit-source-id: 691faf2749911278923ca2d42c974e5307a06261
Summary:
This isolates and parallelize all the BUCK related work inside a `test_buck` job, so it's immediately clear where a failure happend.
I've also added a couple of minor improvements:
- Don't clone okbuck just to consume a script. I've copied the script over instead.
- Removed unnecessary `buck_cache_key`
This should reduce ~5 minute of build time from Test Android which was already beyond 10 minutes.
## Changelog
[Internal] - Isolate the buck OSS commands inside test_buck
Pull Request resolved: https://github.com/facebook/react-native/pull/34378
Test Plan: Let's wait for a `test_buck` and `test_android` output.
Reviewed By: cipolleschi
Differential Revision: D38580359
Pulled By: cortinico
fbshipit-source-id: 8b3915bbc28b4a7a169011fe9047f402c2d1f6ee
Summary:
I'm extending `test_android_template` to use a CI Matrix. This will allow us to make sure that we test a new app template against Debug/Release and against New/Old Arch.
This will make sure we catch a lot of bugs early on 👍
## Changelog
[Internal] - Setup a build matrix for test_android_template
Pull Request resolved: https://github.com/facebook/react-native/pull/34355
Test Plan: Will wait for a green CI
Reviewed By: cipolleschi
Differential Revision: D38499773
Pulled By: cortinico
fbshipit-source-id: 5a24c21d111fb4ae0f4600d86b786021f6ad2abe
Summary:
This PR fixes an edge case where `prepare_hermes_workspace` job was using a commit to build hermes but `build_hermes_macos` was using a different one. This resulted in cache poisoning where subsequent jobs thoughts to be using a version of Hermes while the restored cache was loading a different one.
<img width="1440" alt="Screenshot 2022-08-03 at 06 26 14" src="https://user-images.githubusercontent.com/11162307/182570809-5c6d9323-c3fb-4834-952f-7d07b99c4880.png">
This PR simplifies the flow, creating a single `.hermesversion` file in the `prepare_hermes_workspace` workspace and using that file as key for all the caches.
## Changelog
[iOS] [Changed] - upload test result as artifact
Pull Request resolved: https://github.com/facebook/react-native/pull/34329
Test Plan:
CircleCI is now green and all the caches are using the same file to create the checksum.
We can verify that by looking at the `Save cache`/`Restore cache` commands related to Hermes. (In the workflow, their hash is always `B1NEL0P0OKhQYtk8DE150bXSoGrdWUweedHKmqNqnjo`)
Also, we removed completely the code that could create a version misalignment.
Reviewed By: cortinico
Differential Revision: D38382895
Pulled By: cipolleschi
fbshipit-source-id: 5f5501a7ef313eb56abda336716b24b486a34a1f
Summary:
How the Hermes cache worked had a concurrency issue. It used to work by asking the Hermes repository for the latest commit and using that commit as cache key to try and retrieve a built version of Hermes to avoid to compile it more than once.
The problem happened when the `build_hermes_macos` was building Hermes using a commit A.
While building, another PR could be merged into `hermes:main`, creating commit B.
When this happened, the tasks `test_ios` and `test_ios_rntester`would try to retrieve a cached version of Hermes using commit B. That version did not exist because Hermes was created using commit A, and the job would either fail or trying to build Hermes from source, ending up taking a lot of time.
This PR attaches the `.hermes-cache-key-file` to the workspace and restores it in the other jobs, making sure that the same cache key is used in all three jobs.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Changed] - Attach the `.hermes-cache-key-file` to the workspace to avoid race conditions for new PR landing on Hermes and changing the head commit between the time Hermes is built and the time it has to be consumed.
Pull Request resolved: https://github.com/facebook/react-native/pull/34235
Test Plan:
Tested manually, looking at the messages in CI.
**build_hermes_macos**
<img width="881" alt="Screenshot 2022-07-21 at 15 40 02" src="https://user-images.githubusercontent.com/11162307/180241834-776f2291-63bb-4bb2-8837-14434b50fe61.png">
**test_ios_rntester**: notice that the `echo` is not executed, meaning that the `if` does not evaluate to true and, therefore, the file has been correctly attached.
<img width="956" alt="Screenshot 2022-07-21 at 15 40 52" src="https://user-images.githubusercontent.com/11162307/180242004-d9db0336-18d3-4321-a997-b538baa6beee.png">
**test_ios**: notice that the `echo` is not executed, meaning that the `if` does not evaluate to true and, therefore, the file has been correctly attached.
<img width="900" alt="Screenshot 2022-07-21 at 15 46 33" src="https://user-images.githubusercontent.com/11162307/180243359-79de5c7a-d2f0-4331-90c6-5bd2c0b5e1ac.png">
Reviewed By: cortinico
Differential Revision: D38037386
Pulled By: cipolleschi
fbshipit-source-id: 4db4f7c478e1afb2e4a18ba3d3f70896ed41d235
Summary:
Currently, iOS jobs takes up to 2 hours to run.
This is firstly due to Hermes being rebuilt at least 3 times during the CI process.
One issue I discovered is that the `Hermes-SDK-Cache-Key` was depending on the `{{ .Environment.CIRCLE_JOB }}` which is different from all the jobs (`test_ios_rntester`, `test_ios` and `build_hermes_macos`) which forced hermes to be build 3 times.
Another issue I found was that we were not caching hermes at all the first time we build it, during the `build_hermes_macos` step.
To ensure that `test_rn_tester` and `test_ios` has a valid version of Hermes from the cache, they now depend on the `build_hermes_macos` job
## Changelog
[iOS] [Changed] - Add caching for Hermes when we build it, updated the hermes_sdk_cache_key, update job dependencies
Pull Request resolved: https://github.com/facebook/react-native/pull/34209
Test Plan:
CircleCI must be green and take less than 2 hrs
**Before**
{F753846143}
**After**
{F753846214}
Reviewed By: cortinico
Differential Revision: D37959500
Pulled By: cipolleschi
fbshipit-source-id: c3435717bfa71e7488326894cd1ad7638044004e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34224
This Diff is a copy of this [PR](https://github.com/facebook/react-native/pull/34228) that we have against 0.69-stable.
This Diff makes sure we can build Hermes also in PR that are created against a stable branch
## Changelog
[General] [Changed] - Make sure we can build Hermes from source when PR are opened agains -stable
Reviewed By: cortinico
Differential Revision: D37961092
fbshipit-source-id: 65577fcc69f0e2a68377cbd46e3bd3a6af24e7c3
Summary:
Automatically create a GitHub Release draft when a new React Native release is created.
The GitHub Release will be created by the same Circle CI job that publishes the package to npm.
This job will also upload the built Hermes binaries to the GitHub release.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D36646696
fbshipit-source-id: 0a863dc4e3215fc95f7852f8dc43858cdd852aaa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33885
When building Hermes for React Native, point to the React Native JSI location to ensure both React Native and Hermes use the exact same version of JSI.
Changelog:
[iOS] [Changed] - When Hermes is enabled, it will use the same copy of JSI as React Native
Reviewed By: cortinico, cipolleschi
Differential Revision: D36567471
fbshipit-source-id: 97d954ef34007bd31f008fab451512194060d670
Summary:
I'm backporting PR https://github.com/facebook/react-native/pull/33945 to main
as it was merged on the release branch to unblock 0.69.
Those changes are necessary as Hermes was not being donwloaded at all during `pod install`
on .69 and the app was failing to build with a missing `hermes/hermes.h` import.
Changelog:
[iOS] [Fixed] - Fix Hermes not being properly downloaded during pod install
Reviewed By: hramos
Differential Revision: D36810787
fbshipit-source-id: f898e61b6536dfcfc81feeff740703fbd697b000
Summary:
Upgrade the version of Xcode used in Sandcastle to Xcode 13.3.1, and the version used on Circle CI to Xcode 13.3.1.
Added a reminder to the Circle CI config to ensure we keep these versions in sync in future updates.
Circle CI software manifest: https://circle-macos-docs.s3.amazonaws.com/image-manifest/v7555/index.html
Changelog: [Internal]
Reviewed By: makovkastar
Differential Revision: D36671468
fbshipit-source-id: 8c028915d38738c92b5f759186b0fb95a9274211
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33876
WIP. Published so we can export and test on CI.
These two jobs can likely be merged onto the existing build_hermesc_macos job.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D36538847
fbshipit-source-id: e52c39ccfe652e70c54fd4892513c0060c3f021d
Summary:
Run Danger on all the PRs, not just on the forks, use fail or warning where is needed and make CircleCI fail if danger fails
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[Internal] - Run Danger on all the PRs and use fail or warning where is needed.
Pull Request resolved: https://github.com/facebook/react-native/pull/33872
Test Plan: Run the change on CirlceCI
Reviewed By: cortinico
Differential Revision: D36516847
Pulled By: f-meloni
fbshipit-source-id: 2c956295a56cc8aa47df4c64f8ca0a211796c73c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33852
Similarly to buildAll and cleanAll, I'm creating a downloadlAll task
which is aligning the behavior of the download task we're doing on CIs.
I've also updated the Offline Cache as we're now storing a bigger set of dependencies.
Changelog:
[Internal] [Changed] - Setup a toplevel downloadAll task
allow-large-files
Reviewed By: cipolleschi
Differential Revision: D36441728
fbshipit-source-id: f847b5e665c64e0b4b93d984bbc1b64c00a3b4f7
Summary:
build_ios is a subset of test_ios.
The Hermes cache takes 20-30 minutes to be downloaded and unarchived, that is the slowest part of both the jobs and that was duplicated.
This means that if we remove build_ios we save a lot of time, and the CI is still covering the build and the testing of the code.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[Internal] - Remove build_ios and use only test_ios
Pull Request resolved: https://github.com/facebook/react-native/pull/33837
Test Plan: Checked on CircleCI
Reviewed By: cipolleschi
Differential Revision: D36437775
Pulled By: f-meloni
fbshipit-source-id: 53adf77e3511963d2dbfadf26122fd70b0de1113
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33838
The idea behind this diff is to set a top level `buildAll` task that will be responsible
of invoking all the tasks we want to verify both in the internal and in the external CI.
This should ideally remove the breakages of the External CI happening from internal changes.
Changelog:
[Internal] [Changed] - Setup a top level buildAll Gradle task
Reviewed By: cipolleschi
Differential Revision: D36376384
fbshipit-source-id: d810b59577340628bb49562bfedf28440bd0f792
Summary:
Avoid re-building Hermes if a cache hit is found for the required Hermes version.
Cache sdks/hermes and sdks/hermesc in Circle CI iOS jobs: `test_ios_rntester`, `build_ios`, and `test_ios`.
`test_ios_rntester` "Install CocoaPod Dependencies" step reduced from 37m40s to 3m35s.
`test_ios` "Generate RNTesterPods workspace" step reduced from 36m54s to 1m34s.
Pull Request resolved: https://github.com/facebook/react-native/pull/33828
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D36365596
fbshipit-source-id: b5b6fe639f18b1724f80ab61c2262659c4987ff6
Summary:
The machines have on their env `HOMEBREW_NO_AUTO_UPDATE=1`, hence I believe that `with_brew_cache_span` is not needed anymore.
If this works it should save the cache downloading and unarchiving time
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[Internal] - Remove with_brew_cache_span from Circle's config
Pull Request resolved: https://github.com/facebook/react-native/pull/33831
Reviewed By: cortinico
Differential Revision: D36374646
Pulled By: f-meloni
fbshipit-source-id: 0e6a35bb2c2dfe44e340e95a1b5e158389a3dfe9
Summary:
Instead of wait for Circle to delete the simulators, we can do it in background and save 40 seconds
Changelog:
[Internal] - Delete iOS simulators in background
Pull Request resolved: https://github.com/facebook/react-native/pull/33822
Reviewed By: cortinico
Differential Revision: D36348573
Pulled By: f-meloni
fbshipit-source-id: 89d9e7caddb44e085734e74f417687ee031dd67b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33811
Use `scripts/hermes/prepare-hermes-for-build.js` in Circle CI, eliminating redundant steps in the `prepare_hermes_workspace` Circle CI job.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D36335122
fbshipit-source-id: b7e8c7aeb2aac5afaf37677cd3ac949ac3f96de1
Summary:
Unify the different cache keys in one unique place to avoid duplication, and possible issues with typos.
## Changelog
Pull Request resolved: https://github.com/facebook/react-native/pull/33821
Test Plan: Check Circle CI jobs to verify that caches are working correctly
Reviewed By: cortinico
Differential Revision: D36347758
Pulled By: f-meloni
fbshipit-source-id: 2a02855e938c7cb27eaa5ebee221f5861f72aee9
Summary:
Hermes' build scripts use the Ninja build utility if available, otherwise they default to Unix Makefiles. When Unix Makefiles were used, builds would take far too long due to the use of a single core.
To reduce the surface area of issues that may arise as we switch to building Hermes from source, we will now focus on a single build system using Unix Makefiles. We will also ensure all available cores are used when building on macOS.
Changelog: [Internal]
Reviewed By: cortinico, neildhar
Differential Revision: D36296838
fbshipit-source-id: 4be23739fb022e3ae8e974ad3c2c70e7011abb5a
Summary:
Copy Hermes build scripts to React Native repository for greater control over the build pipeline when used in RN.
Changelog: [Internal]
Reviewed By: neildhar
Differential Revision: D36295406
fbshipit-source-id: 54bf4173b6c75db35de828378e6f5782a248ed2e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33802
We use to have a couple of tests for the script phases script that were not running during the CI.
This diff connect them with the two CI, so that they run together with the other ruby tests.
## Changelog
[iOS][Added] - Run script phases tests in CI
Reviewed By: fkgozali
Differential Revision: D36283211
fbshipit-source-id: 01b257cdc99b0bc196d60d49ac76cf044d61a7e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33779
This diff adds a `store_artifacts` to CircleCI so the Hermes debug symbols are retained and can be used to symbolicate native crashes for Hermes.
Changelog:
[Internal] [Changed] - Store Hermes Debug Symbols inside CircleCI
Reviewed By: cipolleschi
Differential Revision: D36201978
fbshipit-source-id: ef9a71e2953180aef5caea9f5eb0047190ed6198
Summary:
Use Circle CI caching to avoid re-building Hermes. The cache key will be determined by the Hermes tag specified in sdks/.hermesversion; if the file does not exist (as is the case in builds from main), the commit sha for the latest Hermes commit from facebook/hermes will be used.
This should significantly speed up builds across all workflows: builds from main (commitlies), nightlies, and release builds.
Changelog: [Internal]
Reviewed By: cortinico, cipolleschi
Differential Revision: D36158296
fbshipit-source-id: b80457fdefad0d63e62feeb4d509265e2762f253
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33747
This Diff connects the ruby tests setup with CircleCI, making sure that we are executing the same script in Sandcastle and CircleCI.
At the moment, the scripts runs somedummy tests to make sure that everything works.
## Changelog
[iOS][Changed] - Add ruby tests to circleci
Reviewed By: dmitryrykun
Differential Revision: D36091716
fbshipit-source-id: c432e5f8b5269754db2b7ec278b159dcedf3b3b9
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary: Changelog: [Internal] Configure circleCI to comment on PR after building tarball
Reviewed By: hramos
Differential Revision: D31387660
fbshipit-source-id: 28902148cf5e2ea15320333b90a6a7fa9d553c3b
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