mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
fix(ci): build
This commit is contained in:
parent
dc6b335423
commit
7b647b96f1
14 changed files with 208 additions and 80 deletions
|
|
@ -4,7 +4,7 @@ set -eu
|
|||
NF_CONFIG_ROOT=${NF_CONFIG_ROOT-.}
|
||||
|
||||
NF_HOST=${NF_HOST-tewi}
|
||||
NIXOS_TOPLEVEL=network.nodes.$NF_HOST.system.build.toplevel
|
||||
NIXOS_TOPLEVEL=nixosConfigurations.$NF_HOST.config.system.build.toplevel
|
||||
NF_ADDR=${NF_ADDR-${NF_HOST}.local}
|
||||
|
||||
if [[ $NF_ADDR = tewi.local ]]; then
|
||||
|
|
@ -19,7 +19,7 @@ fi
|
|||
if [[ $1 = tarball ]]; then
|
||||
shift
|
||||
set -- build "$@"
|
||||
NIXOS_TOPLEVEL=network.nodes.$NF_HOST.system.build.tarball
|
||||
NIXOS_TOPLEVEL=nixosConfigurations.$NF_HOST.config.system.build.tarball
|
||||
fi
|
||||
|
||||
if [[ $1 = build ]]; then
|
||||
|
|
|
|||
|
|
@ -98,14 +98,14 @@ in {
|
|||
command = let
|
||||
filteredHosts = [ "hakurei" "tei" "mediabox" ];
|
||||
gcBetweenHosts = false;
|
||||
nodeBuildString = concatMapStringsSep " && " (node: "nix build -Lf . network.nodes.${node}.system.build.toplevel -o result-${node}" + optionalString gcBetweenHosts " && nix-collect-garbage -d") filteredHosts;
|
||||
nodeBuildString = concatMapStringsSep " && " (node: "nix build -Lf . nixosConfigurations.${node}.config.system.build.toplevel -o result-${node}" + optionalString gcBetweenHosts " && nix-collect-garbage -d") filteredHosts;
|
||||
in ''
|
||||
# ${toString builtins.currentTime}
|
||||
nix flake update
|
||||
|
||||
if git status --porcelain | grep -qF flake.lock; then
|
||||
git -P diff flake.lock
|
||||
echo "checking that network.nodes.still build..." >&2
|
||||
echo "checking that nodes still build..." >&2
|
||||
if ${nodeBuildString}; then
|
||||
if [[ -n $CACHIX_SIGNING_KEY ]]; then
|
||||
cachix push gensokyo-infrastructure result*/ &
|
||||
|
|
|
|||
|
|
@ -60,10 +60,10 @@ with lib; {
|
|||
};
|
||||
|
||||
jobs = let
|
||||
enabledHosts = ["hakurei" "tei" "mediabox" "reisen-ct"];
|
||||
enabledHosts = ["hakurei" "tei" "mediabox" "ct"];
|
||||
in
|
||||
mapAttrs' (k: nameValuePair "${k}") (genAttrs enabledHosts (host: {
|
||||
tasks.${host}.inputs = channels.nixfiles.nixosConfigurations.${host}.system.build.toplevel;
|
||||
tasks.${host}.inputs = channels.nixfiles.nixosConfigurations.${host}.config.system.build.toplevel;
|
||||
}));
|
||||
|
||||
ci.gh-actions.checkoutOptions.submodules = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue