-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: caching venv vs caching uv? #7
Comments
This is an excellent and pertinent question, especially since Adam's https://adamj.eu/tech/2023/11/02/github-actions-faster-python-virtual-environments/ just popped up again with an update. The question is especially interesting because at least for uv, the caching is actually slower than just creating/installing, except for cases like PyPy which led to #6. This is also why this project is still labelled "semi-experimental" and as such I welcome experiments from users like you! I'm gonna say that the uv cache as used here is nicer for cases where you don't pin your in-dev dependencies (because, say, you don't have enough churn on your project and don't want your history consist solely of Dependabot updates) and still want a certain control over the cache handling. |
There are some reports in this issue and associated PR, that you probably are already aware of: actions/setup-python#822 |
FYI, the latest release of uv (4 hours ago) has a really interesting cache-related option:
That removes the unpacked files, but leaves the compressed downloads. It's supposed to be good for CI caching. The venv as well as the raw uv cache have a lot of small files, which are much slower to cache. |
Unfortunately this is where the composite action approach hits a wall: https://github.com/orgs/community/discussions/26743#discussioncomment-3253195 Not sure it's worth learning TypeScript for now, but I'll try adding it to baipp: hynek/build-and-inspect-python-package#135 |
What about https://github.com/marketplace/actions/run-and-post-run-action ? That’s the suggestion at the end of that thread. |
nice! Add in #9 |
Given a venv can be cached directly, what are the advantages of caching the uv cache instead?
The text was updated successfully, but these errors were encountered: