You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you must run the CI, the best way to reduce its impact is limit the actual work that needs to be done.
With the cache action, you can cache dependencies and build outputs to make your workflows faster and thus more efficient. Maybe you need to compile some dependency, download and pre-compute some data, or set up your python environment via pip. These typically do not change much from run to run, so try to cache these where possible.
Caching your Python environment
Just the installation of the dependencies of some Python code via pip can be quite significant. Some libraries just seem to pull in an endless stream of dependencies. So, why don't we cache our entire Python environment?
Below is a snippet that we find effective in our workflows for Python code.
As the cache key, we use a combination of the Python directory name (this includes the version) in combination with the hash of the pyproject.toml, setup.cfg, or requirements.txt file. Whenever these get updated, the cache gets invalidated and regenerated.
This means we can also safely skip the pip install step if we hit the cache. Depending on the number of dependencies, this virtually eliminates the setup time of your workflow.
Was tried in PR #454 , but didn't work. Might be something to do with apt (and conda?) installs not being cached properly. Feedback from Stef was:
ik denk dat het bij deze regel misgaat: sudo apt-get install -y dssp
Je cachet deze locatie hier: path: ${{ env.pythonLocation }}
alles wat je met apt installeert staat ergens anders
Je zou dus de apt install in een andere step moeten zetten
From this blog post.
The text was updated successfully, but these errors were encountered: