secubox-deb/.github/workflows/build-eye-remote.yml
CyberMind 7c37415f88
feat(remote-ui): Phase 1 — extract common/ shared core (ref #127)
* feat(remote-ui/common): scaffold shared-core directory (ref #127)

* feat(remote-ui/common): extract palette.css from round/ (ref #127)

* fix(remote-ui/common): trim palette.css to spec (6 module + 8 C3BOX tokens) (ref #127)

* feat(remote-ui/common): extract base.css verbatim from round/ (ref #127)

* feat(remote-ui/common): extract ICONS to icons.js (ref #127)

* docs(remote-ui/common): correct icons.js header comment — sizes are {22,48,96} not 128 (ref #127)

* feat(remote-ui/common): extract RINGS + CX/CY/SA to modules-table.js (ref #127)

* feat(remote-ui/common): extract CFG to config.js (replaces jwt-helper.js per #127 plan revision)

* feat(remote-ui/common): extract TransportManager with onModuleTap/onTransportChange hooks (ref #127)

* feat(remote-ui/common): extract SIM + simStep to sim.js (ref #127)

* feat(remote-ui/common): move 24 SecuBox module PNG icons to common/assets/icons/ (ref #127)

* feat(remote-ui/common): move secubox-otg-gadget.sh, add GADGET_NAME env override + arm64 serial fallback (ref #127)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(remote-ui/common): trim whitespace from device-tree serial-number read (ref #127)

* feat(remote-ui/common): move secubox-otg-host-up.sh + variant-aware comment (ref #127)

* refactor(remote-ui/round): consume common/ via <link>/<script> tags (ref #127)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(secubox-system): add form_factor to RemoteUIConnectedRequest with TDD (ref #127)

* feat(remote-ui/round): deploy.sh bundles common/ alongside round/ (ref #127)

* fix(remote-ui/round): deploy.sh COMMON_SRC path resolution + rsync --delete (ref #127)

* feat(remote-ui/round): build-eye-remote-image.sh embeds common/ + nginx /common/ alias (ref #127)

* docs(remote-ui): document common/ dependency in round/ docs (ref #127)

* docs(remote-ui/round): clarify palette.css is forward-looking (ref #127)

* docs(remote-ui): Task 18 regression-gate report — structural verification (ref #127)

Full diffoscope gate blocked by missing hyperpixel2r.dtbo prerequisite.
Structural equivalence verified instead: Phase 1 changes are purely
additive (common/ embed + nginx /common/ alias + extracted JS/CSS/icons),
no behavioural change to round/'s existing logic.

User must run the full image diffoscope manually after sourcing the
hyperpixel2r.dtbo blob, before final merge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci(eye-remote): bump workflow VERSION env 2.2.0 → 2.2.1 (ref #127)

Pre-existing drift: build-eye-remote-image.sh writes
secubox-eye-remote-2.2.1.img but the workflow's Compress/Checksum/
Upload steps reference ${{ env.VERSION }} = 2.2.0, so the compress
step fails with "No such file or directory" after a successful build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: CyberMind-FR <gandalf@Gk2.net>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 05:59:40 +02:00

191 lines
6.1 KiB
YAML

name: Build Eye Remote Image
on:
workflow_dispatch:
inputs:
wifi_ssid:
description: 'WiFi SSID (optional)'
required: false
default: ''
wifi_psk:
description: 'WiFi password (optional)'
required: false
default: ''
hostname:
description: 'Device hostname'
required: false
default: 'secubox-round'
create_release:
description: 'Create GitHub release'
required: false
default: 'false'
type: choice
options:
- 'true'
- 'false'
push:
tags:
- 'eye-remote-v*'
paths:
- 'remote-ui/round/**'
pull_request:
paths:
- 'remote-ui/round/**'
env:
VERSION: '2.2.1'
RPI_OS_URL: 'https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-11-19/2024-11-19-raspios-bookworm-armhf-lite.img.xz'
jobs:
# Run menu system tests first
test-menu-system:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install test dependencies
run: |
pip install pytest pytest-asyncio pillow
- name: Run menu system tests
run: |
cd remote-ui/round
python -m pytest tests/ -v --tb=short
continue-on-error: true # Don't block build on test failures for now
build-eye-remote:
needs: test-menu-system
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
df -h
- name: Install build tools
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq \
parted dosfstools e2fsprogs \
xz-utils wget rsync \
qemu-user-static binfmt-support
# Ensure ARM binfmt is registered
sudo systemctl restart binfmt-support || true
sudo update-binfmts --enable qemu-arm || true
# Verify QEMU is working
if [ -f /proc/sys/fs/binfmt_misc/qemu-arm ]; then
echo "✓ QEMU ARM binfmt registered"
else
echo "⚠ QEMU ARM binfmt not found, attempting manual registration"
sudo update-binfmts --import qemu-arm || true
fi
- name: Download Raspberry Pi OS Lite
run: |
echo "Downloading Raspberry Pi OS Lite (armhf)..."
wget -q -O /tmp/raspios-lite.img.xz "${{ env.RPI_OS_URL }}"
ls -lh /tmp/raspios-lite.img.xz
- name: Build Eye Remote image (OFFLINE MODE)
run: |
cd remote-ui/round
# Build options
BUILD_ARGS="-i /tmp/raspios-lite.img.xz -o /tmp"
if [ -n "${{ github.event.inputs.wifi_ssid }}" ]; then
BUILD_ARGS="$BUILD_ARGS -s '${{ github.event.inputs.wifi_ssid }}' -p '${{ github.event.inputs.wifi_psk }}'"
fi
HOSTNAME="${{ github.event.inputs.hostname || 'secubox-round' }}"
BUILD_ARGS="$BUILD_ARGS -h $HOSTNAME"
echo "Building with: $BUILD_ARGS"
sudo bash ./build-eye-remote-image.sh $BUILD_ARGS
sudo chown $(id -u):$(id -g) /tmp/secubox-eye-remote-*.img
timeout-minutes: 60
- name: Compress image
run: |
cd /tmp
echo "Compressing Eye Remote image..."
xz -9 -v secubox-eye-remote-${{ env.VERSION }}.img
ls -lh secubox-eye-remote-${{ env.VERSION }}.img.xz
- name: Generate checksums
run: |
cd /tmp
sha256sum secubox-eye-remote-${{ env.VERSION }}.img.xz > secubox-eye-remote-${{ env.VERSION }}.sha256
cat secubox-eye-remote-${{ env.VERSION }}.sha256
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: secubox-eye-remote-${{ env.VERSION }}
path: |
/tmp/secubox-eye-remote-${{ env.VERSION }}.img.xz
/tmp/secubox-eye-remote-${{ env.VERSION }}.sha256
retention-days: 30
- name: Upload to release (on tag or manual)
if: startsWith(github.ref, 'refs/tags/eye-remote-v') || github.event.inputs.create_release == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || format('eye-remote-v{0}', env.VERSION) }}
name: Eye Remote v${{ env.VERSION }}
files: |
/tmp/secubox-eye-remote-${{ env.VERSION }}.img.xz
/tmp/secubox-eye-remote-${{ env.VERSION }}.sha256
body: |
## Eye Remote v${{ env.VERSION }} — Radial Menu Edition
### 🎯 What's New
- **Radial Menu System** — 6-slice pie menu for touchscreen control
- **Touch Handler** — Full gesture support (tap, long-press, swipe)
- **Action Executor** — Modular command dispatcher
- **Local Settings API** — Display brightness, network config, system info
### 📦 Image Details
| Image | Hardware | Description |
|-------|----------|-------------|
| `secubox-eye-remote-${{ env.VERSION }}.img.xz` | RPi Zero W + HyperPixel 2.1 Round | USB Gadget Controller |
**🔌 OFFLINE MODE:** All packages pre-installed. No internet required at boot!
### 🎮 Radial Menu Gestures
| Gesture | Action |
|---------|--------|
| Long-press center | Enter menu mode |
| Tap slice | Select item |
| Tap center | Go back |
| 3-finger tap | Emergency exit |
### 💾 Flash to SD card
```bash
xzcat secubox-eye-remote-${{ env.VERSION }}.img.xz | sudo dd of=/dev/sdX bs=4M status=progress
```
### 🔐 Default credentials
- User: `pi`
- Password: `raspberry`
### ⏱️ First boot
~60s (no package download needed)
See [Eye-Remote Wiki](https://github.com/CyberMind-FR/secubox-deb/wiki/Eye-Remote) for full documentation.