Swatantra-66 commented on issue #20483:
URL: https://github.com/apache/nuttx/issues/20483#issuecomment-6130961992

   Hi @simbit18, thanks for checking the cache storage metrics and raising this!
   
   Regarding the tests run: PR #20580 was tested on forks to verify that ccache 
saved and restored cleanly without runner permission errors, and bounded each 
job with `CCACHE_MAXSIZE=1G` to prevent individual jobs from ballooning.
   
   Regarding the 10 GB limit: GitHub Actions enforces a 10 GB cache storage 
limit per repository and automatically evicts Least Recently Used (LRU) caches 
when this threshold is reached, without failing workflow runs. 
   
   However, to prevent high churn from PR runs and keep total cache storage 
well under the 10 GB quota, here are two immediate improvements we can apply:
   
   1. **Only save cache on `master` branch (Read-only for PRs):**
      We can configure `actions/cache` so that PR runs only *restore* the cache 
from `master` and do not save new cache entries. Only merges to `master` will 
update the cache. This guarantees that total cache entries are strictly bounded 
to the matrix size (e.g. ~10–14 entries total, keeping usage well under 5–6 GB).
   2. **Selective Caching:**
      Only enable caching for the heaviest/slowest matrix jobs (e.g. `arm-01` 
to `arm-04`) where compilation time is largest.
   3. **Revert if preferred:**
      If the maintainers prefer not to use GitHub Actions caching at all as per 
past #14376 discussions, we can also cleanly revert #20580.
   
   @acassis @xiaoxiang781216 Would you prefer updating the workflow so that 
caching only saves on `master` (read-only for PRs), or would you prefer 
reverting PR #20580?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to