Skip to content

ci: cache CI dependencies to reduce PR workflow runtime#753

Draft
nickolas-dimitrakas wants to merge 6 commits intomainfrom
ci/cache-ci-dependencies
Draft

ci: cache CI dependencies to reduce PR workflow runtime#753
nickolas-dimitrakas wants to merge 6 commits intomainfrom
ci/cache-ci-dependencies

Conversation

@nickolas-dimitrakas
Copy link
Copy Markdown
Contributor

@nickolas-dimitrakas nickolas-dimitrakas commented Apr 14, 2026

Background

PR workflow jobs in `build-kits` were taking 15-19 minutes each because third-party SDKs (Firebase, Airship, Rokt) were being downloaded and compiled from scratch on every run with no caching.

Profiled from CI run #24418060388:

Job Duration
Pod Lint urbanairship-19 18m 55s
Build firebase-ga4-12 17m 49s
Build firebase-ga4-11 16m 23s
Build firebase-11 15m 59s
Build urbanairship-20 15m 13s
Build rokt 13m 6s

What Has Changed

build-kits.yml

  • Added actions/cache@v5.0.5 for ~/.cocoapods and ~/Library/Caches/CocoaPods in pod-lint-kits, keyed per-kit by podspec hash + weekly window — avoids re-downloading Airship/Firebase on every lint run; weekly window ensures new upstream releases are picked up
  • Added full DerivedData cache in build-kits, key computed via shell find | shasum across kit source files + core SDK source files (mParticle-Apple-SDK/**, mParticle-Apple-SDK-Swift/**) — enables incremental xcodebuild instead of full recompilation on warm runs; busts on any kit or core SDK change
  • Added timeout-minutes: 30 to both pod-lint-kits and build-kits jobs to enforce the target CI runtime
  • Reduced fetch-depth from 01 (full git history not needed for builds)

build-and-lint.yml

  • Added gem cache (~/.gem) for xcodeproj; switched to user-level gem install

cross-platform-tests.yml

  • Added gem cache (~/.gem) for cocoapods + cocoapods-generate, keyed by Podfile.lock

integration-tests.yml

  • Added actions/cache@v5.0.5 for WireMock JAR, keyed by version — skips Maven Central download on cache hit

All actions/cache references pinned to SHA (v5.0.5).

Screenshots/Video

N/A

Checklist

  • Self-review completed
  • Tests added or updated
  • Tested locally

Additional Notes

Cold runs (first PR after a cache miss) remain as today. On warm runs (no source changes), kit builds should drop from 15-18 min to ~2-5 min via incremental xcodebuild. Monitor GitHub Actions cache storage in Settings → Actions → Caches — Firebase DerivedData is large (1-3 GB per kit) and may approach the 10 GB repo limit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 14, 2026

📦 SDK Size Impact Report

Measures how much the SDK adds to an app's size (with-SDK minus without-SDK).

Metric Target Branch This PR Change
App Bundle Impact 1.75 MB 1.75 MB +N/A
Executable Impact 848 bytes 848 bytes +N/A
XCFramework Size 6.38 MB 6.38 MB +N/A

➡️ SDK size impact change is minimal.

Raw measurements

Target branch (main):

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1876,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1792,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6528}

This PR:

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1876,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1792,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6528}

@nickolas-dimitrakas nickolas-dimitrakas self-assigned this Apr 14, 2026
nickolas-dimitrakas and others added 5 commits April 14, 2026 16:55
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rmat() limitation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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