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:
|
jobs:
|
||||||
publishable-kvm-suite:
|
publishable-kvm-suite:
|
||||||
runs-on: ubuntu-latest
|
runs-on:
|
||||||
|
- self-hosted
|
||||||
|
- linux
|
||||||
|
- x64
|
||||||
timeout-minutes: 360
|
timeout-minutes: 360
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: DeterminateSystems/nix-installer-action@v11
|
- name: Ensure Nix Is Available
|
||||||
|
run: |
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@v8
|
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
|
- name: Probe KVM Environment
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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)"
|
echo "hostname=$(hostname)"
|
||||||
uname -a
|
uname -a
|
||||||
id
|
id
|
||||||
|
|
@ -33,5 +52,10 @@ jobs:
|
||||||
- name: Run Publishable KVM Suite
|
- name: Run Publishable KVM Suite
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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
|
chmod +x ./nix/test-cluster/run-publishable-kvm-suite.sh
|
||||||
./nix/test-cluster/run-publishable-kvm-suite.sh "$RUNNER_TEMP/publishable-kvm-suite"
|
./nix/test-cluster/run-publishable-kvm-suite.sh "$RUNNER_TEMP/publishable-kvm-suite"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue