Carthage Cache

#1

Description of the issue

Hello,

I have a workflow for iOS that runs every night and I use Carthage and Cache Pull / Push steps. And it seems that Carthage does not use the cache even if the Cache Pull step says “Downloading and extracting cache archive”, then the Carthage step says “cache available: false”.

When running the same workflow multiple time during the day the cache works but when it’s been a long time I did not run it it seems not to use the cache.

Maybe I am missing something?

0 Likes

#2

Hy there! with what command are you using carthage?
the bootstrap command is caching really hard
also here is guide on caching directly

0 Likes

#3

Yes I am using the bootstrap command:

Yes I am using the bootstrap command and already followed the guide about Carthage dependencies.

 - cache-pull@2.0.1: {}
 - carthage:
      inputs:
        - carthage_command: bootstrap
        - carthage_options: "--platform iOS"
 - cache-push@2.0.5:
        inputs:
        - cache_paths: |-
            $BITRISE_CACHE_DIR
            ./Carthage -> ./Carthage/Cachefile
0 Likes

#4

when you said you did not build for a long time, you mean by hand on the website, or the scheduled build as well? for the cache is deleted after a week if you don’t build :thinking:

also, Could you enable support user on the app’s settings tab, so I could check out some setups, and try a few test builds if it’s ok with you?

0 Likes

#5

The scheduled build as well. Like after 2 days for example it does not use the Cache. And I think even 24 hours between the same builds.

I enabled support user :slight_smile:

0 Likes

#6

Hy, sorry for the late reply, could you send me a link as well to the app? I can’t just reach it out of nowhere :upside_down_face:

0 Likes

#7

Oh sorry :smile:

Here’s the link https://app.bitrise.io/app/ee9193a1669ec395

0 Likes

#8

as far as I see there is a 480mb cache for that workflow :thinking:
so it must be doing something, 47

0 Likes

#9

Yes, I saw that but I don’t understand why the Carthage steps says there isnt any cache available

0 Likes

#10

Could you try the 3.1.5 version of carthage?

0 Likes

#11

Hmm it doesn’t work either, still the same

The documentation about caching says

The build on a non-default branch, to speed things up, can access (read-only) the cache of the primary branch, until a successful build is found on the new branch. Once a build on the new branch pushes a cache, new builds on that branch will get the cache of the branch. *Caches are stored and available for every branch separately.

So if I run a workflow on a new branch shouldn’t it get the cache from my default branch?

0 Likes

#12

If there is available cache on that branch, then you should be able :thinking:
did you have a successful build on the main branch that did save cache?

0 Likes

#13

Yes, I had a successful build, I set the default branch to a specific one, not the master

And I still have a build like the screenshot I posted

0 Likes

#14

Hy there, I’m really sorry for the late reply😢

Could you enable debug mode for the cache push pull steps?
also add a script step before the carthage step to log out the /Users/vagrant/git/Carthage folder

0 Likes

#15

Hi,

I enabled it. Did you want me to list all the file in the /Users/vagrant/git/Carthage?

0 Likes

#16

Hy, sorry yes that would be the idea, also there is a new version for cache push, I hope it can solve this problem for good :upside_down_face:
and sorry for the late response.

0 Likes

closed #17

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

0 Likes