Skip to content
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

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Enable caching for uv #40

merged 1 commit into from
Dec 5, 2024

Conversation

zanieb
Copy link
Contributor

@zanieb zanieb commented Dec 5, 2024

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?

@zanieb zanieb changed the title zb/cache Enable caching for uv Dec 5, 2024
with:
enable-cache: true
cache-dependency-glob: "requirements*.txt"
cache-suffix: ${{ matrix.python-version }}
Copy link
Contributor Author

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"
Copy link
Contributor Author

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

@zanieb
Copy link
Contributor Author

zanieb commented Dec 5, 2024

Ah did you fix the build time by using a newer pandas version?

Copy link
Member

@amotl amotl left a 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. 🍀

@amotl amotl merged commit 3a7d51e into crate:main Dec 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants