Skip to content

ci: standardize per-platform smoke sketches + opt-in PlatformIO comparison job in build_template.yml #2411

Open

Description

@zackees

Background

Today the platform smoke tests at tests/platforms/<x>/ are ad-hoc — whatever someone happened to drop in. There is no shared baseline of "every supported board must compile this exact set of representative sketches." That makes regressions board-specific and hard to compare across backends.

This issue is a follow-up to #2410 (compiler-flag drift detection between fbuild and PlatformIO). Even with flag-drift detection, we also need a standardized cross-backend test harness so we can quickly answer the question "does PlatformIO build this same code, or is fbuild the only thing that fails?" — which is exactly what we couldn't easily answer when Teensy 4.x broke.

Concretely, the recent Teensy 4.x section-conflict regression (uncommitted on branch pr-2395) took manual CI archaeology to confirm it was an fbuild-only failure. A one-click PlatformIO comparison job would have made it obvious in minutes.

Proposal

Part A: standardized per-platform smoke sketch set

Define a small canonical set of sketches (e.g. Blink, XYMatrix, a chipset that exercises PROGMEM tables, an audio sketch that exercises FFT/sin LUTs) that every board MUST compile in CI. Living in something like tests/platforms/_standard/ rather than per-board directories.

Per-board overrides remain available in tests/platforms/<board>/ for board-specific quirks, but the standard set is the contract.

Part B: opt-in PlatformIO comparison job in build_template.yml

Extend .github/workflows/build_template.yml with a new input:

inputs:
  also_build_with_platformio:
    type: boolean
    required: false
    default: false   # opt-in for speed

When set, the template runs the same standardized sketch set through PlatformIO in addition to fbuild, and the workflow summary shows:

Default-disabled so normal PR builds aren't slowed down. Triggered by:

  • Manual workflow_dispatch with the input set true
  • A PR label like ci: also-build-pio for diagnostic runs
  • Nightly on master

Part C: agent docs update

Update agents/docs/commands-reference.md (and/or agents/docs/build-system.md) with a section explaining:

When fbuild fails on a board and you suspect backend drift rather than a real source bug, trigger the PlatformIO comparison build by adding the ci: also-build-pio label. If PlatformIO passes the same sketch, the failure is likely flag drift — see #2410.

Acceptance criteria

  • Canonical sketch set lives at tests/platforms/_standard/ with documented contract
  • build_template.yml exposes also_build_with_platformio input, default false
  • Workflow summary clearly differentiates fbuild vs PlatformIO results when both ran
  • Agent docs include a "diagnosing fbuild-only failures" section pointing at this option
  • Doesn't slow down the default per-PR build matrix

Related

Activity

  1. added
    status: triage
    type: feature
    priority: medium
    area: ci
    on Apr 25, 2026
  2. added
    deferred
    on Aug 20, 2026
  3. zackees commented on Aug 20, 2026

    @zackees
    MemberAuthor

    Deferred after a current-master audit. PR #2803 completed only Part A (the smoke-sketch manifest/parser). Parts B/C remain: consuming the manifest in board CI, an opt-in PlatformIO comparison input/trigger, dual-backend summaries and command comparison, and diagnostic docs. This is a multi-workflow CI feature; resume with an owner for the comparison-job design and runner-cost budget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cideferredpriority: mediumstatus: triagetype: feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions