Some checks failed
KVM Publishable Validation / publishable-kvm-suite (push) Failing after 5s
69 lines
2.8 KiB
YAML
69 lines
2.8 KiB
YAML
name: KVM Publishable Validation
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publishable-kvm-suite:
|
|
runs-on: nix-host
|
|
timeout-minutes: 360
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Ensure Nix Is Available
|
|
run: |
|
|
set -euo pipefail
|
|
export PATH="/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:$HOME/.nix-profile/bin:$PATH"
|
|
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
elif [[ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]]; then
|
|
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
|
fi
|
|
if ! command -v nix >/dev/null 2>&1; then
|
|
if ! command -v xz >/dev/null 2>&1; then
|
|
echo "Nix is not on PATH and xz is unavailable for bootstrap"
|
|
exit 1
|
|
fi
|
|
curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
|
|
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
elif [[ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]]; then
|
|
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
|
fi
|
|
fi
|
|
mkdir -p "$HOME/.config/nix"
|
|
printf '%s\n' 'experimental-features = nix-command flakes' > "$HOME/.config/nix/nix.conf"
|
|
nix --version
|
|
|
|
- name: Probe KVM Environment
|
|
run: |
|
|
set -euo pipefail
|
|
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
elif [[ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]]; then
|
|
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
|
fi
|
|
echo "hostname=$(hostname)"
|
|
uname -a
|
|
id
|
|
test -e /dev/kvm
|
|
ls -l /dev/kvm
|
|
if [[ -f /sys/module/kvm_intel/parameters/nested ]]; then
|
|
echo "kvm_intel_nested=$(cat /sys/module/kvm_intel/parameters/nested)"
|
|
fi
|
|
if [[ -f /sys/module/kvm_amd/parameters/nested ]]; then
|
|
echo "kvm_amd_nested=$(cat /sys/module/kvm_amd/parameters/nested)"
|
|
fi
|
|
|
|
- name: Run Publishable KVM Suite
|
|
run: |
|
|
set -euo pipefail
|
|
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
elif [[ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]]; then
|
|
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
|
fi
|
|
chmod +x ./nix/test-cluster/run-publishable-kvm-suite.sh
|
|
./nix/test-cluster/run-publishable-kvm-suite.sh "$RUNNER_TEMP/publishable-kvm-suite"
|