Coder Social home page Coder Social logo

Cache Behaviour about run-vcpkg HOT 14 CLOSED

lukka avatar lukka commented on May 25, 2024
Cache Behaviour

from run-vcpkg.

Comments (14)

spinicist avatar spinicist commented on May 25, 2024 1

Hello - finally had a chance to try. Sadly it looks like it doesn't play well with Manifest mode? Since originally raising this I've swapped to manifest mode and it looks like all my dependencies are being rebuilt at the configure. Will continue discussion over on #53

from run-vcpkg.

lukka avatar lukka commented on May 25, 2024
  1. the cache is stored only on successful workflows. It could be possible to let the user control this behavior by changing post-if: 'success()' into an expression which includes a variable controlled indirectly by the user. This is something that needs to be explored since I see no actual examples for doing this.
  2. can you provide the links of the workflow runs' logs, ideally with the ACTION_STEPS_DEBUG set to true ?

from run-vcpkg.

spinicist avatar spinicist commented on May 25, 2024
  1. If you have time to implement something like this I think it could be very useful.
  2. The workflow is running now.

Previous build that stored a cache is here (didn't have ACTION_STEPS_DEBUG set to true): https://github.com/spinicist/QUIT/actions/runs/145378853
First build (no tag, finds the cache) is here: https://github.com/spinicist/QUIT/actions/runs/145949044
Second build (tag, does not find the cache) is here: https://github.com/spinicist/QUIT/runs/802718822?check_suite_focus=true

If you need the full logs then the 2nd build is going to take 30-40 minutes to finish.

from run-vcpkg.

lukka avatar lukka commented on May 25, 2024
  1. agreed.
  2. the only explanation I can think of is that those are two different workflows, and the cache is scoped per workflow. There is no single mention of this on the documentation though. In fact the cache keys computed by the run-vcpkg action, up to the URLs used by the called actions/cache APIs (i.e. the one at ##[debug]Resource Url:) are identical in both workflows.

from run-vcpkg.

PazerOP avatar PazerOP commented on May 25, 2024
  1. Couldn't you just merge the "post" action into the run-vcpkg action itself? I might be missing something, but I don't see why it has to be two separate steps.

from run-vcpkg.

lukka avatar lukka commented on May 25, 2024

@PazerOP that's right, the restore/save could be done in the same step (i.e. inside the run-vcpkg action, no need for the post-action for the saving of the cache). The post-action step stem from the original idea was to save the cache only when all the workflow was completed successfully.

from run-vcpkg.

Shatur avatar Shatur commented on May 25, 2024

I have a question about cache. The first time my build was successful and cached. But after that, the setup still took 2.5 hours. With the following output:

Restore vcpkg and its artifacts from cache
  Cache's key = 'localGitId=2106721475-args=-800282226-os=1553167195-appendedKey=42'.
  Running restore-cache
  Cache Size: ~973 MB (1020766370 B)

from run-vcpkg.

lukka avatar lukka commented on May 25, 2024

@Shatur95 you are right that the behavior is unexpected indeed, it is due to the fact that the vcpkgCommitId must not contain a tag (nor a branch). In your workflow i see a tag being used. Just replace the tag with its resolved commit id and then it will work properly.

The input is properly documented, but probably the action should just error out in case its value is not a commit id.

I'd suggest opening an issue (and what about a PR, that is even better :D ) about improving the management of the vcpkgCommitId input.

from run-vcpkg.

Shatur avatar Shatur commented on May 25, 2024

Thanks for the explanation! Opened #47. I would like to send a PR, but I do not know TS :D

from run-vcpkg.

lukka avatar lukka commented on May 25, 2024

please verify lukka/run-vcpkg@v5 suits your needs, thanks!

from run-vcpkg.

vadi2 avatar vadi2 commented on May 25, 2024

This is a fantastic change 👍

from run-vcpkg.

magnesj avatar magnesj commented on May 25, 2024

Yeah, this is a game changer for using this action, thank you!

from run-vcpkg.

lukka avatar lukka commented on May 25, 2024

@spinicist closing this issue, let me know if run-vcpkg@v5 satisfied this ask, thanks!

from run-vcpkg.

spinicist avatar spinicist commented on May 25, 2024

Other projects are getting in the way of trying this - I will let you know when I finally get a chance but I'm sure it will be good!

from run-vcpkg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.