react-native
react-native copied to clipboard
convert circleci workflows to github actions
Summary:
This pull request converts the CircleCI workflows to GitHub actions workflows.
The github actions workflow is meant to mimic this circleci workflow.
Errors
test_ios_rntester jobs fails with errors.
build_npm_package job fails with an error indicating that the artifacts are not found. We may need to use upload-artifact and download-artifact rather than cache for these files.
test-windows job fails with unit test errors. See the log for details.
Questions
build_android and build_npm_package jobs take a parameter release_type. When and how does this get passed in?
Test Plan:
These workflows were tested in my fork. Here are the latest workflow runs:
test-all
test-js
https://fburl.com/workplace/f6mz6tmw
| Fails | |
|---|---|
| :no_entry_sign: |
:clipboard: Missing Changelog - Please add a Changelog to your PR description. See Changelog format |
Generated by :no_entry_sign: dangerJS against a245a851dc1b3d73ba358b61f0adcba7fa1446b6
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 18,012,519 | -114,569 |
| android | hermes | armeabi-v7a | n/a | -- |
| android | hermes | x86 | n/a | -- |
| android | hermes | x86_64 | n/a | -- |
| android | jsc | arm64-v8a | 21,371,039 | -122,787 |
| android | jsc | armeabi-v7a | n/a | -- |
| android | jsc | x86 | n/a | -- |
| android | jsc | x86_64 | n/a | -- |
Base commit: fb42a55bdfcc524228e0650fbdc1b7333ce0f27b Branch: main
Very exciting 🙂.
@cortinico and @cipolleschi will be the experts on the existing setup, but I also took a quick look, and noticed a couple quick things:
- The path-based workflow selection is a lot cleaner than the previous job selection script, and takes a workflow out of the critical path for all other workflows. I don't think the logic is exactly the same though. @cipolleschi wrote this and would be able to review and give feedback.
- The
test_ios_rntesterjobs seem to be failing because of too old XCode version. We previously had a matrix where most jobs ran using XCode 15.0.1, with a couple running on 14.3 to test compat with slightly older versions. IIRC themacos-12hosted runner has both installed, but defaulted to 14.2, so we can justxcode-selector use a preexisting action to do that. That upper-bound should actually probably now be XCode 15.1, but IIRC that had some trouble with CircleCI setup. Also a reminder to @cipolleschi wrt lower bound, since I know that came up recently (14.3 requirement should be in changelog as breaking change, if we don't want to bump to 15 min required for 0.74) - The
build-androidjob, which doesn't use much cache except for tools already installed in the Docker container, seems to run about half the speed of the previous CircleCI job. Wondering if some of these should maybe be on larger runners.
@cortinico and @cipolleschi, I have updated this PR to only include the jobs that are succeeding in my fork. Please merge this as we discussed. I'll follow up with other PRs as I get more jobs working. Thanks again for the help!
/rebase - this command should automatically rebase this PR on top of main
/rebase
@cortinico @cipolleschi I have rebased my branch today. Here is the latest workflow run in my fork.
If you approve this workflow run, you should see the same results.
If you approve this workflow run, you should see the same results.
So CircleCI jobs are currently red as we bumped packages on main to 0.75.0-main. @huntie are you looking into it?
@cortinico Fixed after both of:
- https://github.com/facebook/react-native/pull/43323#
- https://github.com/facebook/react-native/pull/43331
@cortinico @cipolleschi Here is the latest workflow run from my fork. All green now. It would be great to get this merged soon.
Here is the latest workflow run from my fork. All jobs should be green now.
Amazing work @robandpdx !
I've noticed that the test_android_template* and test_ios_template* jobs are still missing, right?
How do we want to split this work to start merging it? Should we do the Android first?
@cortinico The test_android_template* and test_ios_template* jobs are in progress and I'll follow up with another PR to add them. These jobs are dependent upon the build_npm_package job (at least that how it's configured in circleci), which I don't have working currently. Any help with the errors there is appreciated.
@cortinico The
test_android_template*andtest_ios_template*jobs are in progress and I'll follow up with another PR to add them. These jobs are dependent upon thebuild_npm_packagejob (at least that how it's configured in circleci), which I don't have working currently. Any help with the errors there is appreciated.
Sure so a couple of pointers:
- That's the first time I see this error, but apparently Gradle is failing to produce the
.aarfor React Native Android that needs to be consumed by the users. - I would first check if this is working fine:
https://github.com/robandpdx-org/react-native/blob/39c5c057fd7656009e2250f223c66ceeabf5e178/.github/workflows/test-all.yml#L790-L794
As the error message contains x86:
Could not add file '/__w/react-native/react-native/packages/react-native/ReactAndroid/build/intermediates/prefab_package/release/prefab/modules/react_render_uimanager/libs/android.x86/libreact_render_uimanager.a' to ZIP '/__w/react-native/react-native/packages/react-native/ReactAndroid/build/outputs/aar/ReactAndroid-release.aar'.
which is suspicious. For dry-run we produce only arm64-v8a.
- I would go here: https://github.com/robandpdx-org/react-native/blob/cd486bcfecb58c715d016b4d748179398990815b/scripts/releases/utils/release-utils.js#L26
and do this:
- if (exec('./gradlew publishAllToMavenTempLocal').code) {
+ if (exec('./gradlew publishAllToMavenTempLocal --info --stacktrace').code) {
to add more logging. This can provide a bit more insights on why the job is failing at the moment.
@cortinico I think it's best if I hand off this work to you or someone else who has the expertise to make it work.
@cortinico I think it's best if I hand off this work to you or someone else who has the expertise to make it work.
Can we do the following:
- Can you give me push rights to your fork so I can experiment a bit?
- Could you start sending over smaller PRs for everything that is green so far? The smaller you can make them the better so I can distribute it for review to other colleagues.
@cortinico I have given you write permission to my fork.
In order to deliver small PRs, I would need a tool that can do stacked diffs across forks. I'm not aware of any such tool that supports stacked diffs across forks. The best I can do is get everything in this PR green.
@cortinico I have opened this PR with only the android build and test.