Using uv to simplify and speedup the CI #2673
Open
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 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. Being Windows-only and having no runtime dependencies, pywin32 is pretty simple, 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. ↩