All checks were successful
buildbot/nix-build .#checks.x86_64-linux.clan-dep-age Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-bash Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-fakeroot Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-e2fsprogs Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-git Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-nix Build done.
buildbot/nix-build .#checks.x86_64-linux.check-for-breakpoints Build done.
buildbot/nix-build .#checks.aarch64-darwin.nixos-test_install_machine Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-docs Build done.
buildbot/nix-build .#checks.aarch64-darwin.nixos-test-backup Build done.
buildbot/nix-build .#checks.x86_64-linux.borgbackup Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-test-backup Build done.
buildbot/nix-build .#checks.aarch64-darwin.nixos-iso-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.package-module-docs Build done.
buildbot/nix-build .#checks.x86_64-linux.renderClanOptions Build done.
buildbot/nix-build .#checks.aarch64-linux.nixos-iso-installer Build done.
buildbot/nix-build .#checks.aarch64-darwin.nixos-flash-installer Build done.
buildbot/nix-build .#checks.aarch64-linux.nixos-test_install_machine Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-openssh Build done.
buildbot/nix-build .#checks.x86_64-linux."clan-dep-python3.11-qemu" Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-rsync Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-sops Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-sshpass Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-tor Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-dep-zbar Build done.
buildbot/nix-build .#checks.aarch64-linux.nixos-test-backup Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-pytest-without-core Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-vm-manager-no-breakpoints Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-vm-manager-pytest Build done.
buildbot/nix-build .#checks.x86_64-linux."clan-dep-python3.11-mypy" Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-clan-vm-manager Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-webview-ui Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-clan-cli Build done.
buildbot/nix-build .#checks.x86_64-linux.devShell-default Build done.
buildbot/nix-build .#checks.x86_64-linux.container Build done.
buildbot/nix-build .#checks.aarch64-linux.nixos-flash-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.lib-jsonschema-example-valid Build done.
buildbot/nix-build .#checks.x86_64-linux.matrix-synapse Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-cli-docs Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-ts-api Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-vm-manager Build done.
buildbot/nix-build .#checks.x86_64-linux.package-default Build done.
buildbot/nix-build .#checks.x86_64-linux.deltachat Build done.
buildbot/nix-build .#checks.x86_64-linux.treefmt Build done.
buildbot/nix-build .#checks.x86_64-linux.package-editor Build done.
buildbot/nix-build .#checks.x86_64-linux.package-gui-installer-apk Build done.
buildbot/nix-build .#checks.x86_64-linux.package-gui-installer-archlinux Build done.
buildbot/nix-build .#checks.x86_64-linux.package-gui-installer-deb Build done.
buildbot/nix-build .#checks.x86_64-linux.package-gui-installer-rpm Build done.
buildbot/nix-build .#checks.x86_64-linux.package-impure-checks Build done.
buildbot/nix-build .#checks.x86_64-linux.package-docs Build done.
buildbot/nix-build .#checks.x86_64-linux.package-clan-cli Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-test_install_machine Build done.
buildbot/nix-build .#checks.x86_64-linux.package-merge-after-ci Build done.
buildbot/nix-build .#checks.x86_64-linux.lib-jsonschema-nix-unit-tests Build done.
buildbot/nix-build .#checks.x86_64-linux.package-moonlight-sunshine-accept Build done.
buildbot/nix-build .#checks.x86_64-linux.package-pending-reviews Build done.
buildbot/nix-build .#checks.x86_64-linux.package-tea-create-pr Build done.
buildbot/nix-build .#checks.x86_64-linux.package-webview-ui Build done.
buildbot/nix-build .#checks.x86_64-linux.package-zerotier-members Build done.
buildbot/nix-build .#checks.x86_64-linux.package-zerotierone Build done.
buildbot/nix-build .#checks.x86_64-linux.package-zt-tcp-relay Build done.
buildbot/nix-build .#checks.x86_64-linux.module-schema Build done.
buildbot/nix-build .#checks.x86_64-linux.package-deploy-docs Build done.
buildbot/nix-build .#checks.x86_64-linux.package-function-schema Build done.
buildbot/nix-build .#checks.x86_64-linux.package-module-schema Build done.
buildbot/nix-build .#checks.x86_64-linux.clan-pytest-with-core Build done.
buildbot/nix-build .#checks.x86_64-linux.secrets Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-flash-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.nixos-iso-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.zt-tcp-relay Build done.
buildbot/nix-build .#checks.x86_64-linux.package-iso-installer Build done.
buildbot/nix-build .#checks.x86_64-linux.wayland-proxy-virtwl Build done.
buildbot/nix-build .#checks.x86_64-linux.syncthing Build done.
buildbot/nix-build .#checks.x86_64-linux.test-backups Build done.
checks / checks-impure (pull_request) Successful in 2m22s
buildbot/nix-build .#checks.x86_64-linux.flash Build done.
buildbot/nix-build .#checks.x86_64-linux.test-installation Build done.
buildbot/nix-eval Build done.
buildbot/nix-build .#checks.x86_64-linux.package-gui-install-test-ubuntu-22-04 Build done.
112 lines
3.4 KiB
Nix
112 lines
3.4 KiB
Nix
{
|
|
imports = [ ./gui-installer/flake-module.nix ];
|
|
perSystem =
|
|
{
|
|
self',
|
|
inputs',
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
pkgs = inputs'.nixpkgs.legacyPackages;
|
|
|
|
images = {
|
|
"ubuntu-22-04" = {
|
|
image = import <nix/fetchurl.nix> {
|
|
url = "https://app.vagrantup.com/generic/boxes/ubuntu2204/versions/4.1.12/providers/libvirt.box";
|
|
hash = "sha256-HNll0Qikw/xGIcogni5lz01vUv+R3o8xowP2EtqjuUQ=";
|
|
};
|
|
rootDisk = "box.img";
|
|
system = "x86_64-linux";
|
|
package = self'.checks.package-gui-installer-deb;
|
|
installCmd = "dpkg -i package/*.deb";
|
|
};
|
|
};
|
|
|
|
makeTest =
|
|
imageName: testName:
|
|
let
|
|
image = images.${imageName};
|
|
in
|
|
pkgs.runCommand "package-${testName}-install-test-${imageName}"
|
|
{
|
|
buildInputs = [
|
|
pkgs.qemu_kvm
|
|
pkgs.openssh
|
|
];
|
|
image = image.image;
|
|
postBoot = image.postBoot or "";
|
|
installCmd = image.installCmd;
|
|
package = image.package;
|
|
}
|
|
''
|
|
shopt -s nullglob
|
|
|
|
echo "Unpacking Vagrant box $image..."
|
|
tar xvf $image
|
|
|
|
image_type=$(qemu-img info ${image.rootDisk} | sed 's/file format: \(.*\)/\1/; t; d')
|
|
|
|
qemu-img create -b ./${image.rootDisk} -F "$image_type" -f qcow2 ./disk.qcow2
|
|
|
|
extra_qemu_opts="${image.extraQemuOpts or ""}"
|
|
|
|
# Add the config disk, required by the Ubuntu images.
|
|
config_drive=$(echo *configdrive.vmdk || true)
|
|
if [[ -n $config_drive ]]; then
|
|
extra_qemu_opts+=" -drive id=disk2,file=$config_drive,if=virtio"
|
|
fi
|
|
|
|
echo "Starting qemu..."
|
|
qemu-kvm -m 4096 -nographic \
|
|
-drive id=disk1,file=./disk.qcow2,if=virtio \
|
|
-netdev user,id=net0,restrict=yes,hostfwd=tcp::20022-:22 -device virtio-net-pci,netdev=net0 \
|
|
$extra_qemu_opts &
|
|
qemu_pid=$!
|
|
trap "kill $qemu_pid" EXIT
|
|
|
|
if ! [ -e ./vagrant_insecure_key ]; then
|
|
cp ${./vagrant_insecure_key} vagrant_insecure_key
|
|
fi
|
|
|
|
chmod 0400 ./vagrant_insecure_key
|
|
|
|
ssh_opts="-o StrictHostKeyChecking=no -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa -i ./vagrant_insecure_key"
|
|
ssh="ssh -p 20022 -q $ssh_opts vagrant@localhost"
|
|
|
|
echo "Waiting for SSH..."
|
|
for ((i = 0; i < 120; i++)); do
|
|
echo "[ssh] Trying to connect..."
|
|
if $ssh -- true; then
|
|
echo "[ssh] Connected!"
|
|
break
|
|
fi
|
|
if ! kill -0 $qemu_pid; then
|
|
echo "qemu died unexpectedly"
|
|
exit 1
|
|
fi
|
|
sleep 1
|
|
done
|
|
|
|
if [[ -n $postBoot ]]; then
|
|
echo "Running post-boot commands..."
|
|
$ssh "set -ex; $postBoot"
|
|
fi
|
|
|
|
echo "Copying package..."
|
|
scp -r -P 20022 $ssh_opts $package vagrant@localhost:package
|
|
|
|
echo "Installing Package..."
|
|
$ssh "set -eux; $installScript"
|
|
|
|
touch $out
|
|
'';
|
|
in
|
|
{
|
|
checks = lib.mapAttrs' (imageName: _image: {
|
|
name = "package-gui-install-test-${imageName}";
|
|
value = makeTest imageName "gui";
|
|
}) images;
|
|
};
|
|
}
|