Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/facebook/react-native.git. Pull mirroring updated .
  1. Dec 13, 2024
    • Nick Gerleman's avatar
      Remove home-rolled yarn caching (#48237) · a28867f9
      Nick Gerleman authored
      Summary:
      Pull Request resolved: https://github.com/facebook/react-native/pull/48237
      
      Noticed this when trying to diagnose what seemed like a stale caching issue. It effectively reverts D59917944.
      
      D59917944 added logic to only do yarn caching on main, but it has some correctness issues:
      1. We cache `node_modules` instead of the yarn cache, which may contain e.g. build artifacts, or other scratch/cache files written (such as anything that writes to `node_modules/.cache`). We really want to be caching the yarn cache, which has pristine packages before install, which I think it will also need to perform the real install anyways.
      2. We key the cache on root `package.json`, which is missing a lot of information (both provided by the other `package.json` in the repo, but mostly, the lockfile resolution).
      
      We only save cache when we're on `refs/heads/main` (so continuous builds against main), and supposedly, builds against base branch should be able to restore against those, but recent PR jobs I have seen, where `package.json` has not changed, all have `Cache not found for input keys: node-modules-068350889e87919c1c6c2c220c8d2d92db13f38820bf2efb315d1274b97bc367`
      
      Because of the potential correctness issues, and that the strategy for limiting to main seemingly is not allowing cache to be used in PR, this diff goes back to previous solution, which may store more artifacts (but working cache should also reduce cost by making jobs run faster).
      
      Changelog: [Internal]
      
      Reviewed By: cipolleschi
      
      Differential Revision: D67140004
      
      fbshipit-source-id: f74074a498af56b1837fa23cf80795f76935b762
      a28867f9
  2. Oct 17, 2024
  3. Oct 16, 2024
  4. Sep 13, 2024
    • Riccardo Cipolleschi's avatar
      Exclude dSYM from the archive (#46472) · f529fe48
      Riccardo Cipolleschi authored
      Summary:
      Pull Request resolved: https://github.com/facebook/react-native/pull/46472
      
      Currently, we are building the Debug symbols (dSYM) for hermes dSYM but we are not shipping them with the xcframework.
      This is correct, because Debug symbols can increase the size of Hermes thus enalrging the iOS IPA and increasing the download time when installing pods.
      
      We distribute the dSYM separatedly, in case users needs to symbolicate Hermes stack traces.
      
      However the path to the dSYM still appears in the Info.plist of the universal XCFramework and this can cause issues when submitting an app to apple.
      
      This change should remove those lines from the universal framework.
      
      It fixes https://github.com/facebook/react-native/issues/35863
      
      ## Changelog
      [Internal] - Remove dSYM path from Info.plist
      
      Reviewed By: cortinico
      
      Differential Revision: D62603425
      
      fbshipit-source-id: 038ec3d6b056a3d6f5585c8125d0430f56f11bb9
      f529fe48
  5. Sep 08, 2024
    • Riccardo Cipolleschi's avatar
      Zip slices to preserve symlinks (#46387) · d424c244
      Riccardo Cipolleschi authored
      Summary:
      When creating Hermes in CI, we build it for MacOS and Mac Catalyst as well.
      The slices for these platforms requires symlinks to work properly.
      The upload artifacts action on github, when applied to folders, follows the symlinks and copies the destination folder. The result is that Hermes for macOS and Catalyst does not work as expected.
      
      This should fix https://github.com/facebook/react-native/issues/46213.
      
      ## Changelog:
      [Internal] - Build Hermes in CI properly
      
      Pull Request resolved: https://github.com/facebook/react-native/pull/46387
      
      Test Plan: Tested already in 0.75
      
      Reviewed By: robhogan
      
      Differential Revision: D62355050
      
      Pulled By: cipolleschi
      
      fbshipit-source-id: 7abb85c8a2a88f13e06a49c6cb0caccbdad4551a
      d424c244
  6. Aug 06, 2024
    • Riccardo Cipolleschi's avatar
      Try to restore caches for Hermes (#45908) · 24e7f7d2
      Riccardo Cipolleschi authored
      Summary:
      We had CI on main failing consistently the past couple of days.
      The problem is that the hermes pipeline is failing to create the iOS XCFramework with the error:
      > unable to create a Mach-O from the binary at '/Users/runner/work/react-native/react-native/packages/react-native/sdks/hermes/destroot/Library/Frameworks/catalyst/hermes.framework/hermes'
      
      The main cause is this upgrade of [upload-artifacts](https://github.com/actions/upload-artifact/issues/590) which breaks symlinks.
      
      The solution is to bump the caches and downgrade the `upload-artifact` actions.
      ## Changelog:
      [Internal] - Try to fix CI for Hermes
      
      Pull Request resolved: https://github.com/facebook/react-native/pull/45908
      
      Test Plan: GHA must be green
      
      Reviewed By: cortinico
      
      Differential Revision: D60828616
      
      Pulled By: cipolleschi
      
      fbshipit-source-id: 6976b86dd67e2fd9d806ebaa62f47e39dc44b30d
      24e7f7d2
  7. Jul 20, 2024
    • Blake Friedman's avatar
      Only cache node_modules on main (#45544) · 4410899e
      Blake Friedman authored
      Summary:
      Pull Request resolved: https://github.com/facebook/react-native/pull/45544
      
      ## This diff now does 5 things:
      1. removes the old way we used `actions/setup-node` to manage the cache itself.
      2. it creates a new `update-node-modules-cache` workflow, which is the only job that will update the node modules cache
      3. it create a `yarn-install-with-cache` action that should be used install of directly calling `yarn install --non-interactive`.  This will load a cache against a hash of `package.json`.
      4. updated the cache reaper to aggressively remove everything but the latest `npm-{{ hash('package.json') }}`.
      5. removed a `cache-setup`, which couldn't be used (we're using artefacts now).
      
      ## Why are we doing this:
      The various `node-cache-` keys for platforms and on various branches accounts for a very large proportion of the cache (10-20%).
      
      We don't frequently change these dependencies, and even when we do running `yarn install` after loading the cache will resolve any issues.
      
      Limiting the cache to `main` and aggressively pruning older cache entries will clean up a lot of "small win" caching.
      
      Changelog: [Internal]
      
      Reviewed By: cortinico
      
      Differential Revision: D59917944
      
      fbshipit-source-id: 4be6f1959e8fde642a4f208f7d19aceba2c3262f
      4410899e
  8. Jul 19, 2024
    • Nicola Corti's avatar
      Align github/* action versions on major (#45542) · 818dd92a
      Nicola Corti authored
      Summary:
      Pull Request resolved: https://github.com/facebook/react-native/pull/45542
      
      As we do have several version numbers for external actions all across the codebase,
      here I'm aligning all of them to just use the majors.
      
      I'm doing it only for GitHub first party actions as we trust them,
      so minor/patch changes can safely be pulled in without code changes.
      
      Changelog:
      [Internal] [Changed] - Align github/* action versions on major
      
      Reviewed By: cipolleschi, blakef
      
      Differential Revision: D59959978
      
      fbshipit-source-id: bb07ce0dfd74d9502a2ac0ea90a2b32f55d6d655
      818dd92a
  9. Jul 17, 2024
    • Nicola Corti's avatar
      Composite actions inputs should be kebab-case (#45474) · c1b4133a
      Nicola Corti authored
      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
      c1b4133a
    • Nicola Corti's avatar
      actions/upload-artifact to v4.x · 16b9b55c
      Nicola Corti authored
      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
      16b9b55c
  10. Jul 11, 2024