Coder Social home page Coder Social logo

Cache always missing about run-vcpkg HOT 6 CLOSED

lukka avatar lukka commented on May 24, 2024
Cache always missing

from run-vcpkg.

Comments (6)

lukka avatar lukka commented on May 24, 2024

@kotori2 haven't seen the complete execution output of your workflow with the debug information, but my intuition is that there is a bug in run-vcpkg when vcpkg is not used as a Git submodule. I fixed it in this branch, please try the following in your workflow, and let me know. For further investigation a link with verbose debug output is welcome!

uses: lukka/run-vcpkg@dev/fix_key_computation

from run-vcpkg.

kotori2 avatar kotori2 commented on May 24, 2024

Thanks for your help. The dev branch seems caching fine.
However it seems re-installing the packages when I executing CMake. (stucking at Running vcpkg install for over 10 minutes).

2020-12-25T03:40:30.1278524Z ##[group]Restore vcpkg and its artifacts from cache
2020-12-25T03:40:30.1283879Z Cache's key = 'localGitId=1046141699-args=-1457923159-os=1524360844-appendedKey=42-triplet=-1490537861'.
2020-12-25T03:40:30.1284817Z Running restore-cache...
2020-12-25T03:40:42.6751723Z Cache Size: ~118 MB (123900714 B)
......
2020-12-25T03:40:44.5837625Z The following packages are already installed:
2020-12-25T03:40:44.5838614Z     drogon[core]:x64-linux -> 1.1.0
2020-12-25T03:40:44.5839230Z     nlohmann-json[core]:x64-linux -> 3.9.1
2020-12-25T03:40:44.5839971Z Package drogon:x64-linux is already installed
2020-12-25T03:40:44.5840819Z Package nlohmann-json:x64-linux is already installed
2020-12-25T03:40:44.5841182Z 
2020-12-25T03:40:44.5841521Z Total elapsed time: 4.5 us

logs_43.zip

from run-vcpkg.

lukka avatar lukka commented on May 24, 2024

@kotori2 thanks for the feedback! Regarding your workflow, I have few recommendations which I could not ensure they apply to your private (and not accessible) repository:
1- have you tried to follow the best practices? i.e. having vcpkg as a Git submodule, and leveraging the vcpkg.json file to express the dependencies.
2- your private repository may contain a vcpkg.json file, that is the reason vcpkg is being run at CMake configuration time.
3- You could leverage the run-cmake to reduce the complexity of the workflow.

from run-vcpkg.

kotori2 avatar kotori2 commented on May 24, 2024

@lukka
I think I got the reason why they are installed twice.
run-vcpkg will try to install them in vcpkg install folder first, then they will be added to cache.
However if I add vcpkg.json, the packages will be installed in build/vcpkg_installed so that they won't be cached.
I'm curious why it will behave like this if I have vcpkg.json, because it is written your best practice page.

You could leverage the run-cmake to reduce the complexity of the workflow.

Also sorry but I didn't get what does it mean here... nvm I got it

from run-vcpkg.

lukka avatar lukka commented on May 24, 2024

@kotori2
Using lukka/run-vcpkg@v6 add in your workflow a value for additionalCachedPaths as shown in the quickstart documentation.
The problem you described should be fixed, please report it back.

from run-vcpkg.

kotori2 avatar kotori2 commented on May 24, 2024

It works perfectly.
Thanks for your hard work.

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.