cache
is a specification and a CLI for adding caching to your scripts.
It's useful to weaken the dependency on CI providers' caching capabilities,
and share caching artifacts across environments.
Its design draws inspiration from usage, which allows defining a CLI interface in scripts using comments.
First, cache
using Mise running mise use -g ubi:tuist/cache@latest
.
Then adjust your script shebang to use the cache
CLI and then configure the caching using comments:
#!/usr/bin/env cache bash
# CACHE paths [".build"]
# CACHE key ""
# CACHE restore_keys []
swift build
- Clone the repository:
git clone [email protected]:tuist/cache.git
- Install the dependencies:
mise install
. - Dev the project:
mise run dev