mirror of
https://codeberg.org/icewind/attic-action.git
synced 2026-06-03 09:34:11 +02:00
README: rewrite motivation
This commit is contained in:
parent
8676fbae2e
commit
bf8ee1d754
1 changed files with 5 additions and 17 deletions
22
README.md
22
README.md
|
|
@ -2,27 +2,15 @@
|
|||
|
||||

|
||||
|
||||
Build software only once using [Nix](https://nixos.org/nix/) with the help of [Cachix](https://cachix.org).
|
||||
One nice benefit of Nix is that CI can build and cache developer environments for every project on every branch using binary caches.
|
||||
|
||||
This action will configure Cachix:
|
||||
Another important aspect of CI is the feedback loop of how many minutes does the build take to finish.
|
||||
|
||||
- all further Nix invocations will use specified binary cache
|
||||
- at the end of the job, all newly built store paths will be pushed to Cachix
|
||||
With a simple configuration using Cachix, you’ll never have to build any derivation twice and share them with all your developers.
|
||||
|
||||
## Why do I need this
|
||||
After each job, just built derivations are pushed to your binary cache.
|
||||
|
||||
Because you'd like for your CI to be fast. Let me explain.
|
||||
|
||||
Directory-based caching on a typical CI doesn't work well for Nix.
|
||||
|
||||
`/nix/store` is a global storage of everything Nix operates on. These are
|
||||
your sources, patches, tarballs, packages, configuration.
|
||||
|
||||
A directory-based cache requires downloading a whole store, including the irrelevant parts. `cachix-action` will only fetch what's needed by configuring a Nix binary cache.
|
||||
|
||||
When the build is done, cachix-action only has to upload the new store paths, rather than syncing the whole store.
|
||||
|
||||
Purging paths from a directory-based cache is not feasible because it'd have to be aware of all branches and their respective contents somehow.
|
||||
Before each job, derivations to be built are first substituted (if they exist) from your binary cache.
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue