ci: use nix-fast-build to build checks

ci: tests/keycloak: bump cores to 16, memory to 16384
This commit is contained in:
teutat3s 2025-02-06 11:58:50 -03:00
parent f402be32d4
commit 9ecf52f3ff
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
4 changed files with 23 additions and 14 deletions

View file

@ -27,11 +27,6 @@ jobs:
build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$target" ".#nixosConfigurations.${target}.config.system.build.toplevel"
done
for check in $(nix flake show --json --all-systems | jq --raw-output '
.checks."x86_64-linux" |
to_entries[] |
.key'
); do
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$check" ".#checks.x86_64-linux.${check}"
done
sed -i 's/virtualisation.cores .*/virtualisation.cores = 16;/' tests/keycloak.nix
sed -i 's/virtualisation.memorySize .*/virtualisation.memorySize = 16384;/' tests/keycloak.nix
nix --accept-flake-config --access-tokens '' develop --command nix-fast-build --no-nom --skip-cached --systems "aarch64-linux x86_64-linux" --max-jobs 8 --eval-workers 8

View file

@ -78,6 +78,22 @@
checks =
let
machinesPerSystem = {
aarch64-linux = [
"metronom"
];
x86_64-linux = [
"nachtigall"
];
};
nixosMachines = builtins.mapAttrs' (n: builtins.nameValuePair "nixos-${n}") (
builtins.genAttrs (machinesPerSystem.${system} or [ ]) (
name: self.nixosConfigurations.${name}.config.system.build.toplevel
)
);
deployChecks = builtins.mapAttrs (
system: deployLib: deployLib.deployChecks self.deploy
) inputs.deploy-rs.lib;
nixos-lib = import (inputs.nixpkgs + "/nixos/lib") { };
testDir = builtins.attrNames (builtins.readDir ./tests);
testFiles = builtins.filter (n: builtins.match "^.*.nix$" n != null) testDir;
@ -94,12 +110,12 @@
}
);
}) testFiles
);
) deployChecks // nixosMachines;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
deploy-rs
nixpkgs-fmt
nix-fast-build
agenix
age-plugin-yubikey
cachix
@ -128,10 +144,6 @@
}) (builtins.attrNames (builtins.readDir ./modules))
);
checks = builtins.mapAttrs (
system: deployLib: deployLib.deployChecks self.deploy
) inputs.deploy-rs.lib;
formatter."x86_64-linux" = inputs.nixpkgs.legacyPackages."x86_64-linux".nixfmt-rfc-style;
deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations {

View file

@ -46,6 +46,7 @@ in
systemd.tmpfiles.rules = [ "f /tmp/dbf 1777 root root 10d password" ];
virtualisation.cores = 1;
virtualisation.memorySize = 4096;
pub-solar-os.auth = {

View file

@ -31,6 +31,7 @@
./support/global.nix
];
virtualisation.cores = 1;
virtualisation.memorySize = 4096;
networking.interfaces.eth0.ipv4.addresses = [