Commit Graph

353 Commits

Author SHA1 Message Date
Blake Friedman
6664b9b9de pass github token to cache clean action (#45508)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45508

The scripts/clean-gha-cache.js uses the `gh` cli too, which expects the GITHUB_TOKEN presented GH_TOKEN.  Also allowed us to manually kick off this workflow.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D59901639

fbshipit-source-id: f3543cc83cbf67b6969abc3390790e038e06c305
2024-07-18 02:24:23 -07:00
Blake Friedman
17cbe7d974 GHA: create a reaper job to keep the cache < 10GB (#45500)
Summary:
This would run every 2hrs during weekdays.  It aims for 9GB (a.k.a 90%
of threshold). It'll order caches by most accessed and start trimming
removing as soon as the cumulative cache is greater than the threshold.

I've given it generous logging to help debugging and investigation about
cache hogs.

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

Test Plan:
Ran this locally using a `--dry` run:
```
  scripts git:(main) ✗ node ../clean-gha-cache.js --dry
skip 1 365.71MB 0.7hrs
skip 2 43.62MB 0.7hrs
skip 3 0.10MB 0.7hrs
skip 4 0.93MB 0.7hrs
skip 5 188.07MB 0.7hrs
skip 6 0.16MB 0.7hrs
skip 7 316.66MB 0.7hrs
skip 8 80.96MB 0.7hrs
skip 9 317.72MB 0.7hrs
skip 10 317.73MB 0.8hrs
skip 11 80.98MB 0.8hrs
skip 12 34.60MB 0.9hrs
skip 13 0.01MB 0.9hrs
skip 14 34.67MB 0.9hrs
skip 15 0.01MB 0.9hrs
skip 16 2.90MB 0.9hrs
skip 17 0.01MB 0.9hrs
skip 18 304.92MB 1.0hrs
skip 19 212.21MB 1.0hrs
skip 20 301.33MB 1.0hrs
skip 21 0.00MB 1.0hrs
skip 22 389.38MB 1.0hrs
skip 23 195.11MB 1.0hrs
skip 24 388.83MB 1.0hrs
skip 25 154.47MB 1.0hrs
skip 26 300.72MB 1.0hrs
skip 27 1.53MB 1.0hrs
skip 28 154.90MB 1.0hrs
skip 29 405.21MB 1.0hrs
skip 30 196.79MB 1.0hrs
skip 31 197.23MB 1.0hrs
skip 32 315.94MB 1.0hrs
skip 33 154.16MB 1.0hrs
skip 34 12.50MB 1.0hrs
skip 35 72.59MB 1.0hrs
skip 36 32.95MB 1.0hrs
skip 37 0.00MB 1.0hrs
skip 38 317.72MB 1.4hrs
skip 39 80.97MB 1.4hrs
skip 40 304.69MB 2.4hrs
skip 41 317.18MB 2.5hrs
skip 42 0.01MB 2.5hrs
skip 43 2.91MB 2.6hrs
skip 44 0.01MB 2.6hrs
skip 45 34.60MB 2.6hrs
skip 46 34.60MB 2.6hrs
skip 47 0.01MB 2.6hrs
skip 48 0.01MB 2.6hrs
skip 49 2.90MB 2.7hrs
skip 50 34.60MB 2.7hrs
skip 51 2.91MB 2.7hrs
skip 52 34.60MB 2.7hrs
skip 53 34.60MB 2.7hrs
skip 54 34.67MB 2.7hrs
skip 55 2.91MB 2.7hrs
skip 56 34.60MB 2.7hrs
skip 57 0.01MB 2.7hrs
skip 58 34.60MB 2.7hrs
skip 59 0.01MB 2.7hrs
skip 60 0.01MB 2.7hrs
skip 61 2.80MB 2.7hrs
skip 62 1.53MB 2.7hrs
skip 63 0.00MB 2.7hrs
skip 64 306.97MB 2.8hrs
skip 65 0.00MB 2.8hrs
skip 66 12.50MB 2.8hrs
skip 67 296.04MB 2.9hrs
skip 68 12.50MB 2.9hrs
skip 69 0.01MB 2.9hrs
skip 70 2.80MB 2.9hrs
skip 71 0.01MB 2.9hrs
skip 72 34.60MB 2.9hrs
skip 73 0.01MB 2.9hrs
skip 74 34.60MB 2.9hrs
skip 75 0.01MB 2.9hrs
skip 76 1.53MB 2.9hrs
skip 77 34.60MB 3.0hrs
skip 78 34.60MB 3.0hrs
skip 79 0.00MB 3.0hrs
skip 80 295.49MB 3.1hrs
skip 81 306.94MB 3.2hrs
skip 82 1.53MB 3.2hrs
skip 83 317.70MB 3.5hrs
skip 84 80.97MB 3.5hrs
skip 85 34.60MB 5.0hrs
skip 86 34.60MB 5.1hrs
skip 87 317.72MB 5.3hrs
skip 88 80.98MB 5.3hrs
skip 89 34.60MB 5.3hrs
skip 90 34.60MB 5.4hrs
[ 5.5hrs] 317.70MB -> gradle-transforms-v1-03ddabb4b1809dff6c857700b53007a6
[ 5.5hrs] 80.96MB -> gradle-home-v1|Linux|build_android[84f755636760a07462d15a851519289b]-ec140aa68d9ab872dc43719cdc53fb2bc0b19cd0
[ 5.6hrs]  0.01MB -> v10-podfilelock-test_ios_rntester-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.6hrs] 34.60MB -> v12-cocoapods-test_ios_rntester-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.8hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_dynamic_frameworks-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.8hrs] 34.67MB -> v12-cocoapods-test_ios_rntester_dynamic_frameworks-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.8hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_ruby_3_2_0-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.8hrs] 34.60MB -> v12-cocoapods-test_ios_rntester_ruby_3_2_0-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.8hrs] 34.60MB -> v12-cocoapods-test_ios_rntester_ruby_3_2_0-18e21417bb83369992b1f3346f5aeeb7250bd9311d5f7f9427a743031daf7d00-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.8hrs]  2.80MB -> v12-cocoapods-test_ios_rntester_dynamic_frameworks-b09255761a2bb17e0014cb67004cc46eff539ef428ce97265644d6e75217fd5b-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.8hrs] 34.60MB -> v12-cocoapods-test_ios_rntester_ruby_3_2_0-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.8hrs]  2.80MB -> v12-cocoapods-test_ios_rntester_dynamic_frameworks-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.9hrs]  2.90MB -> v12-cocoapods-test_ios_rntester-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 5.9hrs] 291.40MB -> gradle-dependencies-v1-49635ba64c7470c5975fa812320e8669
[ 5.9hrs] 241.71MB -> gradle-transforms-v1-4903a32cb8d567063ace38e1c8e4e922
[ 5.9hrs] 54.70MB -> gradle-home-v1|Linux|build_android[24b50bfc3f2953187ad7df78a20c6c6a]-a6f5e5adebed3d9da411f99548e2d8ce96636e16
[ 5.9hrs] 317.73MB -> gradle-transforms-v1-7c27a147cb9da63a071780069b610f20
[ 5.9hrs] 80.98MB -> gradle-home-v1|Linux|build_android[84f755636760a07462d15a851519289b]-a6f5e5adebed3d9da411f99548e2d8ce96636e16
[ 6.0hrs]  2.91MB -> v12-cocoapods-test_ios_rntester-b7217839f41b15a756f47bf4cb76a7e5770bc0986e8a5d852b9763fde7142bfd-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.0hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_ruby_3_2_0-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.0hrs] 34.60MB -> v12-cocoapods-test_ios_rntester_ruby_3_2_0-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.0hrs]  0.01MB -> v10-podfilelock-test_ios_rntester-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.0hrs]  2.91MB -> v12-cocoapods-test_ios_rntester-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.1hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_ruby_3_2_0-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.1hrs]  0.01MB -> v10-podfilelock-test_ios_rntester-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.1hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_dynamic_frameworks-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.1hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_dynamic_frameworks-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.1hrs] 34.67MB -> v12-cocoapods-test_ios_rntester_dynamic_frameworks-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.4hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_dynamic_frameworks-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.4hrs]  2.80MB -> v12-cocoapods-test_ios_rntester_dynamic_frameworks-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.4hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_ruby_3_2_0-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.4hrs] 34.60MB -> v12-cocoapods-test_ios_rntester_ruby_3_2_0-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.4hrs]  0.01MB -> v10-podfilelock-test_ios_rntester-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.4hrs] 34.60MB -> v12-cocoapods-test_ios_rntester-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.9hrs]  2.80MB -> v12-cocoapods-test_ios_rntester_dynamic_frameworks-1a00237c91b102b608d8562f91982c1adc1e44ee3b168f6dc0d7d60c5ca975d5-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 6.9hrs] 34.60MB -> v12-cocoapods-test_ios_rntester_ruby_3_2_0-83993878f618c0a819bc05aa4b1fb7ec286dd41316ae29630808bf64a99f660b-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 7.0hrs] 34.60MB -> v12-cocoapods-test_ios_rntester-31697fb37bd3e3292c233068c68666694ad04eb8eb75c71e0232d4aab0abd08f-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 7.3hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_ruby_3_2_0-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 7.3hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_dynamic_frameworks-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 7.3hrs]  0.01MB -> v10-podfilelock-test_ios_rntester-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 8.1hrs] 34.60MB -> v12-cocoapods-test_ios_rntester_ruby_3_2_0-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 8.1hrs] 34.67MB -> v12-cocoapods-test_ios_rntester_dynamic_frameworks-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[ 8.2hrs] 34.60MB -> v12-cocoapods-test_ios_rntester-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[10.4hrs]  0.00MB -> _state
[10.8hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_dynamic_frameworks-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[10.8hrs] 34.67MB -> v12-cocoapods-test_ios_rntester_dynamic_frameworks-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[10.9hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_ruby_3_2_0-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[10.9hrs] 34.60MB -> v12-cocoapods-test_ios_rntester_ruby_3_2_0-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[11.0hrs]  0.01MB -> v10-podfilelock-test_ios_rntester-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--f74fef4230d89aac583dea74a08ece8c4ce36b22
[11.0hrs] 34.60MB -> v12-cocoapods-test_ios_rntester-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[12.1hrs] 34.60MB -> v12-cocoapods-test_ios_rntester_ruby_3_2_0-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[12.2hrs]  2.80MB -> v12-cocoapods-test_ios_rntester_dynamic_frameworks-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[12.2hrs]  2.91MB -> v12-cocoapods-test_ios_rntester-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-f74fef4230d89aac583dea74a08ece8c4ce36b22
[13.8hrs] 72.59MB -> v2-hermesc-apple--
[16.1hrs]  0.01MB -> v10-podfilelock-test_ios_rntester-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3
[16.1hrs] 34.60MB -> v12-cocoapods-test_ios_rntester-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3
[16.1hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_dynamic_frameworks-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3
[16.1hrs] 34.67MB -> v12-cocoapods-test_ios_rntester_dynamic_frameworks-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3
[16.1hrs]  0.01MB -> v10-podfilelock-test_ios_rntester_ruby_3_2_0-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69--3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3
[16.1hrs] 34.60MB -> v12-cocoapods-test_ios_rntester_ruby_3_2_0-b14fc5cf3b5600afde3d3e7b7903096473f66a29e532cb885dfbc75dd42f2110-4c34080e10081d48f7ef152bdff463fce251ab906cd044dab48f32b051f9bf69-3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3
[16.5hrs] 304.91MB -> v3-hermes-artifacts-Debug-3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3-1000.0.0
[16.5hrs] 80.98MB -> gradle-home-v1|Linux|build_android[84f755636760a07462d15a851519289b]-50f7892a1f803520f2b4dc25b99568ad0ce30ae9
[16.5hrs] 317.56MB -> gradle-transforms-v1-c63bdf2b438bb9e6966fa203418e433d
[16.5hrs] 212.20MB -> v3-hermes-artifacts-Release-3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3-1000.0.0
[16.5hrs] 80.94MB -> gradle-home-v1|Linux|build_android[84f755636760a07462d15a851519289b]-db16a7895ee2642ec5f7f517c008973a0be3b8a1
[16.5hrs] 154.47MB -> v4-hermes-apple-3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3-1000.0.0-7168ddaa4b22d226798554ca83fec4fb2830f638613a93ddef357a3855c6c6fa-xrsimulator-Release
[16.5hrs] 317.71MB -> gradle-transforms-v1-e95e7d153c065969cb69e27e056a1539
[16.5hrs] 405.21MB -> v4-hermes-apple-3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3-1000.0.0-7168ddaa4b22d226798554ca83fec4fb2830f638613a93ddef357a3855c6c6fa-macosx-Debug
[16.5hrs] 301.33MB -> v4-hermes-apple-3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3-1000.0.0-7168ddaa4b22d226798554ca83fec4fb2830f638613a93ddef357a3855c6c6fa-iphonesimulator-Release
[16.5hrs] 154.18MB -> v4-hermes-apple-3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3-1000.0.0-7168ddaa4b22d226798554ca83fec4fb2830f638613a93ddef357a3855c6c6fa-iphoneos-Release
[16.5hrs] 389.38MB -> v4-hermes-apple-3d32796a1e32f7e0e424eb41bad5a2fb8ccf58c3-1000.0.0-7168ddaa4b22d226798554ca83fec4fb2830f638613a93ddef357a3855c6c6fa-iphonesimulator-Debug
Identifed 71 cache keys for removal, reducing cache from 14128.82MB -> 9199.51MB
DRY: gh cache delete 55205 --repo facebook/react-native
DRY: gh cache delete 55206 --repo facebook/react-native
DRY: gh cache delete 55254 --repo facebook/react-native
DRY: gh cache delete 55253 --repo facebook/react-native
DRY: gh cache delete 55223 --repo facebook/react-native
DRY: gh cache delete 55220 --repo facebook/react-native
DRY: gh cache delete 55219 --repo facebook/react-native
DRY: gh cache delete 55216 --repo facebook/react-native
DRY: gh cache delete 55215 --repo facebook/react-native
DRY: gh cache delete 55213 --repo facebook/react-native
DRY: gh cache delete 55209 --repo facebook/react-native
DRY: gh cache delete 55207 --repo facebook/react-native
DRY: gh cache delete 55196 --repo facebook/react-native
DRY: gh cache delete 55083 --repo facebook/react-native
DRY: gh cache delete 55084 --repo facebook/react-native
DRY: gh cache delete 55085 --repo facebook/react-native
DRY: gh cache delete 55030 --repo facebook/react-native
DRY: gh cache delete 55031 --repo facebook/react-native
DRY: gh cache delete 55191 --repo facebook/react-native
DRY: gh cache delete 55190 --repo facebook/react-native
DRY: gh cache delete 55189 --repo facebook/react-native
DRY: gh cache delete 55182 --repo facebook/react-native
DRY: gh cache delete 55181 --repo facebook/react-native
DRY: gh cache delete 55123 --repo facebook/react-native
DRY: gh cache delete 55117 --repo facebook/react-native
DRY: gh cache delete 55121 --repo facebook/react-native
DRY: gh cache delete 55167 --repo facebook/react-native
DRY: gh cache delete 55166 --repo facebook/react-native
DRY: gh cache delete 55158 --repo facebook/react-native
DRY: gh cache delete 55157 --repo facebook/react-native
DRY: gh cache delete 55156 --repo facebook/react-native
DRY: gh cache delete 55155 --repo facebook/react-native
DRY: gh cache delete 55152 --repo facebook/react-native
DRY: gh cache delete 55151 --repo facebook/react-native
DRY: gh cache delete 55148 --repo facebook/react-native
DRY: gh cache delete 55147 --repo facebook/react-native
DRY: gh cache delete 55144 --repo facebook/react-native
DRY: gh cache delete 55095 --repo facebook/react-native
DRY: gh cache delete 55091 --repo facebook/react-native
DRY: gh cache delete 55087 --repo facebook/react-native
DRY: gh cache delete 55122 --repo facebook/react-native
DRY: gh cache delete 55120 --repo facebook/react-native
DRY: gh cache delete 55116 --repo facebook/react-native
DRY: gh cache delete 55100 --repo facebook/react-native
DRY: gh cache delete 55113 --repo facebook/react-native
DRY: gh cache delete 55112 --repo facebook/react-native
DRY: gh cache delete 55109 --repo facebook/react-native
DRY: gh cache delete 55108 --repo facebook/react-native
DRY: gh cache delete 55103 --repo facebook/react-native
DRY: gh cache delete 55102 --repo facebook/react-native
DRY: gh cache delete 55094 --repo facebook/react-native
DRY: gh cache delete 55090 --repo facebook/react-native
DRY: gh cache delete 55086 --repo facebook/react-native
DRY: gh cache delete 52262 --repo facebook/react-native
DRY: gh cache delete 55037 --repo facebook/react-native
DRY: gh cache delete 55036 --repo facebook/react-native
DRY: gh cache delete 55035 --repo facebook/react-native
DRY: gh cache delete 55034 --repo facebook/react-native
DRY: gh cache delete 55033 --repo facebook/react-native
DRY: gh cache delete 55032 --repo facebook/react-native
DRY: gh cache delete 55021 --repo facebook/react-native
DRY: gh cache delete 55008 --repo facebook/react-native
DRY: gh cache delete 54980 --repo facebook/react-native
DRY: gh cache delete 55007 --repo facebook/react-native
DRY: gh cache delete 54981 --repo facebook/react-native
DRY: gh cache delete 54991 --repo facebook/react-native
DRY: gh cache delete 55006 --repo facebook/react-native
DRY: gh cache delete 54996 --repo facebook/react-native
DRY: gh cache delete 54992 --repo facebook/react-native
DRY: gh cache delete 54987 --repo facebook/react-native
DRY: gh cache delete 54994 --repo facebook/react-native
```

Reviewed By: cipolleschi

Differential Revision: D59865637

Pulled By: blakef

fbshipit-source-id: 7d7a447a3fbcd1a3a15da7a43493c8544d93c263
2024-07-17 14:57:23 -07:00
Riccardo Cipolleschi
dbbb4069b9 Fix prepare hermes workspace warnings in GHA (#45494)
Summary:
Some of the previous commits changed the names of the parameters on one side and not in another, and GHA is emitting some warnings. This change should fix them

## Changelog:
[Internal] - Fix GHA CI warnings

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

Test Plan:
| BEFORE | AFTER |
| --- | --- |
| <img width="1507" alt="Screenshot 2024-07-17 at 14 20 54" src="https://github.com/user-attachments/assets/6703e554-ad74-4fd6-96ba-18baf5e71a52"> | <img width="1718" alt="Screenshot 2024-07-17 at 14 23 31" src="https://github.com/user-attachments/assets/8bb7bd4a-5bd4-417f-9c8a-e7e8db4ba412"> |

Reviewed By: robhogan

Differential Revision: D59857004

Pulled By: cipolleschi

fbshipit-source-id: e8c5050682aba4952e3a2b0c7a660155813d19f1
2024-07-17 08:08:11 -07:00
Nicola Corti
c1b4133a58 Composite actions inputs should be kebab-case (#45474)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45474

Our actions inputs are now a mixture of different casing.
I'm moving everything to be kebab-case

Changelog:
[Internal] [Changed] -  Composite actions inputs should be kebab-case

Reviewed By: cipolleschi

Differential Revision: D59809181

fbshipit-source-id: af6d541c2b4f5fa162dcde412fb8808bae1ef2d3
2024-07-17 03:48:36 -07:00
Nicola Corti
624f8f1919 Remove unused parameter for prepare-hermes-workspace/action.yml (#45472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45472

BUILD_FROM_SOURCE is unused here, I'm removing it.

Changelog:
[Internal] [Changed] - Remove unused parameter for prepare-hermes-workspace/action.yml

Reviewed By: cipolleschi

Differential Revision: D59808781

fbshipit-source-id: 0d6b5a877389bda0923cf6cc18e6330f82c78f57
2024-07-17 03:48:36 -07:00
Nicola Corti
37d1e8e7a0 Act as @react-native-bot on all the actions (#45480)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45480

We currently use the default GITHUB_ACTION which makes a lot of interaction
appear as user "GitHub Actions". Instead we could use the `REACT_NATIVE_BOT_GITHUB_TOKEN`
which we have as secret so the bot will actually perform the actions.

Changelog:
[Internal] [Changed] - Act as react-native-bot on all the actions

Reviewed By: cipolleschi

Differential Revision: D59815201

fbshipit-source-id: 702b121ec07d0db10abf25e23f7ddf5658dd5d62
2024-07-17 03:27:12 -07:00
Nicola Corti
ec140aa68d Unbreak nightlies by fixing secrets (#45491)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45491

The build_android job was missing the sonatype credentials so could not
publish a -SNAPSHOT version. This fixes it.

Changelog:
[Internal] [Changed] - Unbreak nightlies by fixing secrets

Reviewed By: cipolleschi

Differential Revision: D59848810

fbshipit-source-id: 2cc1d03b090d0aeb3886590ec0696f9c3a6556b9
2024-07-17 03:00:33 -07:00
Nicola Corti
8d0cbbf0e6 Make build_android publish to the staging repositories (#45468)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45468

This should greatly reduce the time spent on build_npm_package
because we're moving all the publishing logic to build_android.

I need to do a bit more testing with nightlies to make sure that everything is published correctly.

Changelog:
[Internal] [Changed] - Make build_android publish to the stating repositories

Reviewed By: cipolleschi

Differential Revision: D59804015

fbshipit-source-id: be3f0b6e16f5fdbf760ec7a5e16c8e258e06dd28
2024-07-16 13:58:43 -07: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
Nicola Corti
12f58a6452 Split the rntester APK artifacts in 4 (#45475)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45475

Instead of zipping all the RNTester's APK together, let's
upload them per buildVariant so it's easier to retrieve them later.

Changelog:
[Internal] [Changed] - Split the rntester APK artifacts in 4

Reviewed By: cipolleschi

Differential Revision: D59809721

fbshipit-source-id: 2d375475d5cee71c212f4d1f3a4a9edf3442358f
2024-07-16 10:01:21 -07:00
Nicola Corti
16b9b55cf1 actions/upload-artifact to v4.x
Summary:
We don't need to specify a minor/patch for actions/upload-artifact.
We also have all sorts of different versions scattered around the codebase.
This aligns them to the latest sable in the 4.x series.

Changelog:
[Internal] [Changed] - actions/upload-artifact to v4.x

Reviewed By: cipolleschi

Differential Revision: D59811525

fbshipit-source-id: 7264db097bcb2ff34b3ace467996e8308c0f2034
2024-07-16 10:01:21 -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
Riccardo Cipolleschi
3d5daa12d4 Factor out build-android (#45455)
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
2024-07-16 03:34:34 -07:00
Nicola Corti
cbcdb38433 Remove extra dot from close-pr.yml (#45441)
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
2024-07-15 08:36:26 -07:00
Riccardo Cipolleschi
d2773f0c19 Factor out build-hermesc-windows in separate action (#45432)
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
2024-07-15 05:50:21 -07:00
Blake Friedman
4e14c5eeab publish template on publishing release (#45327)
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
2024-07-15 05:35:33 -07:00
Rob Hogan
3603a22652 Include base64 in folly dependency, unbreak CI (#45417)
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
2024-07-12 11:13:44 -07:00
Riccardo Cipolleschi
1568a29144 Factor out build hermesc for Linux (#45402)
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
2024-07-12 03:21:39 -07:00
Riccardo Cipolleschi
7b424f090a Factor out build hermes Macos (#45371)
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
2024-07-11 03:50:15 -07:00
Riccardo Cipolleschi
0fd4a9447e Factor out hermes slice apple (#45359)
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
2024-07-10 06:38:49 -07:00
Riccardo Cipolleschi
b4b6614034 Factor out build hermesc apple (#45346)
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
2024-07-10 01:06:39 -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
b34b694f8e Move all custom actions to kebab-case (#45286)
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
2024-07-04 07:57:03 -07:00
Nicola Corti
c0977c39b9 Migrate analyse_code to GHA (#45247)
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
2024-07-03 05:49:47 -07:00
Nicola Corti
c25246044f Migrate test_js to GHA (#45246)
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
2024-07-02 05:17:33 -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
c911c89728 Setup git config --global --add safe.directory '*' when running jobs inside Docker (#45231)
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
2024-07-01 06:28:51 -07:00
Nicola Corti
e8d3ad7216 Let build_android produce a signed maven-local.zip archive (#45161)
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
2024-06-27 09:29:22 -07:00
Riccardo Cipolleschi
2adb389fac Disable unit tests for flakyness in CircleCI (#45133)
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
2024-06-27 09:27:24 -07:00
Riccardo Cipolleschi
cf8d3f8007 Port CI improvements from Release branch to main (#45175)
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
2024-06-27 04:11:44 -07:00
Alex Hunt
5f60ad65ca Rename set-rn-version script, mark as deprecated (#45184)
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
2024-06-26 10:14:12 -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
Blake Friedman
2d737bbf9a fix: podfile lock cache keys (#45128)
Summary:
These keys weren't evaluating`hashfiles(...)`.

{F1716603166}

## Changelog: [Internal]

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

Reviewed By: cipolleschi

Differential Revision: D58947839

Pulled By: blakef

fbshipit-source-id: d3c36235387a1c54f637b2b9bf53198bd29226e2
2024-06-24 09:40:43 -07:00
Riccardo Cipolleschi
42735717b5 Fix Cache checks in build_hermes_macos (#45127)
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
2024-06-24 05:54:30 -07:00
Nicola Corti
15909fab95 packages/react-native-gradle-plugin/ -> packages/gradle-plugin/ (#44832)
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
2024-06-21 01:08:00 -07:00
Riccardo Cipolleschi
75451d5b89 Fix yml syntax on main (#45084)
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
2024-06-20 07:49:52 -07:00
Riccardo Cipolleschi
9c6c637816 Refactor Hermes workspace (#45071)
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
2024-06-20 06:50:23 -07:00
Nicola Corti
a297b30377 Bump reactnativecommunity/react-native-android to 13.1 (#45073)
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
2024-06-20 06:04:45 -07:00
Riccardo Cipolleschi
ea31a79fe9 Fix build_android by setting git safe folders (#45065)
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
2024-06-20 03:24:29 -07:00
Riccardo Cipolleschi
90d4d55122 Port Create Release fixes from Stable to main (#45063)
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
2024-06-20 03:24:29 -07:00
Blake Friedman
927815b9f6 use correct has to label hermes cache key (#45061)
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
2024-06-19 05:00:41 -07:00
Nicola Corti
3fc6963da3 Fix release regex for publish-release workflow (#45043)
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
2024-06-18 10:09:29 -07:00
Nicola Corti
a272e8ee66 Remove unused rn-tester e2e tests (#45032)
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
2024-06-18 09:06:42 -07:00
Blake Friedman
64d5de7371 Add Android Helloworld test on PR (#45019)
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
2024-06-18 06:54:31 -07:00
Nicola Corti
37d7ec6522 Move test_android_helloworld to 4-core-ubuntu (#45023)
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
2024-06-18 05:25:22 -07:00
Blake Friedman
9491deda7a disable run-ci-e2e-tests which depend on template (#45009)
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
2024-06-17 08:02:27 -07:00
Blake Friedman
6f7eae5c58 fix disk utilisation step in GHA (#45006)
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
2024-06-17 06:18:18 -07:00
Blake Friedman
fa8ea481f0 Add more disk visibility on GHA Android builds (#45005)
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
2024-06-17 04:30:47 -07:00
Riccardo Cipolleschi
f1a362d834 Update the testing-script to use github actions (#44923)
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
2024-06-14 10:56:52 -07:00
Blake Friedman
2e2b71eeab replace test_android_template with test_android_helloworld (#44905)
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
2024-06-14 08:08:26 -07:00