Skip to content

ci(ios): cache React Native prebuilt tarballs - #4425

Merged
mfazekas merged 1 commit into
mainfrom
ci/cache-rn-prebuilt-tarballs
Oct 28, 2026
Merged

mfazekas merged 1 commit into
mainfrom
ci/cache-rn-prebuilt-tarballs

Conversation

@mfazekas

@mfazekas mfazekas commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

iOS CI downloads the React Native 0.84 prebuilt tarballs (reactnative-core-{debug,release}, reactnative-dependencies-debug) from repo1.maven.org on every run. When Maven is slow the job stalls or fails, e.g. job 122679390041 on #4424:

[ReactNativeCore] Downloading ReactNativeCore-prebuilt debug tarball from https://repo1.maven.org/.../react-native-artifacts-0.84.1-reactnative-core-debug.tar.gz to ../../ios/Pods/ReactNativeCore-artifacts/reactnative-core-0.84.1-debug.tar.gz
curl: (56) Recv failure: Operation timed out
[!] Error installing React-Core-prebuilt

The existing "Cache Pods" step never helped: uses: steps ignore defaults.run.working-directory, so its ios/Pods path doesn't exist and nothing was ever saved (its key also had a stray }). It is replaced by a cache of example/ios/Pods/ReactNativeCore-artifacts and ReactNativeDependencies-artifacts, keyed on the installed react-native package.json. RN's podspec helpers skip the download when the tarball is already in those directories.

Verification on this PR: the first run missed and saved the cache (Cache saved with key: rn-prebuilt-366dc891..., ~128 MB). The rerun restored it and pod install made no RN core/dependencies download:

Cache hit for: rn-prebuilt-366dc8919bb9077b9829b053563ee8be724861e4425230cb27d696c13fb88c6d
[ReactNativeDependencies] Source: {http: "file:///Users/runner/work/maps/maps/example/ios/Pods/ReactNativeDependencies-artifacts/reactnative-dependencies-0.84.1-debug.tar.gz"}
[ReactNativeCore] Using downloaded ReactNativeCore-prebuilt debug tarball at ../../ios/Pods/ReactNativeCore-artifacts/reactnative-core-0.84.1-debug.tar.gz
[ReactNativeCore] Using downloaded ReactNativeCore-prebuilt release tarball at ../../ios/Pods/ReactNativeCore-artifacts/reactnative-core-0.84.1-release.tar.gz

The [ReactNativeDependencies] Using tarball from URL line is still logged, but the source is the local file. Hermes still comes from Maven, because CocoaPods fetches its pod source URL directly. Caches saved on a PR branch are only visible to that branch, so other PRs, including fork PRs, start using it once main has saved it after merge.

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

@mfazekas
mfazekas marked this pull request as ready for review October 28, 2026 20:48
@mfazekas
mfazekas merged commit bb3f75c into main Oct 28, 2026
20 checks passed
@mfazekas
mfazekas deleted the ci/cache-rn-prebuilt-tarballs branch October 28, 2026 20:49

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant