Run KVM validation on self-hosted runners
This commit is contained in:
parent
11cd8be2f7
commit
bf208ca0ff
1 changed files with 28 additions and 4 deletions
32
.github/workflows/kvm-publishable.yml
vendored
32
.github/workflows/kvm-publishable.yml
vendored
|
|
@ -5,19 +5,38 @@ on:
|
|||
|
||||
jobs:
|
||||
publishable-kvm-suite:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- x64
|
||||
timeout-minutes: 360
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: DeterminateSystems/nix-installer-action@v11
|
||||
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v8
|
||||
- name: Ensure Nix Is Available
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if ! command -v nix >/dev/null 2>&1; then
|
||||
curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
|
||||
fi
|
||||
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
|
||||
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
|
||||
|
|
@ -33,5 +52,10 @@ jobs:
|
|||
- 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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue