Skip to content

ci: build only the Zephyr boards that have the changed module - #11316

Open
lynt-smitka wants to merge 1 commit into
adafruit:mainfrom
MakerClassCZ:ci-zephyr-module-map
Open

ci: build only the Zephyr boards that have the changed module#11316
lynt-smitka wants to merge 1 commit into
adafruit:mainfrom
MakerClassCZ:ci-zephyr-module-map

Conversation

@lynt-smitka

Copy link
Copy Markdown

ci_set_matrix.py cannot ask make which Zephyr boards compile a module, so any module change builds all 29 of them, and so does a frozen library update although the port has no frozen modules.

The module table of a Zephyr board is only known to its build, which writes autogen_board_info.toml; the committed copy can lag, CI only warns when it is out of date. So build_release_files.py copies the table the push build generated to bin/zephyr-modules//.toml, the existing bin/ upload puts it on S3 next to mpy-cross and the stubs, and the scheduler fetches it for the PR's base ref. A board with a missing table is built. Since the module set only changes through files that build every Zephyr board anyway, the tables refresh themselves on the next push.

Until the first push build after this lands every Zephyr board is built, as today.

ci_set_matrix.py cannot ask make which Zephyr boards compile a module,
so a change to any module built all 29 of them, and a frozen library
update too although the port has no frozen modules.

The module table of a Zephyr board is only known to its build, which
writes it to autogen_board_info.toml. Keep it: build_release_files.py
copies the file the push build generated to bin/zephyr-modules/<ref>/
<board>.toml, from where the existing bin/ upload puts it on S3 next to
mpy-cross and the stubs. The scheduler fetches it for the PR's base ref
and builds a board when the table says the module is enabled, or when
the table is missing, unreadable or does not know the module. frozen/
changes build no Zephyr boards; supervisor/ changes still build all.

Until the first push build after this lands there is no table and
every Zephyr board is built, as today. ZEPHYR_MODULES_URL overrides the
location for testing.
@dhalbert
dhalbert requested a review from tannewt September 4, 2026 20:59
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