-
Notifications
You must be signed in to change notification settings - Fork 298
Improvements to GitHub Actions package caching #6803
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
base: main
Are you sure you want to change the base?
Conversation
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.
- Please see: SciTools/.github#227
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6803 +/- ##
=======================================
Coverage 90.39% 90.39%
=======================================
Files 91 91
Lines 24761 24761
Branches 4639 4639
=======================================
Hits 22382 22382
Misses 1608 1608
Partials 771 771 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| cache_period: ${{ env.CACHE_PERIOD }} | ||
| env_name: ${{ env.ENV_NAME }} | ||
| install_packages: "cartopy nox pip" | ||
| - name: "install cartopy + nox + pip" |
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.
This could stand some improvement. The wheels job always finishes first and populates the cache. When the tests job - this one - finishes, it does not overwrite the cache. For the top level Nox environment, the Python version is not controlled, so the dependency stack will often be for a different Python version than what is in the cache, leading to lots of new downloads.
Solutions
- Make the Nox environment use
matrix.python-version, so that the Cartopy dependency stack comes from the cache. - Give the
testsworkflow 'control' of the cache, havingwheelsetc only use the cache but not populate it.
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.
Should benchmarking also be using the Cartopy cache?
The problem
Our existing use of caching Conda content in GitHub Actions workflows clashes with Conda's own caching mechanism. Packages are stored in the Conda package-cache, and the packages are then included in individual environments via hard-links. GHA caching does not parse these hard-links, but we cache both the Conda package-cache AND the environment directories, causing two problems:
My proposed solution
tests,wheelsandbenchmarks.Pros and cons
Pros
Cons
This is largely mitigated: