Mozilla-Actions / sccache-action

sccache github action
Apache License 2.0
114 stars 22 forks source link

propose a different caching strategy in sccache-action #81

Open sylvestre opened 10 months ago

sylvestre commented 10 months ago

Currently, sccache-action uses the strategy described here: https://github.com/mozilla/sccache/blob/main/docs/Architecture.md the storage being GitHub action storage. it is storing a artifact per file.

It causes some issues like:

We should consider having a new configuration parameter to use a local copy of the cache instead.

The process would be:

  1. if it exists, download the cache storage (file single) and unpack it
  2. set up sccache to use the local unpacked cache directory - with direct access (by default in 0.7.2)
  3. after the build, upload the new local cache directory in the github storage

If there is no cache available, skip step 2, just start sccache as local

russkel commented 8 months ago

I run sscache from within Docker on Actions so this would be a good idea.