@@ -68,16 +68,25 @@ jobs:
6868 uses : actions/cache@v4
6969 with :
7070 path : ~/.cache/usbeliza-build/models
71- key : elizaos-model-cache-${{ hashFiles('packages/os/linux/Justfile') }}
71+ key : elizaos-model-cache-${{ hashFiles('packages/os/linux/variants/milady-tails/ Justfile') }}
7272 restore-keys : elizaos-model-cache-
7373
7474 - name : Restore CLI cache
7575 uses : actions/cache@v4
7676 with :
7777 path : ~/.cache/usbeliza-build/cli
78- key : elizaos-cli-cache-${{ hashFiles('packages/os/linux/Justfile') }}
78+ key : elizaos-cli-cache-${{ hashFiles('packages/os/linux/variants/milady-tails/ Justfile') }}
7979 restore-keys : elizaos-cli-cache-
8080
81+ - name : Restore live-build chroot/debs cache
82+ uses : actions/cache@v4
83+ with :
84+ path : |
85+ packages/os/linux/variants/milady-tails/tails/cache
86+ packages/os/linux/variants/milady-tails/tails/.build
87+ key : elizaos-iso-livebuild-${{ runner.os }}-${{ hashFiles('packages/os/linux/variants/milady-tails/tails/**/package-lists/**', 'packages/os/linux/variants/milady-tails/tails/**/*.list.chroot', 'packages/os/linux/variants/milady-tails/build-iso.sh', 'packages/os/linux/variants/milady-tails/Dockerfile') }}
88+ restore-keys : elizaos-iso-livebuild-${{ runner.os }}-
89+
8190 - name : Install Rust toolchain
8291 uses : dtolnay/rust-toolchain@stable
8392 with :
@@ -93,35 +102,51 @@ jobs:
93102 key : elizaos-iso-rust-${{ runner.os }}-${{ hashFiles('packages/os/linux/**/Cargo.lock', 'packages/os/linux/**/Cargo.toml') }}
94103 restore-keys : elizaos-iso-rust-${{ runner.os }}-
95104
105+ - name : Detect KVM acceleration
106+ id : kvm
107+ run : |
108+ if command -v kvm-ok >/dev/null 2>&1 && kvm-ok >/dev/null 2>&1; then
109+ echo "have_kvm=true" >> "$GITHUB_OUTPUT"
110+ elif [ -e /dev/kvm ]; then
111+ echo "have_kvm=true" >> "$GITHUB_OUTPUT"
112+ else
113+ echo "have_kvm=false" >> "$GITHUB_OUTPUT"
114+ fi
115+
96116 - name : Stage ISO build
97- working-directory : packages/os/linux
117+ working-directory : packages/os/linux/variants/milady-tails
118+ env :
119+ ELIZAOS_BUILD_MILADY_APP : " 1"
98120 run : just iso-stage
99121
100- - name : Cache pre-downloaded models
101- working-directory : packages/os/linux
122+ # Model/CLI caching is not implemented for the milady-tails variant —
123+ # the chroot resolves them inline during live-build. The targets exist
124+ # as documented no-ops so the workflow contract stays uniform.
125+ - name : Cache pre-downloaded models (variant no-op)
126+ working-directory : packages/os/linux/variants/milady-tails
102127 run : just iso-cache-model
103128
104- - name : Cache pre-downloaded CLIs
105- working-directory : packages/os/linux
129+ - name : Cache pre-downloaded CLIs (variant no-op)
130+ working-directory : packages/os/linux/variants/milady-tails
106131 run : just iso-cache-cli
107132
108133 - name : Configure live-build
109- working-directory : packages/os/linux
134+ working-directory : packages/os/linux/variants/milady-tails
110135 run : just iso-config
111136
112137 - name : Validate ISO config
113- working-directory : packages/os/linux
138+ working-directory : packages/os/linux/variants/milady-tails
114139 run : just iso-check
115140
116141 - name : Build ISO
117- working-directory : packages/os/linux
118- run : sudo just iso-build
142+ working-directory : packages/os/linux/variants/milady-tails
143+ run : sudo --preserve-env=ELIZAOS_BUILD_MILADY_APP just iso-build
119144 timeout-minutes : 90
120145
121146 - name : Locate and rename ISO
122147 id : iso
123148 run : |
124- ISO=$(find packages/os/linux -name "*.iso" | head -1)
149+ ISO=$(find packages/os/linux/variants/milady-tails -name "*.iso" | head -1)
125150 if [ -z "$ISO" ]; then
126151 echo "ERROR: ISO not found after build"
127152 exit 1
@@ -141,15 +166,16 @@ jobs:
141166 sha256sum "${{ steps.iso.outputs.path }}" > "${{ steps.iso.outputs.filename }}.sha256"
142167
143168 - name : Smoke test ISO (headless QEMU)
144- if : runner.os == 'Linux'
145- continue-on-error : true
169+ if : runner.os == 'Linux' && steps.kvm.outputs.have_kvm == 'true'
146170 run : |
171+ set -euo pipefail
147172 sudo apt-get install -y --no-install-recommends qemu-system-x86 ovmf
148- # Boot headless for 60 seconds and check for boot completion via serial
149- QEMU_TIMEOUT=120
173+ QEMU_TIMEOUT=180
150174 ISO_PATH="${{ steps.iso.outputs.path }}"
151175 SERIAL_LOG=$(mktemp)
176+ # Allow non-zero exit when timeout fires; we assert on log contents.
152177 timeout "$QEMU_TIMEOUT" qemu-system-x86_64 \
178+ -enable-kvm \
153179 -cdrom "$ISO_PATH" \
154180 -boot d \
155181 -m 2G \
@@ -162,10 +188,18 @@ jobs:
162188 if grep -qi "elizaOS\|eliza\|login:" "$SERIAL_LOG" 2>/dev/null; then
163189 echo "ISO smoke test: boot strings found in serial log"
164190 else
165- echo "WARN: boot strings not detected in serial log (QEMU may not support KVM in CI)"
191+ echo "ERROR: boot strings not detected in serial log"
192+ tail -200 "$SERIAL_LOG" || true
193+ rm -f "$SERIAL_LOG"
194+ exit 1
166195 fi
167196 rm -f "$SERIAL_LOG"
168197
198+ - name : Smoke test ISO (KVM unavailable — skipped)
199+ if : runner.os == 'Linux' && steps.kvm.outputs.have_kvm != 'true'
200+ run : |
201+ echo "::notice::QEMU/KVM unavailable on this runner; skipping ISO boot smoke test (not silently passed — the gate above is the contract)."
202+
169203 - name : Upload ISO artifact
170204 uses : actions/upload-artifact@v4
171205 with :
@@ -176,7 +210,7 @@ jobs:
176210 retention-days : 7
177211
178212 - name : Upload to GitHub Release
179- if : github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.publish == 'true' ) || (github.event_name == 'workflow_call' && inputs.publish == true)
213+ if : github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.publish) || (github.event_name == 'workflow_call' && inputs.publish == true)
180214 uses : softprops/action-gh-release@v2
181215 with :
182216 files : |
0 commit comments