Skip to content

Commit ea8230d

Browse files
authored
Merge pull request #7755 from elizaOS/fix/pr-7714-7715-review-issues
Fix/pr 7714 7715 review issues
2 parents bd5bd16 + 3164efa commit ea8230d

77 files changed

Lines changed: 6613 additions & 198 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
61.3 KB
Loading
78 KB
Loading
75.4 KB
Loading

.github/workflows/android-release.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,16 @@ jobs:
244244
sha256sum "$AAB_PATH" "$APK_PATH" > packages/app/android/app/build/outputs/release-SHA256SUMS.txt
245245
cat packages/app/android/app/build/outputs/release-SHA256SUMS.txt
246246
247+
- name: Stage sideload APK with canonical name
248+
run: |
249+
VERSION="${{ steps.version.outputs.name }}"
250+
APK_SRC="packages/app/android/app/build/outputs/apk/release/app-release.apk"
251+
SIDELOAD_APK="elizaos-android-${VERSION}-release.apk"
252+
cp "$APK_SRC" "$SIDELOAD_APK"
253+
sha256sum "$SIDELOAD_APK" > "${SIDELOAD_APK}.sha256"
254+
echo "Sideload APK: $SIDELOAD_APK"
255+
echo "SHA256: $(cat "${SIDELOAD_APK}.sha256")"
256+
247257
- name: Upload Android release artifacts
248258
uses: actions/upload-artifact@v7
249259
with:
@@ -252,6 +262,8 @@ jobs:
252262
packages/app/android/app/build/outputs/bundle/release/app-release.aab
253263
packages/app/android/app/build/outputs/apk/release/app-release.apk
254264
packages/app/android/app/build/outputs/release-SHA256SUMS.txt
265+
elizaos-android-${{ steps.version.outputs.name }}-release.apk
266+
elizaos-android-${{ steps.version.outputs.name }}-release.apk.sha256
255267
retention-days: 90
256268

