Skip to content

Commit 8ee44b9

Browse files
author
Shaw
committed
chore: resolve plugin registry conflicts
1 parent 948e337 commit 8ee44b9

30 files changed

Lines changed: 1177 additions & 430 deletions

File tree

.github/workflows/build-debian-package.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,31 @@ jobs:
4242

4343
- name: Build .deb package
4444
id: deb
45-
continue-on-error: true
4645
run: |
46+
set -euo pipefail
4747
if [ ! -d packages/app-core/packaging/debian ]; then
48-
echo "WARN: packages/app-core/packaging/debian not found; skipping .deb build"
49-
exit 0
48+
echo "ERROR: packages/app-core/packaging/debian is missing — debian packaging dir is required for the .deb build. Repo state is bad."
49+
exit 1
5050
fi
5151
cd packages/app-core/packaging/debian
52-
dpkg-buildpackage -us -uc -b 2>/dev/null || debuild -us -uc -b 2>/dev/null || true
52+
dpkg-buildpackage -us -uc -b
5353
5454
- name: Find and checksum .deb
5555
id: find_deb
5656
run: |
57+
set -euo pipefail
5758
DEB=$(find . -maxdepth 3 -name "*.deb" | head -1)
58-
if [ -n "$DEB" ]; then
59-
sha256sum "$DEB" > "${DEB}.sha256"
60-
DEB_SHA256=$(cut -d' ' -f1 "${DEB}.sha256")
61-
DEB_SIZE=$(stat --format="%s" "$DEB")
62-
echo "deb_path=$DEB" >> "$GITHUB_OUTPUT"
63-
echo "deb_sha256=$DEB_SHA256" >> "$GITHUB_OUTPUT"
64-
echo "deb_size=$DEB_SIZE" >> "$GITHUB_OUTPUT"
65-
echo "Found .deb: $DEB ($DEB_SIZE bytes)"
66-
else
67-
echo "WARN: no .deb file produced"
59+
if [ -z "$DEB" ]; then
60+
echo "ERROR: no .deb file produced after dpkg-buildpackage"
61+
exit 1
6862
fi
63+
sha256sum "$DEB" > "${DEB}.sha256"
64+
DEB_SHA256=$(cut -d' ' -f1 "${DEB}.sha256")
65+
DEB_SIZE=$(stat --format="%s" "$DEB")
66+
echo "deb_path=$DEB" >> "$GITHUB_OUTPUT"
67+
echo "deb_sha256=$DEB_SHA256" >> "$GITHUB_OUTPUT"
68+
echo "deb_size=$DEB_SIZE" >> "$GITHUB_OUTPUT"
69+
echo "Found .deb: $DEB ($DEB_SIZE bytes)"
6970
7071
- name: Upload .deb artifact
7172
uses: actions/upload-artifact@v4
@@ -74,7 +75,7 @@ jobs:
7475
path: |
7576
**/*.deb
7677
**/*.deb.sha256
77-
if-no-files-found: warn
78+
if-no-files-found: error
7879
retention-days: 30
7980

8081
- name: Upload to GitHub Release

.github/workflows/build-linux-iso.yml

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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: |

.github/workflows/build-vm-image.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ jobs:
6868

6969
- name: Deploy elizaOS to VM
7070
working-directory: packages/os/linux
71-
continue-on-error: true
7271
run: bash vm/scripts/deploy.sh
7372

7473
- name: Run VM integration tests
7574
working-directory: packages/os/linux
76-
continue-on-error: true
7775
timeout-minutes: 20
7876
run: bash vm/scripts/run-tests.sh
7977

packages/cloud-shared/src/lib/cache/redis-factory.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ import { Redis as UpstashRedis } from "@upstash/redis";
1717
import { MockSocketRedis } from "./mock-redis";
1818
import { SocketRedis } from "./socket-redis";
1919

20-
export type CompatibleRedis = SocketRedis | UpstashRedis | MockSocketRedis;
20+
// MockSocketRedis is duck-typed to SocketRedis; expose it as such so callers
21+
// don't need to widen their type signatures.
22+
export type CompatibleRedis = SocketRedis | UpstashRedis;
2123

2224
export interface RedisFactoryEnv {
2325
REDIS_URL?: string;
@@ -32,7 +34,7 @@ export function buildRedisClient(env?: RedisFactoryEnv): CompatibleRedis | null
3234
const e = env ?? (process.env as RedisFactoryEnv);
3335

3436
if (e.MOCK_REDIS === "1") {
35-
return new MockSocketRedis();
37+
return new MockSocketRedis() as unknown as SocketRedis;
3638
}
3739

3840
const url = e.REDIS_URL;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { describe, expect, it } from "vitest";
2+
import { detectLinuxDistro } from "../dependencies/dep-manager";
3+
4+
describe("detectLinuxDistro", () => {
5+
it("returns 'unknown' on non-Linux platforms", () => {
6+
if (process.platform !== "linux") {
7+
expect(detectLinuxDistro()).toBe("unknown");
8+
} else {
9+
// On Linux, detection must return one of the known families.
10+
expect([
11+
"debian",
12+
"fedora",
13+
"arch",
14+
"suse",
15+
"alpine",
16+
"unknown",
17+
]).toContain(detectLinuxDistro());
18+
}
19+
});
20+
});

0 commit comments

Comments
 (0)