Tribler / py-ipv8

Python implementation of Tribler's IPv8 p2p-networking layer
GNU Lesser General Public License v3.0
229 stars 47 forks source link

GitHub Actions caching is useless #1294

Closed qstokkink closed 3 months ago

qstokkink commented 4 months ago

Currently, our testing infrastructure restores and saves caches for the libsodium.dll file so that it doesn't need to be downloaded every PR run.

https://github.com/Tribler/py-ipv8/blob/80b3544d9bdc2b332e489808a67dfc351a6936e6/.github/workflows/unittests.yml#L23-L35

This does not work as intended. PR runs download the file over and over again.

The core issue is that PR branches are only allowed to access their own cache or their parent branch's cache, see the docs. Even though the cache key is equal, PRs do not use the cache that other PRs have created.

From the documentation, it does seem like moving cache creation to the parent branch (master) should resolve this issue. This would change our workflow(s) as follows: