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

GH Actions: Cache pip dependencies #4532

Closed
wants to merge 2 commits into from
Closed

Conversation

MetRonnie
Copy link
Member

@MetRonnie MetRonnie commented Nov 25, 2021

This is a small change with no associated Issue. Hopefully will shave some time off GH Actions checks [Update: not really 🤷‍♂️]

https://github.blog/changelog/2021-11-23-github-actions-setup-python-now-supports-dependency-caching/

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg and conda-environment.yml.
  • Does not need tests
  • No change log entry required
  • No documentation update required.

@MetRonnie MetRonnie added small infrastructure GH Actions, Codecov etc. labels Nov 25, 2021
@MetRonnie MetRonnie added this to the cylc-8.x milestone Nov 25, 2021
@MetRonnie MetRonnie self-assigned this Nov 25, 2021
Comment on lines +50 to +51
cache: pip
cache-dependency-path: setup.cfg
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if there is a reason to avoid caching for the manylinux test?

@oliver-sanders
Copy link
Member

Partially addresses #3606

@oliver-sanders
Copy link
Member

Do we have the ability to reset this cache manually?

@MetRonnie
Copy link
Member Author

https://github.com/actions/setup-python#caching-packages-dependencies says:

Please Note: Restored cache will not be used if the requirements.txt file is not updated for a long time and a newer version of the dependency is available that can lead to an increase in total build time.

(It only talks about requirements.txt but actions/setup-python#282 (comment) says you can use setup files too)


To be honest, I'm minded to close this as it isn't really making a dent on install times

@oliver-sanders
Copy link
Member

oliver-sanders commented Nov 26, 2021

To be honest, I'm minded to close this as it isn't really making a dent on install times

Fine with me, the big cost ATM is the Conda envs.

I think we should containerise our build env and install deps from Conda so we are always testing the correct stack and aren't don't get messed around with CI env changes. We could build and cache the env based on the hash of the conda-environment.yml and setup.cfg files which would massively cut down on build time. (could also roll the Bash tests into the same container framework using Conda to install the different Bash versions rather than building our own).

See:

@MetRonnie MetRonnie closed this Nov 30, 2021
@MetRonnie MetRonnie deleted the actions branch November 30, 2021 10:08
@oliver-sanders oliver-sanders removed this from the cylc-8.x milestone Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure GH Actions, Codecov etc. small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants