-
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
Enable caching for uv #40
Conversation
with: | ||
enable-cache: true | ||
cache-dependency-glob: "requirements*.txt" | ||
cache-suffix: ${{ matrix.python-version }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to prevent collision between the two jobs.
@@ -80,6 +80,10 @@ jobs: | |||
|
|||
- name: Set up uv | |||
uses: astral-sh/setup-uv@v4 | |||
with: | |||
enable-cache: true | |||
cache-dependency-glob: "requirements*.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default is uv.lock
Ah did you fix the build time by using a newer pandas version? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah did you fix the build time by using a newer pandas version?
Yes, that fixed it, but I still appreciate your patch, because it excellently expands our toolbox to know how to configure astral-sh/setup-uv
properly, including package caching. Thank you very much. 🍀
Summary of the changes / Why this is an improvement
Enables storing the uv cache in GitHub Action's cache. This reduces the CI setup time from >8m to <2m. An example run can be seen here.
Most of the time was spent building pandas from source, ref #36 — uv's cache will include the built wheel.
edit: This appears to no longer be slow on
main
, perhaps not worth it?