folke/ultra-runner

[Question] Is it possible to store the build cache globally?

BeyondEvil opened this issue · 2 comments

Storing it globally would mean that we could use it in CI (at scale).

folke commented

Not right now.

You could use rsync to backup the files after a build and restore them before.

Something like the below should do the trick:

# Backup cache after the build
$ rsync -a --delete --progress -m --include=".ultra.cache.json" --include='*/' --exclude='*' build/ backup/

# Restore the cache before a build
$ rsync -a --progress --include=".ultra.cache.json" --include='*/' --exclude='*' backup/ build/

I hope this helps!

It does, thanks! 🙏