Repository navigation
ci(ios): cache React Native prebuilt tarballs - #4425
Merged
Merged
Conversation
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:The existing "Cache Pods" step never helped:
uses:steps ignoredefaults.run.working-directory, so itsios/Podspath doesn't exist and nothing was ever saved (its key also had a stray}). It is replaced by a cache ofexample/ios/Pods/ReactNativeCore-artifactsandReactNativeDependencies-artifacts, keyed on the installed react-nativepackage.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:The
[ReactNativeDependencies] Using tarball from URLline 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
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)