psf / httpbin

HTTP Request & Response Service, written in Python + Flask.
https://httpbin.org
Other
54 stars 17 forks source link

Enable pip caching for GitHub Actions #14

Closed mgorny closed 1 year ago

mgorny commented 1 year ago

Enable pip caching in order to avoid repeatedly rebuilding all the PyPy wheels for source packages. This is inspired by discussion in https://github.com/psf/requests/pull/6496 and it may help with the PyPy CI failures.

mgorny commented 1 year ago

Ok, I think it works!

Notes:

  1. It writes a new cache entry for every commit but I think it's fine, GH will simply have more purging to do.
  2. It only works if action doesn't exceed timeout but if that happens at least once, the subsequent runs should be fast enough.
  3. It's using deprecated method of setting build output — the new method doesn't work on Windows for some reason.
mgorny commented 1 year ago

Switched to the new output variable method — it turned out that the example was wrong and shell: bash needs to be used. Filed https://github.com/actions/cache/issues/1220 for that.

mgorny commented 1 year ago

Thanks! By the way, you may reconsider the 10m timeout too, as that was the direct cause of PyPy failures before we sped it up.