How to create separate build cache for each platform
I have a NodeJS (electron) project that gets built on multiple platforms (e.g. Linux & Windows) with the same appveyor.yml (and would like to keep it this way). However, some of the node_modules are platform-specific (i.e. compiled addons), such as node-serialport. Ideally, I'd like to cache node_modules between builds since installing dependencies seems to consume a significant amount of the build time, but I think the jobs are each overwriting each others' cache. Is there a way to specify that a separate cache be used for each image/platform?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

1 Posted by Ilya Finkelshte... on 24 May, 2018 06:40 PM
Cache is job-specific.Issue you maybe hit is that we have few network segments and each with it's own cache server. It can take several builds for cache to populate everywhere.
2 Posted by jacobq on 24 May, 2018 08:32 PM
Ah, OK, so the VS2017 image will only get cached data from previous VS2017 builds and likewise for Ubuntu. That's what I want. There's one more part of this though, and that is that I would like to be able to select different directories to cache on different platforms/images/jobs. For example, instead of this:
can I do something like this?
3 Posted by Ilya Finkelshte... on 24 May, 2018 08:46 PM
Please try https://www.appveyor.com/docs/build-configuration/#specializing-mat.... Let us know how it goes. We implemented this feature exactly for cases like this. It is pretty new and we are very interested to hear how it is being used.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:28 AM.