By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Fill and read the NixCI cache from local builds NixCI rebuilds from scratch what a contributor has already built, which is most of what it charges us for: the same derivations are built here first, they just never leave this machine. The dev shell now points Nix at a post-build-hook that copies every path it builds to the NixCI cache, and the flake substitutes from that cache in return. Both directions only need a token in ~/.netrc, so no system configuration is involved: Nix hands the daemon its own netrc-file setting, and the hook, which runs as the daemon user, reads the token through it. A machine with no token, or no network, keeps building as before, because a post-build-hook that fails fails the build it was called for.
| Time to Start | Worker time | Duration | Time to finish | Idle | |
|---|---|---|---|---|---|
| Config | 2m22s | 0s | 0s | 2m23s | 2m22s |
| Eval | 3m56s | 30s | 30s | 4m26s | 1m33s |
| Build | 4m25s | 0s | - | - | 0s |
| Test | - | - | - | - | 55m37s |
| Deploy | - | - | - | - | 0s |
| Suite | 2m22s | 31s | - | - | 59m32s |