Boot fix: - Ship proven Debian Live MBR (4552) as branding/isohdpfx.bin — the ISOLINUX package MBR (33ed) doesn't boot on all hardware. This was the root cause of "machine doesn't pick up the USB". Branding: - Custom GRUB background: pixel-art floating island (1024x574) - Archipelago pixel-art logo for Plymouth boot splash - GRUB theme: dark background, orange selected item, no broken font refs - Plymouth theme: script-based with progress bar, LUKS prompt support - Plymouth + splash added to target rootfs packages - GRUB theme installed on both installer ISO and target system - Serial console (ttyS0) added to kernel params for QEMU debugging CI improvements: - Smoke test step: mounts ISO, verifies all critical files, checks initrd has live-boot, confirms boot=live in grub.cfg. Fails build before copying to Builds if any check fails. Dev workflow: - dev-branding.sh: extract ISO, swap branding, repackage, boot in QEMU (~10 seconds vs 20 min full rebuild) - generate-grub-background.py: procedural cyberpunk background generator - generate-plymouth-logo.py: procedural logo generator - Improved test-iso-qemu.sh: --bios/--nographic flags, serial logging Build: - Simplified live-boot install (clean chroot, no complex fallbacks) - Static branding images preferred, generators as fallback Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
184 lines
8.4 KiB
YAML
184 lines
8.4 KiB
YAML
name: Build Archipelago ISO (dev)
|
|
|
|
on:
|
|
push:
|
|
branches: [dev-iso]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-iso:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
clean: false
|
|
|
|
- name: Install ISO build dependencies
|
|
run: |
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y -qq \
|
|
debootstrap squashfs-tools xorriso \
|
|
isolinux syslinux-common mtools \
|
|
grub-efi-amd64-bin grub-pc-bin grub-common
|
|
|
|
- name: Build backend
|
|
run: |
|
|
source $HOME/.cargo/env 2>/dev/null || true
|
|
cargo build --release --manifest-path core/Cargo.toml
|
|
|
|
- name: Build frontend
|
|
run: cd neode-ui && npm ci && npm run build
|
|
|
|
- name: Type check frontend
|
|
run: cd neode-ui && npx vue-tsc -b --noEmit
|
|
|
|
- name: Run frontend tests
|
|
run: cd neode-ui && npx vitest run
|
|
|
|
- name: Configure root podman for insecure registry
|
|
run: |
|
|
sudo mkdir -p /etc/containers/registries.conf.d
|
|
echo '[[registry]]
|
|
location = "80.71.235.15:3000"
|
|
insecure = true' | sudo tee /etc/containers/registries.conf.d/archipelago.conf
|
|
|
|
- name: Build unbundled ISO
|
|
run: |
|
|
cd image-recipe
|
|
export ARCHIPELAGO_BIN="$(pwd)/../core/target/release/archipelago"
|
|
ls -la "$ARCHIPELAGO_BIN" || echo "WARNING: binary not found"
|
|
sudo -E UNBUNDLED=1 DEV_SERVER=localhost BUILD_FROM_SOURCE=0 \
|
|
ARCHIPELAGO_BIN="$ARCHIPELAGO_BIN" \
|
|
./build-auto-installer-iso.sh
|
|
|
|
- name: Smoke test ISO
|
|
run: |
|
|
ISO=$(ls image-recipe/results/archipelago-installer-unbundled-*.iso 2>/dev/null | head -1)
|
|
if [ -z "$ISO" ]; then
|
|
echo "FAIL: No ISO produced"
|
|
exit 1
|
|
fi
|
|
echo "ISO: $ISO ($(du -h "$ISO" | cut -f1))"
|
|
|
|
# Mount and verify structure
|
|
MNT=$(mktemp -d)
|
|
sudo mount -o loop,ro "$ISO" "$MNT"
|
|
|
|
FAIL=0
|
|
for f in live/vmlinuz live/initrd.img live/filesystem.squashfs \
|
|
isolinux/isolinux.bin isolinux/isolinux.cfg \
|
|
boot/grub/grub.cfg EFI/BOOT/BOOTX64.EFI \
|
|
archipelago/auto-install.sh archipelago/rootfs.tar; do
|
|
if [ -e "$MNT/$f" ]; then
|
|
echo " OK: $f ($(sudo du -h "$MNT/$f" 2>/dev/null | cut -f1))"
|
|
else
|
|
echo " MISSING: $f"
|
|
FAIL=1
|
|
fi
|
|
done
|
|
|
|
# Verify initrd has live-boot
|
|
INITRD_DIR=$(mktemp -d)
|
|
sudo unmkinitramfs "$MNT/live/initrd.img" "$INITRD_DIR" 2>/dev/null
|
|
if [ -e "$INITRD_DIR/scripts/live" ] || [ -e "$INITRD_DIR/main/scripts/live" ]; then
|
|
echo " OK: initrd has live-boot scripts"
|
|
else
|
|
echo " MISSING: live-boot scripts in initrd!"
|
|
echo " initrd scripts/: $(ls "$INITRD_DIR/scripts/" 2>/dev/null || ls "$INITRD_DIR/main/scripts/" 2>/dev/null)"
|
|
FAIL=1
|
|
fi
|
|
|
|
# Check GRUB config has boot=live
|
|
if grep -q "boot=live" "$MNT/boot/grub/grub.cfg"; then
|
|
echo " OK: grub.cfg has boot=live"
|
|
else
|
|
echo " MISSING: boot=live in grub.cfg"
|
|
FAIL=1
|
|
fi
|
|
|
|
sudo umount "$MNT" 2>/dev/null
|
|
rmdir "$MNT" 2>/dev/null
|
|
sudo rm -r "$INITRD_DIR" 2>/dev/null
|
|
|
|
if [ "$FAIL" = "1" ]; then
|
|
echo "SMOKE TEST FAILED"
|
|
exit 1
|
|
fi
|
|
echo "SMOKE TEST PASSED"
|
|
|
|
- name: Copy to Builds
|
|
run: |
|
|
ISO=$(ls image-recipe/results/archipelago-installer-unbundled-*.iso 2>/dev/null | head -1)
|
|
if [ -n "$ISO" ]; then
|
|
DATE=$(date +%Y%m%d-%H%M)
|
|
DEST="/var/lib/archipelago/filebrowser/Builds/archipelago-dev-unbundled-${DATE}.iso"
|
|
sudo cp "$ISO" "$DEST"
|
|
sudo chown 1000:1000 "$DEST"
|
|
echo "ISO: archipelago-dev-unbundled-${DATE}.iso"
|
|
echo "Size: $(du -h "$DEST" | cut -f1)"
|
|
echo "SHA256: $(sha256sum "$DEST" | cut -d' ' -f1)"
|
|
fi
|
|
|
|
- name: Build report
|
|
if: always()
|
|
continue-on-error: true
|
|
run: |
|
|
set +eo pipefail
|
|
echo "══════════════════════════════════════════"
|
|
echo "DEV ISO BUILD REPORT"
|
|
echo "══════════════════════════════════════════"
|
|
echo "Commit: $(git rev-parse --short HEAD) ($(git log -1 --format=%s))"
|
|
echo "Branch: ${GITHUB_REF_NAME:-dev-iso}"
|
|
echo "Date: $(date -u '+%Y-%m-%d %H:%M:%S UTC')"
|
|
echo "Runner: $(hostname)"
|
|
echo ""
|
|
echo "── Artifacts ──"
|
|
ls -lh image-recipe/results/*.iso 2>/dev/null || echo " No ISO produced"
|
|
ls -lh /var/lib/archipelago/filebrowser/Builds/archipelago-dev-*.iso 2>/dev/null | tail -3
|
|
echo ""
|
|
echo "── Rootfs contents check ──"
|
|
ROOTFS=$(ls image-recipe/build/auto-installer/archipelago-rootfs.tar 2>/dev/null) || true
|
|
if [ -n "$ROOTFS" ]; then
|
|
echo " rootfs.tar: $(sudo du -h "$ROOTFS" 2>/dev/null | cut -f1 || echo 'unknown')"
|
|
echo " nginx config: $(sudo tar tf "$ROOTFS" ./etc/nginx/sites-available/archipelago 2>/dev/null && echo 'PRESENT' || echo 'MISSING')"
|
|
echo " SSL cert: $(sudo tar tf "$ROOTFS" ./etc/archipelago/ssl/archipelago.crt 2>/dev/null && echo 'PRESENT' || echo 'MISSING')"
|
|
echo " kiosk launcher: $(sudo tar tf "$ROOTFS" ./usr/local/bin/archipelago-kiosk-launcher 2>/dev/null && echo 'PRESENT' || echo 'MISSING')"
|
|
echo " backend binary: $(sudo tar tf "$ROOTFS" ./usr/local/bin/archipelago 2>/dev/null && echo 'PRESENT' || echo 'MISSING')"
|
|
echo " web-ui index: $(sudo tar tf "$ROOTFS" ./opt/archipelago/web-ui/index.html 2>/dev/null && echo 'PRESENT' || echo 'MISSING')"
|
|
else
|
|
echo " rootfs.tar not found in workspace"
|
|
fi
|
|
echo ""
|
|
echo "── ISO contents check ──"
|
|
ISO=$(ls image-recipe/results/archipelago-installer-unbundled-*.iso 2>/dev/null | head -1) || true
|
|
if [ -n "$ISO" ]; then
|
|
echo " ISO size: $(sudo du -h "$ISO" 2>/dev/null | cut -f1 || echo 'unknown')"
|
|
ISO_MOUNT=$(mktemp -d)
|
|
if sudo mount -o loop,ro "$ISO" "$ISO_MOUNT" 2>/dev/null; then
|
|
echo " auto-install.sh: $([ -f "$ISO_MOUNT/archipelago/auto-install.sh" ] && echo 'PRESENT' || echo 'MISSING')"
|
|
echo " rootfs.tar: $([ -f "$ISO_MOUNT/archipelago/rootfs.tar" ] && echo "PRESENT ($(sudo du -h "$ISO_MOUNT/archipelago/rootfs.tar" 2>/dev/null | cut -f1))" || echo 'MISSING')"
|
|
echo " backend bin: $([ -f "$ISO_MOUNT/archipelago/bin/archipelago" ] && echo "PRESENT ($(sudo du -h "$ISO_MOUNT/archipelago/bin/archipelago" 2>/dev/null | cut -f1))" || echo 'MISSING')"
|
|
echo " frontend: $([ -f "$ISO_MOUNT/archipelago/web-ui/index.html" ] && echo 'PRESENT' || echo 'MISSING')"
|
|
echo " vmlinuz: $([ -f "$ISO_MOUNT/live/vmlinuz" ] && echo 'PRESENT' || echo 'MISSING')"
|
|
echo " initrd: $([ -f "$ISO_MOUNT/live/initrd.img" ] && echo 'PRESENT' || echo 'MISSING')"
|
|
echo " squashfs: $([ -f "$ISO_MOUNT/live/filesystem.squashfs" ] && echo "PRESENT ($(sudo du -h "$ISO_MOUNT/live/filesystem.squashfs" 2>/dev/null | cut -f1))" || echo 'MISSING')"
|
|
echo " grub theme: $([ -d "$ISO_MOUNT/boot/grub/themes/archipelago" ] && echo 'PRESENT' || echo 'MISSING')"
|
|
sudo umount "$ISO_MOUNT" 2>/dev/null || true
|
|
else
|
|
echo " Could not mount ISO for inspection"
|
|
fi
|
|
rmdir "$ISO_MOUNT" 2>/dev/null || true
|
|
fi
|
|
echo "══════════════════════════════════════════"
|
|
|
|
- name: Fix workspace permissions
|
|
if: always()
|
|
run: |
|
|
sudo chown -R $(id -u):$(id -g) . 2>/dev/null || true
|
|
sudo chmod -R u+rwX . 2>/dev/null || true
|
|
sudo chown -R $(id -u):$(id -g) "$HOME/.cache/act" 2>/dev/null || true
|
|
sudo chmod -R u+rwX "$HOME/.cache/act" 2>/dev/null || true
|