Skip to content

ci: cache CocoaPods downloads in sample app builds - #695

Merged
mahmoud-elmorabea merged 3 commits into
mainfrom
ci/pods-download-cache
Nov 2, 2026
Merged

mahmoud-elmorabea merged 3 commits into
mainfrom
ci/pods-download-cache

Conversation

@mahmoud-elmorabea

@mahmoud-elmorabea mahmoud-elmorabea commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

The iOS sample build's CocoaPods cache has never saved anything. This points it at a path that exists.

Problem: the cache step uses example/Pods, but the Podfile is in example/ios, so the path never exists. All 4 iOS build logs I checked show Cache not found followed by Path Validation Error: ... no cache is being saved, and the repository holds no macOS-APN-Pods or macOS-FCM-Pods caches.

Change: cache CocoaPods' own download cache (~/Library/Caches/CocoaPods) only. ~/.cocoapods is left out on purpose: it holds the trunk CDN index, and the APN trunk check runs pod install --no-repo-update, so a restored index could hide a newly released CustomerIO version. The key prefix is PodsDownloads so earlier caches that included ~/.cocoapods are never restored. The generated example/ios/Pods is still rebuilt every run, so there is no stale-project risk.

Measured (one cold run, then one restored run per job, same ref):

Job Install dependencies for sample app pod install
APN 121 s cold, 72 s restored 56 s cold, 27 s restored
FCM 189 s cold, 123 s restored 100 s cold, 57 s restored

That is about 0.8 to 1.1 minutes per iOS job. Each figure is one pair of runs, so treat it as unconfirmed; baselines on this runner swing widely between attempts. The restored APN run still passed the trunk check.

Cost to watch: each cache is about 127 MB, and each PR ref saves its own.

Revert by restoring the old path.

🤖 Generated with Claude Code

mahmoud-elmorabea and others added 2 commits October 30, 2026 23:16
The Pods cache step saved nothing because its path, example/Pods, does not
exist; the Podfile is in example/ios. Cache CocoaPods' own download cache so
the second and later runs of an iOS build can reuse downloaded pods.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Empty commit. The first run on this ref saved the CocoaPods download cache; this run should restore it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mahmoud-elmorabea
mahmoud-elmorabea marked this pull request as ready for review October 30, 2026 20:34
@mahmoud-elmorabea
mahmoud-elmorabea requested a review from a team as a code owner October 30, 2026 20:34
Comment thread .github/workflows/build-sample-app.yml Resolved
Drop ~/.cocoapods so a restored trunk CDN index cannot hide a newly
released CustomerIO version from the APN trunk check. The key prefix
changes so earlier caches that include ~/.cocoapods are not restored.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mahmoud-elmorabea
mahmoud-elmorabea merged commit f3036f5 into main Nov 2, 2026
39 checks passed
@mahmoud-elmorabea
mahmoud-elmorabea deleted the ci/pods-download-cache branch November 2, 2026 21:38
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.

2 participants