Disable build cache for tagged builds

Nathanael Jones's Avatar

Nathanael Jones

11 Mar, 2017 04:18 AM

When a tagged build occurs, I don't want to pollute the main build cache.

A) Are build caches per matrix separate (like 64 vs. 32-bit)
B) Can I 'opt-out' of uploading the new cache for a tagged commit (or is there any mechanism to opt-out of overwriting the cache)

  1. Support Staff 1 Posted by Ilya Finkelshte... on 13 Mar, 2017 10:22 PM

    Ilya Finkelshteyn's Avatar

    Hi Nathanael,

    We do not see easy way to do this currently. Do you think if we introduce "tweak" environment variable APPVEYOR_SKIP_BUILD_CACHE_SAVE, which if set to true makes build process skip cache saving. Therefore you will be able to add statement like IF ($env:APPVEYOR_REPO_TAG -eq $true) {$env:APPVEYOR_SKIP_BUILD_CACHE_SAVE = $true} or even simple $env:APPVEYOR_SKIP_BUILD_CACHE_SAVE = $env:APPVEYOR_REPO_TAG.

    Alongside with this we can add APPVEYOR_SKIP_BUILD_CACHE_RESTORE for similar scenarios but related to cache restore.

    What do you think?

  2. 2 Posted by Nathanael Jones on 13 Mar, 2017 10:43 PM

    Nathanael Jones's Avatar

    That sounds perfect! What about question A?

  3. Support Staff 3 Posted by Ilya Finkelshte... on 13 Mar, 2017 10:51 PM

    Ilya Finkelshteyn's Avatar

    OK, good, please watch this GH issue. It should not take long to implement.

    Sorry for missing question A. Can you elaborate it a little bit more? Does it mean you need to set different cache folders depending on matrix dimension?

  4. 4 Posted by Nathanael Jones on 13 Mar, 2017 10:52 PM

    Nathanael Jones's Avatar

    Different cache based on x86 or x86_64, in my case.

  5. Support Staff 5 Posted by Ilya Finkelshte... on 13 Mar, 2017 11:31 PM

    Ilya Finkelshteyn's Avatar

    Hope understand the problem correctly. Do you think something like this could help?

    - x86
    - x64
    - if "%PLATFORM%"=="x86" SET CACHE_FOLDER=C:\FOO
    - if "%PLATFORM%"=="x64" SET CACHE_FOLDER=C:\BAR
    cache: $(CACHE_FOLDER)
  6. 6 Posted by Nathanael Jones on 13 Mar, 2017 11:42 PM

    Nathanael Jones's Avatar

    Wouldn't that just alterate deleting the other (missing) dir? I'd hope for
    something like CACHE_KEY where it just changes the cloud storage slot.

  7. Support Staff 7 Posted by Ilya Finkelshte... on 14 Mar, 2017 06:08 AM

    Ilya Finkelshteyn's Avatar

    Nathanael, sorry for confusion, I misunderstood your question. Yes, build caches per matrix separate, they are separated by job name.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? 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