Restore-cache from Linux instance on macOS machine

restore_cache and save_cache do not appear to work when setting the cache on a linux instance and restore_cache on a MacOS instance.

Is there any way to get around this? Other means of caching across these boundaries

restore_cache output on the MacOS. It looks like the directory roots are different across

Found a cache from build 231 at source-codebase-feature-1-circleci-d4545775ec75693f39625a982fc605d838ec66f7
Size: 681 MB
Cached paths:

  • /home/circleci/projects/amazillo/codebase

Downloading cache archive…
Unarchiving cache…
home/circleci/projects/amazillo/codebase/: Failed to create dir 'home/circleci’Can’t create ‘home/circleci/projects/amazillo/codebase’
home/circleci/projects/amazillo/codebase/.circleci/: Failed to create dir 'home/circleci’Can’t create ‘home/circleci/projects/amazillo/codebase/.circleci’
home/circleci/projects/amazillo/codebase/.circleci/config.yml: Failed to create dir 'home/circleci’Can’t create ‘home/circleci/projects/amazillo/codebase/.circleci/config.yml’

This is not necessarily a supported model, what exactly are you trying to do here?

Sorry. To be clear, I see what you are trying to do, I am trying to understand why? :slight_smile:

Hey! I have to do some authentication via linux@ environment, which I cannot do via MacOS. I’ve done this already without any issue, I just have no way of getting those files on the linux instance to MacOS because of this incompatibility.

So passing an auto generated swift file based on authentication done through Linux, that is required on the MacOS side, so I can properly compile and do some end to end testing.

Hey there, that makes sense. You are going to have a really hard time doing this with the cache. I would suggest looking into using workspaces instead: https://circleci.com/docs/2.0/concepts/#workspaces-and-artifacts

This means you need to use workflows, and have the MacOS job depend on the Linux job.

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