Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45459
Seeing failures on main with GHA for gradle builds, in the Post Setup gradle step:
```
Could not get unknown property 'cleanupTime' for object of type org.gradle.api.internal.cache.DefaultCacheConfigurations.
```
This is a speculative change to get CI back to stable.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D59802517
fbshipit-source-id: c7b5259397fddef9420570043263e92f21718934
Summary:
This change factors out build-android job so we can reuse it
## Changelog:
[Internal] - Factor out the build-android job for code reuse
Pull Request resolved: https://github.com/facebook/react-native/pull/45455
Test Plan: GHA are green
Reviewed By: blakef
Differential Revision: D59802116
Pulled By: cipolleschi
fbshipit-source-id: 12ece8004da3bfd1f275b4af8e9822d4b0ccc0f0
Summary:
This is just a minor nit to make it easier to copy-n-paste
## Changelog:
[INTERNAL] - Remove extra dot from close-pr.yml
Pull Request resolved: https://github.com/facebook/react-native/pull/45441
Test Plan: N/A
Reviewed By: cipolleschi
Differential Revision: D59752879
Pulled By: cortinico
fbshipit-source-id: caa398010b64024e2a0259d177762fd76082507f
Summary:
This change factors out the build hermesc windows job into a separate action to reuse the code in different jobs
## Changelog:
[Internal] - Factor out build hermesc windows for code reuse
Pull Request resolved: https://github.com/facebook/react-native/pull/45432
Test Plan: GHA are green
Reviewed By: blakef
Differential Revision: D59748955
Pulled By: cipolleschi
fbshipit-source-id: bb6b96c93ec7ba6af1a210511ec672907f237b45
Summary:
Call the react-native-community/template GHA to trigger a new release when we publish a react-native release. This then waits to confirm that the package is published.
See react-native-community/template#36 for the matching change
Changelog: [General][Added] trigger template publish
Pull Request resolved: https://github.com/facebook/react-native/pull/45327
Test Plan: Not sure on the best way forward here.
Reviewed By: cipolleschi
Differential Revision: D59467829
Pulled By: blakef
fbshipit-source-id: 091269e7ecdae5801ac7c03a1ede54452ae99b24
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45417
Add sources for `folly::detail::base64` to our existing `folly` dependency for Android and iOS OSS build toolchains, now a (tiny) dependency of the JS debugger since D54309633, and already part of Folly's Buck sources.
Changelog: [Internal]
Reviewed By: cipolleschi, blakef
Differential Revision: D59685218
fbshipit-source-id: bac33402927f310bf867d2c47b4ebbb9276cf545
Summary:
This change factors out the Build HermesC for Linux job so that we can reuse the code in various workflows
## Changelog:
[Internal] - Factor out build-hermesc-linux for code reuse
Pull Request resolved: https://github.com/facebook/react-native/pull/45402
Test Plan: GHA are green
Reviewed By: cortinico
Differential Revision: D59673895
Pulled By: cipolleschi
fbshipit-source-id: f5c680d523866442d25317e880b4803ac89c3741
Summary:
Factor out the build-hermes-macos job to reuse the code
## Changelog:
[Internal] - Factor out build hermes macos action
Pull Request resolved: https://github.com/facebook/react-native/pull/45371
Test Plan: GHA are green
Reviewed By: blakef
Differential Revision: D59627977
Pulled By: cipolleschi
fbshipit-source-id: 84226d8a2c036f816fa8ea949b467873a7eef37c
Summary:
Factor out build-apple-slices-hermes to a seprate action to reuse code
## Changelog:
[Internal] - Refactor the CI to reuse code
Pull Request resolved: https://github.com/facebook/react-native/pull/45359
Test Plan: GHA are green
Reviewed By: cortinico
Differential Revision: D59575467
Pulled By: cipolleschi
fbshipit-source-id: 5d253f3dd523cb70b768c62db10fb7ff39fbd49f
Summary:
Factor out the action to build hermesc for apple platform so we can reuse it across jobs
## Changelog:
[Internal] - Factor out hermesC apple to reuse code
Pull Request resolved: https://github.com/facebook/react-native/pull/45346
Test Plan: GHA are green
Reviewed By: cortinico
Differential Revision: D59521564
Pulled By: cipolleschi
fbshipit-source-id: c99966e314b3d418d1d83d653c0be68b2931b03b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45318
I'm setting the Gradle cache to write-only for build_android on main/stable branches.
This is so we start from a fresh cache on those jobs (as they're not on the critical path for developers).
Changelog:
[Internal] [Changed] - Attempt to limit the Gradle cache size
Reviewed By: cipolleschi
Differential Revision: D59466459
fbshipit-source-id: 8b7936ebe053ae06256f8506093eb17c07219de9
Summary:
We do have a mixture of casing in the custom GH actions in our repo.
This aligns them all to be `kebab-case`
## Changelog:
[INTERNAL] - Aling all custom actions to kebab-case
Pull Request resolved: https://github.com/facebook/react-native/pull/45286
Test Plan: CI
Reviewed By: blakef
Differential Revision: D59374046
Pulled By: cortinico
fbshipit-source-id: 030a9323e501e375585e90f10a3b29c3bb671b28
Summary:
This migrates `analyse_code` to GHA into a single job called `lint`.
## Changelog:
[INTERNAL] - Migrate analyse_code to GHA
Pull Request resolved: https://github.com/facebook/react-native/pull/45247
Test Plan: CI
Reviewed By: NickGerleman
Differential Revision: D59283393
Pulled By: cortinico
fbshipit-source-id: dcdc4828a551062b3706e6450614b8c94e1a7e81
Summary:
This migrates the `test_js` workflow to GHA
## Changelog:
[INTERNAL] - Migrate test_js to GHA
Pull Request resolved: https://github.com/facebook/react-native/pull/45246
Test Plan: Will wait for CI
Reviewed By: javache
Differential Revision: D59270333
Pulled By: cortinico
fbshipit-source-id: e77eb9819e0819638c51e61b1e477ac04680a2f4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45233
We want the Gradle cache to be written only on main/-stable branches run, and only for jobs with `cache-read-only` == false (i.e. `build_android`).
This changes implements it.
Changelog:
[Internal] [Changed] - Further refine the Gradle caching logic.
Reviewed By: blakef
Differential Revision: D59225944
fbshipit-source-id: b6c3a5d4d0d399d6fe42287976925c43f3f12eb7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45231
Following up to cipolleschi's work, it turns out that me setting this command inside
the docker file for React Android is unneffective:
https://github.com/react-native-community/docker-android/pull/228
The reason is that the user executing is different (1001 for the Dockerfile, while GHA executes as root 1000).
So we need to set this, otherwise the nightlies will be invoked with the `-TEMP` prefix:
Changelog:
[Internal] [Changed] - Setup `git config --global --add safe.directory '*'` when running jobs inside Docker
Reviewed By: blakef
Differential Revision: D59223862
fbshipit-source-id: 26674fc8cdaebf6687407072cc4e4f5c38246845
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45161
This is part of a bigger refactoring of the Android pipelines.
As `build_android` is already building everything, let's save the maven-local
so it can be reused by other jobs (test_android_helloworld and build_npm_package).
Changelog:
[Internal] [Changed] - Let build_android produce a signed maven-local.zip archive
Reviewed By: cipolleschi, blakef
Differential Revision: D59002893
fbshipit-source-id: db03946c975b2ce91dae0c4011981b2fe9dd6113
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45133
Recently, CircleCI has failed pretty often due to these tests.
The reason is that we migrated these jobs to M1 machines, as circleCI is deprecating intel ones, and on these machines the simulators tend to freeze. Hence, every often we get stuck when running the tests. :(
We are going to move to GHA, so that should not be a big issue.
## Changelog:
[Internal] - Disable unit tests in CircleCI to improve CI robustness
Reviewed By: cortinico
Differential Revision: D58948614
fbshipit-source-id: 5420bdf0fda325779a4e287e7b00c623de822ccb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45175
This change ports the CI improvements we made on stable branch to main.
## Changelog:
[Internal] - Port back to main improvements we made in GHA
Reviewed By: cortinico
Differential Revision: D59053873
fbshipit-source-id: 73eb7e33b9bbdc5d8c3a9294f487ad969b144bf3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45184
This is a follow-up to D59055522.
> NOTE:This diff will be followed up by a merge of the set-rn-version script into set-version. (I had considered a rename to version-rn-artifacts, intentionally keeping this script separate and distinct from a future [lerna version + this script] setup — however the current UX and confusion with this naming would be too confusing. It can move into a util 👍🏻.)
- Rename `set-rn-version` to `set-rn-artifacts-version` (more accurate).
- Mark this script as deprecated.
- For now, there are too many references to this script in CI test jobs to refactor away this entry point, so I am avoiding this — these should later be standardised to `set-version`.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D59058085
fbshipit-source-id: 4123ac73b5c7a2e07a1d1b6da61e0ad94fc31f84
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45160
This should optimize the Gradle cache, so that only `build_android` which
effectively builds everything Android related, should be allowed to write there.
More info on this strategy here:
https://github.com/gradle/actions/blob/main/docs/setup-gradle.md
Changelog:
[Internal] [Changed] - Only build_android should write to the Gradle Cache
Reviewed By: cipolleschi
Differential Revision: D59002323
fbshipit-source-id: 31b815747efdf93bfc7baf97799e287c8dcd7f02
Summary:
The cache checks in GHA were performed against bool values, while the actual values are strings.
So the checks were always failing and all the steps were executed, even when not necessary.
The reason why it was failing is because, with this setup, when a cache is hit, some steps were skipped in previous jobs, making following jobs trying to execute code on not-existing files.
## Changelog:
[Internal] - Fix cache for build_hermes_macos
Pull Request resolved: https://github.com/facebook/react-native/pull/45127
Test Plan: GHA are green again
Reviewed By: blakef
Differential Revision: D58947838
Pulled By: cipolleschi
fbshipit-source-id: 8dba216e72a3034fd4c1484418d37bfb78cf314d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44832
I'm renaming this folder as now we have 2 gradle plugins + we currently have
`package/react-native-gradle-plugin/react-native-gradle-plugin/` which is confusing so we can just call this folder `packages/gradle-plugin/`
to be consistent with the NPM package name
Changelog:
[Internal] [Changed] - packages/react-native-gradle-plugin/ -> packages/gradle-plugin/
Reviewed By: blakef
Differential Revision: D58284883
fbshipit-source-id: 5a7bb40a5d80f6fbab4ffb29e44107453f1013ec
Summary:
While landing a change on GH, I forget to remove one line that does not belong to an action
## Changelog:
[Internal] - CI fix
Pull Request resolved: https://github.com/facebook/react-native/pull/45084
Test Plan: GHA are green
Reviewed By: blakef
Differential Revision: D58817768
Pulled By: cipolleschi
fbshipit-source-id: 5fc02d2d2a19dd3fe2202c93d0d1873e5dda4b82
Summary:
This change is the first step in refactoring GHA so that they can be reused more easily across jobs.
Its goal is also to be more reliable w.r.t. caches.
That this change do:
* moves `prepare_hermes_workspace` to a composite action
* saves the `prepare_hermes_workspace` caches only on main
* uploads the destination folder as an artifact so that we can use it later in the run
* makes the `test-all`, `nightly` and `publish-release` workflow use the new composite action
* updates the `setup-hermes-workspace` to download and use the artifact uploaded by `prepare_hermes_workspace`
## Changelog:
[Internal] - Factor out the prepare_hermes_workspace action
Pull Request resolved: https://github.com/facebook/react-native/pull/45071
Test Plan: GHA in CI
Reviewed By: cortinico
Differential Revision: D58808087
Pulled By: cipolleschi
fbshipit-source-id: 42c46bcf75fc73b2edfda9be62b5d0fe8a919a5d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45073
We can also remove the workaround needed for git `safe.directory`
as this is now configured inside the container as `*`
Changelog:
[Internal] [Changed] - Bump reactnativecommunity/react-native-android to 13.1
Reviewed By: blakef
Differential Revision: D58789791
fbshipit-source-id: f44163a0aa822b19e0dd1106d3f039fd0dc83186
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45065
This fix makes sure that Android runner can run git commands.
This is porting in main the commit fee2156642
## Changelog
[Internal] - Make the build_android run git commands
Reviewed By: cortinico
Differential Revision: D58782969
fbshipit-source-id: ab35f7e3d1733ab770f2a397552daa1ec7c13cf7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45063
While doing the release of 0.75, we have to fix the Create Release action a few times to get it right.
This change contains the fixes from
* e36b46f0c9
* 1b891357b2
* 56e1c8bfdd
* 03591318fb
* 528097709a
* f4b1dd1fa1
## Changelog
[Internal] - Backport changes to Create Release github action
Reviewed By: cortinico
Differential Revision: D58782391
fbshipit-source-id: b68088fb8c4290efcb4599d1b090b18e401e4b66
Summary:
This incorrectly used the SHA from facebook/react-native instead of
facebook/hermes to label the hermes cache key. This would bloat our
cache by ~ 1.2GB for each PR.
Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/45061
Test Plan: We should remove the existing entries for v4-hermes and track the growth over time.
Reviewed By: cipolleschi
Differential Revision: D58780475
Pulled By: blakef
fbshipit-source-id: 0f192faa287f53154f1c8319be6783820d614018
Summary:
The existing regex is not workign. I've split it in two and tested it against a private repo.
## Changelog:
[INTERNAL] - Fix release regex for publish-release workflow
Pull Request resolved: https://github.com/facebook/react-native/pull/45043
Test Plan: Tested on privare repo with GHA
Reviewed By: cipolleschi
Differential Revision: D58736292
Pulled By: cortinico
fbshipit-source-id: f07ef32dcb0059922100c555f7894bbf0c7dd8f6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45032
Those tests haven't been running since ~1 year now.
I know it's not ideal but I'd rather remove them instead of keeping them around not executing.
We can still revert them back from the history once we decide to revive the E2E testing effort.
Changelog:
[Internal] [Changed] - Remove unused rn-tester e2e tests
Reviewed By: cipolleschi
Differential Revision: D58729123
fbshipit-source-id: f0f47e3c2e087141fdff506b7c5c9b460263721b
Summary:
Use GHA on PRs:
1. run test_android_helloworld when users create a PR, to provide coverage while we figure out what's going on with our CircleCI tests / deprecate them.
2. fixes uploading the `.apks` that are generated.
Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/45019
Test Plan: Does GHA run for this PR?
Reviewed By: cipolleschi
Differential Revision: D58728019
Pulled By: blakef
fbshipit-source-id: c6db41d60225702d50343384f103585d83e3528c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45023
This mirrors the same setup we have on the 0.75 release branch
Changelog:
[Internal] [Changed] - Move test_android_helloworld to 4-core-ubuntu
Reviewed By: cipolleschi, blakef
Differential Revision: D58724157
fbshipit-source-id: 754d4f777d4239eeaa6a5232508f54cfe62d4c88
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45009
This script dependes on the template existing in react-native/template. We're removing this, but can't land that until we disable this test.
Future work could move this test into the react-native-community/template project to validate against RN release candidates to support releases.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D58672744
fbshipit-source-id: c1500aebb0b21afd1ba37785e73dd6a0e1d6020e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45006
The steps were pointing to an incorrect folder. Updated to points to react-native/packages
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D58669426
fbshipit-source-id: b58b9bc7d8c7860f2f46c8bdf4bf0636e82ee357
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45005
We've had failures owing to running out of disk space, however this isn't a stable failure. Adding more data about disk availability and utilisation to help debug these issues.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D58667190
fbshipit-source-id: 3d5f7cc985ac71044818f7b5663ef7400ad691b5
Summary:
With the migration to GHA, we are updating the testing scripts to work with the new CI.
There are a bit of shenanigans due to:
* How GHA archives artifacts => they are all `.zip` files, so I had to play around with unzipping them
* GHA seems to create a different commit, like if it is forking the repo instead of using it. I think that it is how the checkout action works. *Note:* this might be a problem for the `Create React Native Release` workflow because it has to commit on the stable branch!
* Android is building only the simulator architecture when running from regular CI. The app is not configured to run only on that, so the RNTestProject was a failing because it was trying to build all the available architectures. It is an easy fix in the user project space when release testing.
## Changelog:
[Internal] - Update the testing script to work with the new CI
Pull Request resolved: https://github.com/facebook/react-native/pull/44923
Test Plan:
Tested locally.
* [iOS] RNTester - Hermes ✅
* [iOS] RNTester - JSC ✅
* [Android] RNTester - Hermes ✅
* [Android] RNTester - JSC ✅
* [iOS] RNTestProject - Hermes ✅ (The project is created correctly and it builds, crash at runtime for https://github.com/facebook/react-native/issues/44926)
* [iOS] RNTestProject - JSC ✅ (The project is created correctly and it builds, crash at runtime for https://github.com/facebook/react-native/issues/44926)
* [Android] RNTester - Hermes ✅ (Needed to build only the simulator architecture)
* [Android] RNTester - JSC ✅ (Needed to build only the simulator architecture)
Reviewed By: andrewdacenko
Differential Revision: D58528432
Pulled By: cipolleschi
fbshipit-source-id: 733065de4c532b13d8e95e2217f9aafd5a2ef8a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44905
Replaces the last template CI job.
Changelog: [Internal] [Changed] Use Helloworld in GHA CI workflow.
Reviewed By: cortinico
Differential Revision: D58466813
fbshipit-source-id: 333b9a4c71eec6901c78f144db48f365539c6a5a
Summary:
This change removes the need for the trigger-react-native-release.js script.
Thanks to the migration to Github Actions, we can now leverage the GHA workflow UI to trigger a Prepare Release job that creates a github tag that will spin a new release.
The pro of this approach are:
- less code to maintain: instead of a complex trigger release scripts, we only have to maintain two very straightforward scripts for the CI
- easier to trigger a release: instead of running a script, we can now just use the GH UI
The `trigger-react-native-release` script was doing the following steps:
- check that we are in the release branch ==> Already implemented in the GHA workflow
- Gets the branch name (not needed) ==> the job will automatically run on the stable branch
- Check for unsent changes (not needed) ==> we are not in a local environment
- get the gh token (not needed) ==> You need to be logged in GH and have write access to the repo
- get the version ==> provided as a parameter
- fails if the tag is already there ==> Functionality added in the workflow
- Parse and validate the version ==> Functionality added to the action prepare-release action + the JS Script
- Compute the npmTag ==> Functionality added to the action prepare-release action + the JS Script
- trigger the release workflow ==> The GH UI does that for us
## Changelog:
[Internal] - Remove the trigger-react-native-release.js
Pull Request resolved: https://github.com/facebook/react-native/pull/44898
Test Plan: Testing in Production!
Reviewed By: cortinico, huntie
Differential Revision: D58461470
Pulled By: cipolleschi
fbshipit-source-id: 32bb0ee91370c9483a29e2ca2e18e24557d5fd53
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44925
I have the suspect this is causing our builds to be slower and especially causing the template tests to take 6 hours.
Let's try to disable it.
Changelog:
[Internal] [Changed] - Do not publish Gradle Scans
Reviewed By: cipolleschi
Differential Revision: D58520463
fbshipit-source-id: 028e16a725ea87e178ed4e0bf134737f32780544
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44912
While moving from CircleCI → GHA, we're removing this blocking folks landing PRs and just running on main. We will re-enable once GHA is stable.
Changelog: [General][Changed] Disable GHA on PRs until it's stable
Reviewed By: NickGerleman
Differential Revision: D58478000
fbshipit-source-id: 053ee53455956bf19b6f9113cb796346359ad4ef
Summary:
This change migrates the GHA template jobs to the HelloWorld package for iOS.
## Changelog:
[Internal] - Move iOS template jobs to HelloWorld
Pull Request resolved: https://github.com/facebook/react-native/pull/44875
Test Plan: GHA are green
Reviewed By: cortinico
Differential Revision: D58459398
Pulled By: cipolleschi
fbshipit-source-id: 95404445d7375186860af5835b750b4735795434
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44879
This sets up publishing of Gradle scans for every build on GHA.
Changelog:
[Internal] [Changed] - Setup publishing of Gradle Scans on GHA
Reviewed By: blakef
Differential Revision: D58419361
fbshipit-source-id: f54365ad259324747248ef0bb726dc64964507f8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44871
This re-enables and fix `test_android_template`.
The problem was that we were invoking `yarn install` inside the template after we already installed with `npm install --registry`.
So this was invalidating the Verdaccio setup and effectively fetching packages from NPM
Changelog:
[Internal] [Changed] - Fix test_android_template
Reviewed By: cipolleschi
Differential Revision: D58407941
fbshipit-source-id: 9b7b877cfc994eb8db1b5bf71dd35289c3937f5c