Skip to content

ci: make the DiagROM boot smoke actually run#171

Merged
LinuxJedi merged 1 commit into
mainfrom
ci/diagrom-smoke-always-run
Jul 12, 2026
Merged

ci: make the DiagROM boot smoke actually run#171
LinuxJedi merged 1 commit into
mainfrom
ci/diagrom-smoke-always-run

Conversation

@LinuxJedi

Copy link
Copy Markdown
Owner

Problem

The diagrom-smoke CI job has never executed, for three stacked reasons:

  1. Never enabled: it was gated on vars.DIAGROM_URL, a repository variable that was never set, so the job silently skipped on every run.
  2. Fetch was wrong anyway: the step saved whatever the URL serves directly as diagrom.rom, but diagrom.com only serves zip archives (there is no raw ROM URL upstream, and the GitHub repo holds source only).
  3. Boot assumption went stale: the run step relied on the old ./diagrom.rom default ROM lookup, which was removed when the bundled AROS ROM became the no-argument fallback. Even a correctly fetched ROM would not have been booted.

The local ignored test diagrom_menu_preserves_left_margin_text_columns was broken by the same removed default, and its 6s screenshot expectation predates the current default machine (512K chip + 512K slow), where DiagROM's memory detection plus serial-mode countdown still own the screen at that point.

Changes

.github/workflows/ci.yml -- the job now runs unconditionally:

  • Downloads the official stable V1.3 archive, checksum-pinned (frozen upstream since April 2023) and cached via actions/cache, so the author's site is hit roughly once rather than per-run. DIAGROM_URL remains as an override should the official URL move. The ROM is deliberately not committed: the author keeps distribution to the official site.
  • Extracts DiagROM/DiagROM, the emulator-usable image per the archive's Readme, and boots it as an explicit positional ROM.
  • Asserts on DiagROM's version banner (Amiga DiagROM V1.3 ...) arriving over the emulated serial port on stdout -- this proves the ROM's boot code executed, where the previous test -s diag.png passed even for a black screen. The serial log is uploaded alongside the screenshot artifact.
  • Then runs the repaired asset-gated image-regression test against the fetched ROM.

tests/image_regression.rs -- the ignored test now passes the ROM positionally and screenshots the main menu at 35s (reached at ~28s on the default machine, then static while waiting for input), asserting the yellow Serial: status-bar label at the left margin of the full-overscan frame (230 pure-yellow pixels measured; threshold 100).

Verification

All steps were run locally end-to-end:

  • Fetch/checksum/extract logic verified verbatim (zip sha256 a575f8fa..., extracted ROM 1803bfff...).
  • Boot smoke: banner lands on stdout within the 6s window, screenshot non-empty.
  • cargo test --release --locked --test image_regression diagrom -- --ignored passes (menu screenshot pixel-identical at 30s and 40s).
  • cargo fmt --check and cargo clippy --release --tests clean.

The diagrom-smoke job has never executed, for three stacked reasons:

- It was gated on a DIAGROM_URL repository variable that was never set,
  so the job silently skipped on every run.
- Even with the variable set, the fetch step saved whatever the URL
  serves directly as diagrom.rom, but diagrom.com only serves zip
  archives; there is no raw ROM URL upstream.
- The boot step relied on the old ./diagrom.rom default ROM lookup,
  which was removed when the bundled AROS ROM became the no-argument
  fallback, so the run would not have booted DiagROM anyway.

The job now runs unconditionally: it downloads the official stable
V1.3 archive (checksum-pinned and cached across runs so the author's
site is hit roughly once), extracts the emulator-usable DiagROM image,
and boots it as an explicit positional ROM. DIAGROM_URL remains as an
optional override should the official URL move.

The smoke assertion is now DiagROM's version banner on the serial
port (routed to stdout), which proves the ROM's boot code executed;
the previous non-empty-PNG check passed even for a black screen. The
job then runs the asset-gated diagrom image-regression test, which is
repaired here as well: it depended on the same removed ./diagrom.rom
default, and its 6s screenshot predates the current default machine
(512K chip + 512K slow), where memory detection plus the serial-mode
countdown still own the screen at that point. It now passes the ROM
positionally and screenshots the main menu at 35s, which is reached
at ~28s and then stays put, asserting the yellow status-bar text at
the left margin of the full-overscan frame.
@LinuxJedi LinuxJedi merged commit 3a6a2fb into main Jul 12, 2026
5 checks passed
@LinuxJedi LinuxJedi deleted the ci/diagrom-smoke-always-run branch July 12, 2026 11:29
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