Caching pip downloads saves under a second in GitHub Actions; source builds cost far more

Adding cache: pip to actions/setup-python caches pip's download directory, which on a fast runner saves less than a second per install. The bigger time cost comes when a dependency lacks a wheel for the platform and must be compiled, which took 10.9 seconds in one measurement and is also stored in the cache. Tests on a latchkey-small runner showed the pip download cache cut installation time from 7.7 to 6.9 seconds. Poetry's cache option instead restores the whole virtualenv, skipping the install step as well as the download.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in