Skip to content

fbuild compile-many silently disabled in CI due to wrong probe form (fbuild help SUB exits 2) #2660

Closed

Description

@zackees

Symptom

Every build_<board>.yml CI run on master logs:

fbuild ci and compile-many are unavailable in the installed fbuild; falling back to the legacy serial loop.

…and then builds 100+ examples one-by-one. See e.g. uno run 78718228931:

2026-05-31T10:21:45Z Starting compilation for 1 boards with 108 examples
2026-05-31T10:21:45Z fbuild ci and compile-many are unavailable in the installed fbuild;
                     falling back to the legacy serial loop.

The installed fbuild on that runner (2.2.6+) actually does support both subcommands.

Root cause

ci/util/fbuild_runner.py:146-168:

proc = subprocess.run(
    [fbuild_exe, "help", subcommand],   # <-- wrong invocation form
    ...
)
return proc.returncode == 0

fbuild help ci parses help as the subcommand name and ci as a positional sketch path arg, then clap rejects it for missing the required --board <BOARD>:

$ fbuild help ci
error: the following required arguments were not provided:
  --board <BOARD>
Usage: fbuild.exe ci --board <BOARD> <SKETCHES>...
$ echo $?
2

…so _fbuild_supports_subcommand always returns False, fbuild_supports_ci() / fbuild_supports_compile_many() always return False, and PioCompiler._build_with_fbuild (ci/compiler/pio.py:431-444) always falls through to _build_fbuild_sync — the legacy per-sketch serial loop.

fbuild <SUB> --help is intercepted by clap before arg validation and exits 0 regardless of whether other required args are present.

Impact

Every CI build on master serially loops over examples instead of using compile-many's stage-2 worker pool. On the GitHub Actions 2-core runners that's roughly 2× build wall time (FastLED defaults sketch_jobs to min(cpus, 2) on GitHub Actions per fbuild_runner.py:135-143). Recent uno run: ~3.5 min for 108 examples; with compile-many it would be closer to ~2 min.

Fix

Swap the probe form to <fbuild> <subcommand> --help. PR coming next; includes a regression test (test_fbuild_supports_subcommand_uses_sub_help_form) that asserts the exact command line emitted, so the same drift can't silently re-disable compile-many.

Activity

  1. added a commit that references this issue on May 31, 2026
    d2a0254
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions