Skip to content

CI caching #1796

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

Merged
merged 1 commit into from
Oct 7, 2023
Merged

CI caching #1796

merged 1 commit into from
Oct 7, 2023

Conversation

janiversen
Copy link
Collaborator

Let the python build do the caching.

@janiversen janiversen force-pushed the ci_caching branch 2 times, most recently from 297e45e to 4df9ff6 Compare October 7, 2023 12:41
@janiversen janiversen merged commit e275017 into dev Oct 7, 2023
@janiversen janiversen deleted the ci_caching branch October 7, 2023 13:03
@alexrudd2
Copy link
Collaborator

alexrudd2 commented Oct 16, 2023

aaaah, no don't do that! (too late 😆 )

setup-python only caches Python (which is fast), and not pip installs (which is slow). See actions/setup-python#330

Before:
Screenshot 2023-10-16 at 5 01 42 PM

After:
Screenshot 2023-10-16 at 5 01 14 PM

@janiversen
Copy link
Collaborator Author

According to the doc it does cache pip, see the parameters used.

@alexrudd2
Copy link
Collaborator

According to the doc it does cache pip, see the parameters used.

Yes, that's what the docs say :) But if you look more closely it only caches the downloads, not the install. So it's quite slow. (see screenshots)

@alexrudd2
Copy link
Collaborator

Unfortunately I cannot show you a run from this project, since it got deleted. (Hmm, maybe I can open a "fake" pull request that reverts #1796 )

Here's an example of using syphar/restore-virtualenv@v1, which caches the installed pip packages. See how the restore is very fast, and installing dependencies is totally skipped.
Screenshot 2023-10-17 at 11 16 59 AM

alexrudd2 added a commit that referenced this pull request Oct 17, 2023
@janiversen
Copy link
Collaborator Author

I am aware that python-checkout caches the cache, but it a step I needed to make, before making a cache mechanism tailored to us.

alexrudd2 added a commit that referenced this pull request Oct 17, 2023
alexrudd2 added a commit that referenced this pull request Oct 17, 2023
alexrudd2 added a commit that referenced this pull request Oct 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants