Enable caching on Appveyor

I have a package with some large dependencies that takes anywhere from 30 mins to hitting the 1h auto-cancel time limit on appveyor. It would be really nice to cache the built versions of the larger/slower dependencies on appveyor to speed testing up, and avoid the 1h limit.

Has anyone achieved caching with packages? Purely adding the package dirs to appveyor.yml doesn’t work. i.e.

cache:
  - C:\Users\appveyor\.julia\packages\Homebrew
  - C:\Users\appveyor\.julia\packages\WinRPM
  - C:\Users\appveyor\.julia\packages\Cairo
  - C:\Users\appveyor\.julia\packages\Gtk

maybe Build cache | AppVeyor can help?

1 Like

As a follow up here, the caching needs to be enabled in the repo settings.

VideoIO is now restoring some package directories from cache now. However, it still seems to be building those packages (which is what we were trying to avoid by doing this). Is there anything that can be done on the Julia side to get it to use the existing cached packages? Or is there something obvious that also needs to be cached for this to work?

Thanks,
Kevin

Actually, I take that back. It updated three of the cached packages (which were re-cached), and the rest seem to have just worked!

I might be wrong, but I think that it’s still rebuilding all the packages, it’s just that some of the packages have identical builds once finished to the prior cached versions.

Yeah, I think you’re right. :confused:

I think this issue goes beyond CI setups… Given that these packages rebuild every time on my local machine, I suspect there would need to be a build instruction to specifically say don’t rebuild these dependencies [x,y,z]. i.e. Pkg.build(String; skipdeps=Vector{String})

On a related note, why do a lot of the VideoIO dependencies build so much slower on windows? It’s not just appveyor vs travis cpu speeds, I see it on local machines. Is windows just generally slower on builds?