Using uv to simplify and speedup the CI#2673
Merged
Avasam merged 6 commits intomhammond:mainfrom Dec 9, 2025
Merged
Conversation
Avasam
commented
Oct 26, 2025
Comment on lines
-41
to
-42
| cache: pip | ||
| cache-dependency-path: .github/workflows/main.yml |
Collaborator
Author
There was a problem hiding this comment.
There already was nothing to cache here.
I also kept setup-python to keep testing in a global user install (this can still be done with uv if you pre-install Python, but at this point having actions/setup-python + astral-sh/setup-uv wouldn't bring any benefit for this step if there's no dependency to quickly install.
Avasam
commented
Oct 26, 2025
mhammond
approved these changes
Dec 9, 2025
Owner
mhammond
left a comment
There was a problem hiding this comment.
uv looks great - I guess I don't really see a downside here and a few upsides - thanks!
Collaborator
Author
|
Glad you think so! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
uv is a fast and modern (mostly) drop-in replacement for
setup-python,pip,build,venv,twine1, made by the same folks as Ruff.I've been using uv for over a year and it's a game-changer for packaging and environment management. pywin32 is pretty simple, being Windows-only and having no runtime dependencies, but we can still benefit from a pretty significant speedup.
In the times below, I omitted the slowest and fastest times in a job matrix as outliers. The exact time save is hard to say, but the trend is clear:
buildfor cross-compilations goes from 3-14s down to 0 (no need to install extra dep)Footnotes
Whilst
uv publishcan be used to replace twine for publishing, there are no changes needed to your current workflow and you can keep using twine as you were. ↩Most of the time, the
actions/setup-pythonstep takes 6-18s, which would be equivalent, but it also sometimes randomly take around a minute for unknown reasons. ↩