Skip to content

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

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

build-ios downloads the React Native 0.84 prebuilt tarballs (reactnative-core-{debug,release}, reactnative-dependencies-debug) from repo1.maven.org in pod install, and stalled twice on that download in #28. Most PRs never reach pod install because the turborepo build:ios cache hits and skips it. That's the cache other PRs benefit from. It misses whenever a PR touches ios/, example/ios, the podspec or src/, and then every run downloads from Maven again. The steps.cocoapods-cache condition on "Install cocoapods" pointed at a step that doesn't exist.

This caches 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 there. The dead condition is removed. build-expo-ios already restores these directories as part of its expo-example/ios/Pods cache.

Verification, with a temporary example/ios/Podfile edit (since dropped) to force a turbo miss: the first run reproduced the stall (curl: (56) Recv failure: Operation timed out on the dependencies tarball after 17 min, then Connection reset by peer on the core tarball; cancelled after an hour). The rerun downloaded normally and saved macOS-rn-prebuilt-366dc891.... The next rerun restored it and pod install made no RN core/dependencies download:

Cache hit for: macOS-rn-prebuilt-366dc8919bb9077b9829b053563ee8be724861e4425230cb27d696c13fb88c6d
[ReactNativeDependencies] Source: {http: "file:///Users/runner/work/navigation/navigation/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

Caches saved on a PR branch are only visible to that branch. Other PRs, including fork PRs, get this one once main saves it, which happens on the first push to main that misses the turbo cache. Hermes still comes from Maven, because CocoaPods fetches its pod source URL directly.

@mfazekas
mfazekas force-pushed the ci/cache-rn-prebuilt-tarballs branch from 77cb82d to 58ff164 Compare October 28, 2026 11:44
@mfazekas
mfazekas marked this pull request as ready for review October 28, 2026 20:19
@mfazekas
mfazekas merged commit 9ca0070 into main Oct 28, 2026
6 checks passed
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