Skip to content

Commit

Permalink
CI: only build uncached packages
Browse files Browse the repository at this point in the history
  • Loading branch information
42LoCo42 committed Apr 13, 2024
1 parent 118ec2a commit 51a63b4
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@
builtins.listToAttrs
];

ci = pkgs.writeShellScriptBin "ci" ''
set -euo pipefail
${pkgs.nixci}/bin/nixci | ${pkgs.cachix}/bin/cachix push 42loco42
'';

readme = nixpkgs.lib.pipe self.packages.${pkgs.system} [
(nixpkgs.lib.mapAttrsToList (name: p:
"|`${name}`|${p.meta.description or ""}|${p.meta.homepage or ""}|"))
Expand All @@ -150,6 +145,25 @@
install -m644 ${s} README.md
'')
];

ci = pkgs.writeShellApplication {
name = "ci";
runtimeInputs = with pkgs; [
cachix
jq
nix-eval-jobs
];
text = ''
nix-eval-jobs \
--check-cache-status \
--force-recurse \
--workers "$(nproc)" \
--flake .#packages.${pkgs.system} \
| jq -r 'if .isCached then empty else .drvPath end' \
| xargs -P "$(nproc)" -I% nix-store --realise % \
| cachix push 42loco42
'';
};
}
];
}

0 comments on commit 51a63b4

Please sign in to comment.