Closed srid closed 3 weeks ago
Perhaps this should be decoupled and built on top of #198
I tried to implement it only to realize that it is not that simple. Also, we don't want to complicate omnix, when the user could simply use unix tools to achieve this. For example,
$ om ci run . | rg -e "-omnix-cli-\d+\.\d+\.\d+$" -e "-omnix-mdbook-site$"
/nix/store/ppnag6lacdlg8q3vz3avv6da942ffgqw-omnix-mdbook-site
/nix/store/whdiim2js86xq14qdyk4mxfsdgni6cnh-omnix-cli-0.1.0
$ om ci run . | rg -e "-omnix-cli-\d+\.\d+\.\d+$" -e "-omnix-mdbook-site$" | xargs cachix push om
But to implement pinning (which requires naming each path to be pinned), we'll do https://github.com/juspay/cachix-push/issues/6 - after which the user can simply run the following in sequence:
$ om ci run .
$ nix run .#cachix-push
Keeping cache pushes off CI is good for another reason -- it makes no sense to do that when doing local CI.
https://github.com/juspay/cachix-push/pull/7
Will document this as well.
... in addition to 'whitelist pushing' (via pins).
Basically replace this entire module via
om.ci.default.<..>
configuration, and haveom ci
take care of the rest as part its build.https://github.com/juspay/omnix/blob/2aa1f48783b9757e87e9c54f5f250bb56384f066/nix/modules/cache-pins.nix#L41-L48
attic
and the like).This will obviate the following two steps in CI, in addition to the aforementioned flake-module:
https://github.com/juspay/omnix/blob/2aa1f48783b9757e87e9c54f5f250bb56384f066/.github/workflows/ci.yaml#L19-L24
https://github.com/juspay/omnix/blob/2aa1f48783b9757e87e9c54f5f250bb56384f066/.github/workflows/ci.yaml#L70-L72