Disable build cache for tagged builds

Lilith River's Avatar

Lilith River

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. 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?
    Ilya.

  2. 2 Posted by Lilith River on 13 Mar, 2017 10:43 PM

    Lilith River's Avatar

    That sounds perfect! What about question A?

  3. 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 Lilith River on 13 Mar, 2017 10:52 PM

    Lilith River's Avatar

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

  5. 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?

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

    Lilith River'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. 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.

  8. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:15 AM.

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