257269
- name: Attach Android artifacts to GitHub Release
@@ -260,6 +272,7 @@ jobs:
260272
run: |
261273
VERSION="${{ steps.version.outputs.name }}"
262274
TAG="v${VERSION}"
275+
SIDELOAD_APK="elizaos-android-${VERSION}-release.apk"
263276
if ! gh release view "$TAG" >/dev/null 2>&1; then
264277
echo "::error::No GitHub release found for $TAG; cannot attach AAB."
265278
exit 1
@@ -270,7 +283,13 @@ jobs:
270283
"Eliza-${VERSION}.apk"
271284
cp packages/app/android/app/build/outputs/release-SHA256SUMS.txt \
272285
"Eliza-${VERSION}.android.SHA256SUMS.txt"
273-
gh release upload "$TAG" "Eliza-${VERSION}.aab" "Eliza-${VERSION}.apk" "Eliza-${VERSION}.android.SHA256SUMS.txt" --clobber
286+
gh release upload "$TAG" \
287+
"Eliza-${VERSION}.aab" \
288+
"Eliza-${VERSION}.apk" \
289+
"Eliza-${VERSION}.android.SHA256SUMS.txt" \
290+
"${SIDELOAD_APK}" \
291+
"${SIDELOAD_APK}.sha256" \
292+
--clobber
274293
275294
- name: Clean up keystore
276295
if: always()
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Build elizaOS Debian Package
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
release:
7+
types: [created]
8+
9+
jobs:
10+
build-deb:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 30
13+
14+
permissions:
15+
contents: write
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Install Debian build tools
22+
run: |
23+
sudo apt-get update -qq
24+
sudo apt-get install -y --no-install-recommends \
25+
dpkg-dev \
26+
devscripts \
27+
debhelper \
28+
dh-make \
29+
fakeroot \
30+
lintian
31+
32+
- name: Set up Bun
33+
uses: oven-sh/setup-bun@v2
34+
with:
35+
bun-version: "1.3.13"
36+
37+
- name: Install dependencies
38+
run: bun install --frozen-lockfile
39+
40+
- name: Build
41+
run: bun run build
42+
43+
- name: Build .deb package
44+
id: deb
45+
continue-on-error: true
46+
run: |
47+
if [ ! -d packages/app-core/packaging/debian ]; then
48+
echo "WARN: packages/app-core/packaging/debian not found; skipping .deb build"
49+
exit 0
50+
fi
51+
cd packages/app-core/packaging/debian
52+
dpkg-buildpackage -us -uc -b 2>/dev/null || debuild -us -uc -b 2>/dev/null || true
53+
54+
- name: Find and checksum .deb
55+
id: find_deb
56+
run: |
57+
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"
68+
fi
69+
70+
- name: Upload .deb artifact
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: elizaos-debian-package
74+
path: |
75+
**/*.deb
76+
**/*.deb.sha256
77+
if-no-files-found: warn
78+
retention-days: 30
79+
80+
- name: Upload to GitHub Release
81+
if: (github.event_name == 'release') && steps.find_deb.outputs.deb_path != ''
82+
uses: softprops/action-gh-release@v2
83+
with:
84+
files: |
85+
**/*.deb
86+
**/*.deb.sha256
87+
fail_on_unmatched_files: false
88+
env:
89+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90+
91+
- name: Write .deb metadata to summary
92+
run: |
93+
{
94+
echo "## elizaOS Debian Package"
95+
echo "| Field | Value |"
96+
echo "| ----- | ----- |"
97+
if [ -n "${{ steps.find_deb.outputs.deb_path }}" ]; then
98+
echo "| File | \`${{ steps.find_deb.outputs.deb_path }}\` |"
99+
echo "| SHA-256 | \`${{ steps.find_deb.outputs.deb_sha256 }}\` |"
100+
echo "| Size | ${{ steps.find_deb.outputs.deb_size }} bytes |"
101+
else
102+
echo "| Status | not produced (packaging/debian may not be present yet) |"
103+
fi
104+
} >> "$GITHUB_STEP_SUMMARY"
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
name: Build elizaOS Linux ISO
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
channel:
7+
type: string
8+
default: stable
9+
publish:
10+
type: boolean
11+
default: false
12+
workflow_dispatch:
13+
inputs:
14+
channel:
15+
description: Release channel
16+
type: choice
17+
options: [nightly, beta, stable]
18+
default: nightly
19+
publish:
20+
description: Upload to GitHub Release
21+
type: boolean
22+
default: false
23+
schedule:
24+
- cron: '0 3 * * *'
25+
release:
26+
types: [created]
27+
28+
jobs:
29+
build-iso:
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 120
32+
env:
33+
CHANNEL: ${{ inputs.channel || (github.event_name == 'release' && 'stable') || 'nightly' }}
34+
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0
40+
41+
- name: Install live-build and dependencies
42+
run: |
43+
sudo apt-get update -qq
44+
sudo apt-get install -y --no-install-recommends \
45+
live-build \
46+
just \
47+
squashfs-tools \
48+
xorriso \
49+
isolinux \
50+
syslinux-efi \
51+
grub-efi-amd64-bin \
52+
grub-pc-bin \
53+
mtools \
54+
dosfstools \
55+
python3 \
56+
curl \
57+
rsync
58+
59+
- name: Set up Bun
60+
uses: oven-sh/setup-bun@v2
61+
with:
62+
bun-version: "1.3.13"
63+
64+
- name: Install dependencies
65+
run: bun install --frozen-lockfile
66+
67+
- name: Restore model cache
68+
uses: actions/cache@v4
69+
with:
70+
path: ~/.cache/usbeliza-build/models
71+
key: elizaos-model-cache-${{ hashFiles('packages/os/linux/Justfile') }}
72+
restore-keys: elizaos-model-cache-
73+
74+
- name: Restore CLI cache
75+
uses: actions/cache@v4
76+
with:
77+
path: ~/.cache/usbeliza-build/cli
78+
key: elizaos-cli-cache-${{ hashFiles('packages/os/linux/Justfile') }}
79+
restore-keys: elizaos-cli-cache-
80+
81+
- name: Install Rust toolchain
82+
uses: dtolnay/rust-toolchain@stable
83+
with:
84+
targets: x86_64-unknown-linux-gnu
85+
86+
- name: Cache Rust build
87+
uses: actions/cache@v4
88+
with:
89+
path: |
90+
~/.cargo/registry
91+
~/.cargo/git
92+
packages/os/linux/target
93+
key: elizaos-iso-rust-${{ runner.os }}-${{ hashFiles('packages/os/linux/**/Cargo.lock', 'packages/os/linux/**/Cargo.toml') }}
94+
restore-keys: elizaos-iso-rust-${{ runner.os }}-
95+
96+
- name: Stage ISO build
97+
working-directory: packages/os/linux
98+
run: just iso-stage
99+
100+
- name: Cache pre-downloaded models
101+
working-directory: packages/os/linux
102+
run: just iso-cache-model
103+
104+
- name: Cache pre-downloaded CLIs
105+
working-directory: packages/os/linux
106+
run: just iso-cache-cli
107+
108+
- name: Configure live-build
109+
working-directory: packages/os/linux
110+
run: just iso-config
111+
112+
- name: Validate ISO config
113+
working-directory: packages/os/linux
114+
run: just iso-check
115+
116+
- name: Build ISO
117+
working-directory: packages/os/linux
118+
run: sudo just iso-build
119+
timeout-minutes: 90
120+
121+
- name: Locate and rename ISO
122+
id: iso
123+
run: |
124+
ISO=$(find packages/os/linux -name "*.iso" | head -1)
125+
if [ -z "$ISO" ]; then
126+
echo "ERROR: ISO not found after build"
127+
exit 1
128+
fi
129+
DATE=$(date +%Y.%m.%d)
130+
DEST="elizaos-linux-live-${CHANNEL}-${DATE}-amd64.iso"
131+
cp "$ISO" "$DEST"
132+
SHA256=$(sha256sum "$DEST" | cut -d' ' -f1)
133+
SIZE=$(stat --format="%s" "$DEST")
134+
echo "path=$DEST" >> "$GITHUB_OUTPUT"
135+
echo "sha256=$SHA256" >> "$GITHUB_OUTPUT"
136+
echo "size=$SIZE" >> "$GITHUB_OUTPUT"
137+
echo "filename=$DEST" >> "$GITHUB_OUTPUT"
138+
139+
- name: Generate SHA256SUMS
140+
run: |
141+
sha256sum "${{ steps.iso.outputs.path }}" > "${{ steps.iso.outputs.filename }}.sha256"
142+
143+
- name: Smoke test ISO (headless QEMU)
144+
if: runner.os == 'Linux'
145+
continue-on-error: true
146+
run: |
147+
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
150+
ISO_PATH="${{ steps.iso.outputs.path }}"
151+
SERIAL_LOG=$(mktemp)
152+
timeout "$QEMU_TIMEOUT" qemu-system-x86_64 \
153+
-cdrom "$ISO_PATH" \
154+
-boot d \
155+
-m 2G \
156+
-smp 2 \
157+
-display none \
158+
-vga none \
159+
-serial "file:$SERIAL_LOG" \
160+
-no-reboot \
161+
-nographic 2>/dev/null || true
162+
if grep -qi "elizaOS\|eliza\|login:" "$SERIAL_LOG" 2>/dev/null; then
163+
echo "ISO smoke test: boot strings found in serial log"
164+
else
165+
echo "WARN: boot strings not detected in serial log (QEMU may not support KVM in CI)"
166+
fi
167+
rm -f "$SERIAL_LOG"
168+
169+
- name: Upload ISO artifact
170+
uses: actions/upload-artifact@v4
171+
with:
172+
name: elizaos-linux-iso-${{ env.CHANNEL }}
173+
path: |
174+
${{ steps.iso.outputs.path }}
175+
${{ steps.iso.outputs.filename }}.sha256
176+
retention-days: 7
177+
178+
- 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)
180+
uses: softprops/action-gh-release@v2
181+
with:
182+
files: |
183+
${{ steps.iso.outputs.path }}
184+
${{ steps.iso.outputs.filename }}.sha256
185+
tag_name: ${{ github.event.release.tag_name || github.ref_name }}
186+
env:
187+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
188+
189+
- name: Write ISO metadata to summary
190+
run: |
191+
{
192+
echo "## elizaOS Linux ISO"
193+
echo "| Field | Value |"
194+
echo "| ----- | ----- |"
195+
echo "| File | \`${{ steps.iso.outputs.filename }}\` |"
196+
echo "| SHA-256 | \`${{ steps.iso.outputs.sha256 }}\` |"
197+
echo "| Size | ${{ steps.iso.outputs.size }} bytes |"
198+
echo "| Channel | ${CHANNEL} |"
199+
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)