Skip to content

feat(ci): screen-zoo — OLED screenshots as CI artifact#68

Open
BitHighlander wants to merge 16 commits intodevelopfrom
feature/screen-zoo
Open

feat(ci): screen-zoo — OLED screenshots as CI artifact#68
BitHighlander wants to merge 16 commits intodevelopfrom
feature/screen-zoo

Conversation

@BitHighlander
Copy link
Owner

Summary

  • Every PR against develop now produces a downloadable screen-zoo artifact with pixel-by-pixel OLED screenshots from the emulator
  • Covers Zcash (FVK, PCZT signing, transparent), Solana (address), Ethereum (address, sign, xfer, ERC-20, messages)
  • KEEPKEY_SCREENSHOT=1 env var enables capture in python-keepkey (was hardcoded off)

What's in the artifact

screen-zoo/
├── zcash-orchard-fvk/     scr00000.png, scr00001.png, ...
├── zcash-orchard-pczt/    scr00000.png, scr00001.png, ...
├── zcash-transparent/     ...
├── solana/                ...
├── ethereum-address/      ...
├── ethereum-sign/         ...
├── ethereum-xfer/         ...
├── ethereum-erc20/        ...
└── ethereum-message/      ...

Test plan

  • CI run produces screen-zoo artifact on this PR
  • PNGs are 128x64 pixel device OLED captures
  • No impact on existing test pass/fail (zoo job is independent)

BitHighlander and others added 16 commits March 18, 2026 17:13
Captures device OLED framebuffer PNGs for every PR against develop:
- Zcash: Orchard FVK export, PCZT signing, transparent signing
- Solana: address derivation
- Ethereum: address, sign tx, transfers, ERC-20 approvals, messages

How it works:
- client.py now supports KEEPKEY_SCREENSHOT=1 env var (was hardcoded off)
- screen-zoo.sh runs targeted test suites with PIL capture enabled
- New CI job uploads screen-zoo/ artifact with per-chain directories
- 90-day retention, runs in parallel with existing test jobs

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The previous commit changed deps/python-keepkey submodule pointer to a
local-only commit, breaking CI. Fix: revert submodule to upstream, and
have screen-zoo.sh sed-patch client.py at runtime to enable screenshots.
The previous commit pointed deps/python-keepkey to a local-only commit
that CI cannot fetch. Reverted to 0f6be2b4 (upstream). Screenshot
support is now patched at runtime by screen-zoo.sh via sed.
Previous run failed because:
- emu image doesn't have pytest or Pillow installed
- zoo script ran in a container that couldn't reach the emulator

Fix:
- zoo script now pip-installs pytest + Pillow + python-keepkey
- emulator and zoo run in the same container (bridge + kkemu + script)
- only mount screen-zoo output dir and zoo script (don't override /kkemu)
- Dockerfile: install Pillow, pytest, python-keepkey at build time
- Merge build-emulator + unit-tests + screen-zoo into one job
- emu-image artifact only uploaded on workflow_dispatch (publish)
- Normal PRs upload only: unit-test-results + screen-zoo PNGs
Tests import keepkeylib via sys.path manipulation, not pip. The zoo
script just needs to sed-replace SCREENSHOT = False with the PIL
import + True. Removed all pip install attempts, verification scripts,
and multi-line python patching that was causing failures.
- Base image is Alpine, not Debian — apt-get doesn't exist
- Use apk add py3-pillow, fallback to building from source with dev headers
- pytest was already installed in base image
- Upload step now errors on empty zoo instead of silently passing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant