actions / actions/cache

Caching CocoaPods takes long time to restore

Open
#1,592 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

I am trying to setup Github action for running unit tests on the iOS project but I am getting strange results while executing it.

First build without cached CocoaPods is taking around 25 min but if cache is available just for restoring it, it takes more then a hour just for that step. I am not sure if I am doing something wrong but I would say that everything is set as it should be.

Also tried to change paths for caching step, always getting same result, and build speed is not changed at all.

First build, cache not uploaded:
Image

Cache exists:

Image

Cache step:
# CocoaPods cache - name: Cache CocoaPods uses: actions/cache@v4 with: path: | App/Pods ~/Library/Caches/CocoaPods ~/.cocoapods key: ${{ runner.os }}-pods-${{ hashFiles('**/versionFile.swift') }} restore-keys: | ${{ runner.os }}-pods-${{ hashFiles('**/versionFile.swift') }}

Any ideas?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file, test, or entry point is named. Start with the supplied workflow's actions/cache@v4 step and its restore logs, compare the uncached and cached runs, and determine whether the reported CocoaPods paths or cache behavior explains the delay; done requires a reproducible cause and a clearly validated fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, ios
Domain
ci-cd, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.