[build-command] Use uv to install Python deps for CI #3561
Merged
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.
I just wanted to try it out with an upcoming PR, and it’s quite impressive.
With cached dependencies, the old way method took 25-40s to install the deps. (https://github.com/echoix/megalinter/actions/runs/9121261204/job/25080127542#step:8:1 and https://github.com/echoix/megalinter/actions/runs/9120700814/job/25078549631#step:8:1)
Here, WITHOUT cached dependencies, it took less than 5 secs (https://github.com/echoix/megalinter/actions/runs/9121318153/job/25080283053#step:9:1)
I used the pip to install uv, but it could’ve been with the shell script one liner.
I had to use the
--system
flag to let it use the global install in CI, and to not require a venv.Otherwise, it’s quite easy.
Proposed Changes
Readiness Checklist
Author/Contributor
Reviewing Maintainer
breaking
if this is a large fundamental changeautomation
,bug
,documentation
,enhancement
,infrastructure
, orperformance