11 Commits

Author SHA1 Message Date
Nicola Corti
e49f2d5c50 Enable Gradle Configuration Caching on CI (#49514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49514

This attemps to enable Config Caching on CI. I'm curious to see how much time this is going to save.
There might be some problems with nigthlies so I want to make sure this is running for some days before the branch cut.

Changelog:
[Internal] [Changed] -

Reviewed By: NickGerleman

Differential Revision: D69846848

fbshipit-source-id: 0d5c292e65a6107df62f6494a1aae9abd0e8b6cc
2025-02-20 02:42:24 -08:00
Nicola Corti
83d38501b8 setup-gradle v4 + Remove unnecessary Gradle Wrapper Validation (#47389)
Summary:
As per: https://github.com/gradle/actions#the-wrapper-validation-action

> Starting with v4 the setup-gradle action will [perform wrapper validation](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#gradle-wrapper-validation) on each execution. If you are using setup-gradle in your workflows, it is unlikely that you will need to use the wrapper-validation action.

I'm moving to setup-gradle v4 and remove this unnecessary extra action.

## Changelog:

[INTERNAL] - setup-gradle v4 + Remove unnecessary Gradle Wrapper Validation

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

Test Plan: CI

Reviewed By: blakef

Differential Revision: D65435069

Pulled By: cortinico

fbshipit-source-id: c28b4d520e91fea9c59a341fb94598db5fc69900
2024-11-05 03:19:06 -08:00
Nicola Corti
fb9ce762f7 Enable add-job-summary-as-pr-comment for failed jobs (#45479)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45479

This just prints a summary on PRs if the Gradle task fails so it's easier to jump directly
to the failure.

Changelog:
[Internal] [Changed] - Enable add-job-summary-as-pr-comment for failed jobs

Reviewed By: cipolleschi

Differential Revision: D59812845

fbshipit-source-id: 2069a1c8db7d264ca1af3c1182fa443cb0a69646
2024-07-16 10:43:03 -07:00
Blake Friedman
b443e37a02 disable gradle home cleanup (#45459)
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
2024-07-16 04:20:37 -07:00
Nicola Corti
40582d5b24 Attempt to limit the Gradle cache size (#45318)
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
2024-07-08 08:40:56 -07:00
Nicola Corti
258ea84f46 Further refine the Gradle caching logic. (#45233)
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
2024-07-02 04:22:43 -07:00
Nicola Corti
88a9b6e89f Only build_android should write to the Gradle Cache (#45160)
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
2024-06-26 03:40:50 -07:00
Nicola Corti
1cb587c620 Do not publish Gradle Scans (#44925)
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
2024-06-13 03:41:39 -07:00
Nicola Corti
b8f1b92298 Setup publishing of Gradle Scans on GHA (#44879)
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
2024-06-12 03:47:00 -07:00
Nicola Corti
d0012b7dcd Simplify build_android (#44870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44870

This just simplifies the build_android step on GHA

Changelog:
[Internal] [Changed] - Simplify build_android

Reviewed By: cipolleschi

Differential Revision: D58407537

fbshipit-source-id: 2bb34ef8b8d1883e653914488d4d417356f0f1d2
2024-06-11 08:34:46 -07:00
Rob Anderson
036ffbc530 convert circleci workflows to github actions for android build and test (#43644)
Summary:
This pull request converts the CircleCI workflows to GitHub actions workflows. This change only inlcudes the android build and test jobs.

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

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

Test Plan:
[Here is the latest workflow run in my fork](https://github.com/robandpdx-org/react-native/actions/runs/8426560047).

 ---
https://fburl.com/workplace/f6mz6tmw

Reviewed By: NickGerleman

Differential Revision: D55417814

Pulled By: cortinico

fbshipit-source-id: 918c6be6fa06bb6605fad6efe21def5fe397f024
2024-04-02 04:04:34 -07:00