r/embeddedlinux • u/cachely-admin • Jul 13 '26
How are teams sharing Yocto sstate cache between CI and developers?
Disclosure: We’re the team behind Cachely. We do not support Yocto today, but we’re researching whether it would be a useful integration.
We recently spoke with a team using Jenkins and Yocto that had been keeping the sstate cache locally on each build node.
That worked while build volume was low, but they are now moving to a centralized cache because the local setup no longer scales.
Their preferred model was:
- Nightly CI builds can read and write
- Developers can read, but not upload
- The cache is available over HTTP or FTP
- Setup should mostly be a URL and credentials
- Nobody wants to spend much time maintaining it
We’re trying to understand how common this setup is.
For teams using Yocto today:
- Where do you store the shared sstate cache?
- Are you using NFS, object storage, Nexus, or a basic HTTP server?
- Do CI and developer machines use the same cache?
- How do you separate read and write access?
- How do you handle retention and different Yocto or machine versions?
- Is on-prem storage a requirement?
- Is the main pain setup, maintenance, performance, or understanding why something missed?
We’re especially interested in whether an HTTP-compatible managed cache would solve a real problem, or whether shared storage is already simple enough for most teams.
3
u/gizahnl Jul 13 '26
Tbh haven't given it much thought, I have cache in a gitlab runner, I have cache at my laptop and I have cache at my home workstation.
Normally I don't spend much time waiting on compilation, so I don't really care.
I guess nightly build and exposing via a local http server would be easy, iirc sstate cache also has some http directives anyway.
Haven't put in the work for that yet, though I'd imagine it would just be 1-2 hours to setup something simple enough.
2
u/Affectionate-Bit6525 Jul 13 '26
We store in S3 with an rsync in the pre/post phase to download to the worker node and upload again after. Our throughput is low enough that we don’t have conflicts with this today and it’s cheap with our self hosted runners in AWS. We rolled our own because there wasn’t anything on the market to fill the gap, but I’d be unlikely to migrate to a paid service now unless we need to ship a whole lot of changes really fast I suppose.
1
u/Elect_SaturnMutex Jul 13 '26
Yea in one of my previous projects the cache was stored on a server and you can reference it in your local.conf while building locally so that it's not downloaded locally. I remember we used to update downloads and sstate periodically. Forgot how exactly we did that but it's possible.
1
u/Sensitive_Push_7840 Jul 20 '26
I'll say I tried, and I think I wasted more time fighting permissions between runners/containers/nfs trying to make the cache shared than just having a separate cache between ci / developers. I'd be curious if there is an easier solution