This commit is contained in:
parent
6bdf2e95c1
commit
197463cc08
2 changed files with 19 additions and 3 deletions
|
@ -16,6 +16,8 @@ jobs:
|
|||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||
- name: Build with nix (x86_64-linux)
|
||||
run: nix-fast-build --no-nom --systems "x86_64-linux aarch64-linux" --attic-cache "nixfleet" --skip-cached --result-file result.json || true
|
||||
run: nix-fast-build --no-nom --systems "x86_64-linux aarch64-linux" --skip-cached --result-file result.json || true
|
||||
- name: Push to cache
|
||||
run: nix run .#push-to-cache -- nixfleet
|
||||
- name: Report checks
|
||||
run: report-checks
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
];
|
||||
|
||||
perSystem =
|
||||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
treefmt.config = {
|
||||
projectRootFile = ".git/config";
|
||||
|
@ -42,6 +42,18 @@
|
|||
package = config.treefmt.build.wrapper;
|
||||
};
|
||||
};
|
||||
packages.push-to-cache =
|
||||
let
|
||||
allChecks = with self.checks; x86_64-linux // aarch64-linux;
|
||||
checks = builtins.removeAttrs allChecks [ "push-to-cache" ];
|
||||
in
|
||||
pkgs.writeShellScriptBin "push-to-cache.sh" ''
|
||||
attic push $1 --stdin --jobs 64 << EOF
|
||||
${lib.concatStringsSep "\n" (
|
||||
builtins.map (builtins.unsafeDiscardStringContext) (builtins.attrValues checks)
|
||||
)}
|
||||
EOF
|
||||
'';
|
||||
};
|
||||
|
||||
flake.checks =
|
||||
|
@ -49,7 +61,9 @@
|
|||
build = _: nc: nc.config.system.build.toplevel;
|
||||
in
|
||||
{
|
||||
x86_64-linux = lib.mapAttrs build { inherit (self.nixosConfigurations) picard pike kirk; };
|
||||
x86_64-linux = (lib.mapAttrs build { inherit (self.nixosConfigurations) picard pike kirk; }) // {
|
||||
inherit (self.checks.x86_64-linux) push-to-cache;
|
||||
};
|
||||
aarch64-linux = lib.mapAttrs build {
|
||||
inherit (self.nixosConfigurations) sisko; # pbp;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue