Skip to content

feat: add CocoaPods specs cache to iOS production build#29798

Merged
Qbandev merged 2 commits into
mainfrom
feat/mcwp-574-cocoapods-specs-cache
May 7, 2026
Merged

feat: add CocoaPods specs cache to iOS production build#29798
Qbandev merged 2 commits into
mainfrom
feat/mcwp-574-cocoapods-specs-cache

Conversation

@Qbandev
Copy link
Copy Markdown
Contributor

@Qbandev Qbandev commented May 6, 2026

Description

The iOS production build in build.yml runs pod install without caching ~/.cocoapods/repos (the CocoaPods specs repository). Every run downloads the full specs catalog from CDN, taking ~1m 36s.

This PR adds an actions/cache@v4 step before pod install that caches ~/.cocoapods/repos keyed on ios/Podfile.lock. On cache hit, pod install resolves specs locally instead of fetching from CDN. Uses continue-on-error: true so cache failures never block the build.

This matches the existing pattern in .github/actions/setup-e2e-env/action.yml (lines 382-391).

Changelog

CHANGELOG entry: null

Related issues

Fixes: MCWP-574

Manual testing steps

Feature: CocoaPods specs caching in iOS production build

  Scenario: First run populates the cache (cache miss)
    Given a production iOS build is triggered via workflow_dispatch
    And no prior CocoaPods specs cache exists for the current Podfile.lock

    When the "Restore CocoaPods specs cache (iOS)" step runs
    Then the step logs show "Cache not found"
    And "Install CocoaPods dependencies (iOS)" completes successfully at baseline timing (~1m 36s)

  Scenario: Subsequent run restores the cache (cache hit)
    Given a production iOS build is triggered via workflow_dispatch
    And a CocoaPods specs cache exists from a previous run

    When the "Restore CocoaPods specs cache (iOS)" step runs
    Then the step logs show "Cache restored"
    And "Install CocoaPods dependencies (iOS)" completes faster (~30s-1m less)
    And the build produces a valid IPA artifact

  Scenario: Cache failure does not block the build
    Given the cache action encounters an error (network issue, quota exceeded)

    When the "Restore CocoaPods specs cache (iOS)" step fails
    Then the step is marked as successful due to continue-on-error: true
    And "Install CocoaPods dependencies (iOS)" proceeds normally with a full CDN fetch

Screenshots/Recordings

N/A - CI workflow change only, no UI impact.

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Cache ~/.cocoapods/repos using actions/cache@v4 keyed on
ios/Podfile.lock so pod install resolves specs locally on
cache hit instead of fetching from CDN.

Ref: MCWP-574
@Qbandev Qbandev requested a review from a team as a code owner May 6, 2026 14:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions github-actions Bot added pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-XS labels May 6, 2026
@Qbandev Qbandev added team-dev-ops DevOps team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels May 6, 2026
@Qbandev Qbandev requested a review from Copilot May 6, 2026 14:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR speeds up iOS production CI builds by restoring a cached CocoaPods specs repository before running pod install, avoiding repeated full specs downloads from the CDN on every run.

Changes:

  • Add an actions/cache@v4 step in the iOS path of .github/workflows/build.yml to cache ~/.cocoapods/repos.
  • Key the cache on ios/Podfile.lock (with a restore prefix) and make cache failures non-blocking via continue-on-error: true.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Qbandev Qbandev removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 92%
click to see 🤖 AI reasoning details

E2E Test Selection:
The only changed file is .github/workflows/build.yml (CI configuration). There are no changes to application source code, controllers, UI components, navigation, Engine initialization, or test infrastructure within the app itself. Therefore, there is no direct or indirect impact on wallet functionality, user flows, confirmations, network handling, onboarding, browser, swaps, perps, predictions, snaps, or multi-chain features.

While workflow changes can affect the CI pipeline (build, test execution, caching, artifacts), they do not introduce runtime behavior changes in the mobile app. Functional E2E coverage is not required to validate feature behavior. Pipeline validation will occur naturally when CI runs the configured jobs.

Given the absence of app-level changes, no Detox E2E feature tags are required for risk mitigation.

Performance Test Selection:
No application code, rendering logic, state management, controllers, or initialization paths were modified. Therefore, there is no potential performance impact to app launch, onboarding, login, asset loading, swaps, predictions, or perps flows.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

@Qbandev Qbandev added the Code Impact - Low Minor code change that can safely applied to the codebase label May 6, 2026
@Qbandev Qbandev added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit ae4e8f0 May 7, 2026
60 checks passed
@Qbandev Qbandev deleted the feat/mcwp-574-cocoapods-specs-cache branch May 7, 2026 06:56
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Code Impact - Low Minor code change that can safely applied to the codebase no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.77.0 Issue or pull request that will be included in release 7.77.0 size-XS team-dev-ops DevOps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants