Skip to content

build-check: add a targets input for manual runs - #40

Merged
nicksinas merged 2 commits into
mainfrom
nsinas/build-check-targets
Oct 17, 2026
Merged

nicksinas merged 2 commits into
mainfrom
nsinas/build-check-targets

Conversation

@nicksinas

Copy link
Copy Markdown
Collaborator

Summary

  • PRs and the weekly schedule do not change. They build each reference on its default target.
  • Manual runs (workflow_dispatch) get a new targets input:
    • empty: default target (same as before)
    • raspberrypi5 imx8mp-evk: every selected reference on each listed target
    • all: each reference on every entry in its own supported_targets
  • If a reference lists specific supported_targets and does not include the requested target, the pair is skipped and the detect job shows a notice. With all, a reference with supported_targets: "*" (or no list) uses its default target.
  • Target resolution moves from the build job into detect. The matrix is now {ref, target} pairs. Result rows and artifact names include the target, so one reference on several targets does not collide.

Usage

gh workflow run build-check.yml -R avocado-linux/references \
  -f refs="imx8mp-npu-pose" -f targets=all

Testing

  • Ran the new detect logic locally against every reference. With no inputs, it gives the same targets as the old resolver. With a target list, it skips unsupported pairs. With all, it expands each reference's supported_targets.
  • This PR changes only the workflow, so the PR check itself should report no references to build. A manual run from this branch is the real test.

PRs and the weekly schedule still build each reference on its default
target. A manual run can now pass `targets` as a space-separated list,
or `all` to build each reference on every entry in its own
supported_targets. Pairs a reference does not support are skipped with
a notice.

Target resolution moves into the detect job, so the build matrix is a
list of {ref, target} pairs. Result rows and artifacts are keyed by
both, so one reference on several targets does not collide.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Configuration errors can block unrelated builds, and repeated targets cause artifact upload conflicts.

2 open issues
What changed in this PR

Adds manual target selection to reference build checks while preserving default-target behavior for pull requests and scheduled runs.

Changes:

  • Supports explicit target lists and all, with notices for unsupported pairs.
  • Resolves reference/target pairs in detect.
  • Includes targets in job names, result files, and artifact names.
File Description
.github/​workflows/​build-check.yml Adds target selection and pair-based build reporting.

Review effort: Balanced

Comment thread .github/workflows/build-check.yml Outdated
Comment thread .github/workflows/build-check.yml Outdated
Repeated refs or targets made duplicate matrix jobs that collided on
artifact names. An unreadable avocado.yaml, or a ref that does not
exist, stopped detect so no ref built. Such a ref now stays in the
matrix and fails in its own build job.
@nicksinas
nicksinas requested review from jetm and a balanced review from Copilot October 16, 2026 22:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A non-mapping YAML configuration can abort detection and prevent healthy references from building.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Validate YAML root type inside try to prevent global build failure

.github/​workflows/​build-check.yml:105

A valid YAML document with a non-mapping root, such as [qemuarm64], passes safe_load but raises AttributeError at y.get(...) outside the handler. Because resolution now runs in detect, this prevents every selected reference from building, not just the malformed reference. Validate the root type inside the try so the existing per-reference fallback handles this configuration error too.

2 resolved since last review

Review effort: Balanced

@jetm jetm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the new targets input end to end: it reaches the python resolver through env and a quoted heredoc, and matrix.target only reaches run: blocks through env. I ran the resolver against all 35 references at this head. With no targets it picks the same target the old Resolve target step did for every reference, and targets=all expands to 72 jobs. Row files and artifact names now carry the target, so one reference on several targets no longer collides.

Nothing blocking. One thing worth considering as a follow-up: a mistyped target against references with an explicit supported_targets list skips every pair, so pairs ends up empty and the run finishes green with nothing built. Failing detect when a non-empty targets input yields zero pairs would keep red as the signal.

@nicksinas
nicksinas merged commit e853d08 into main Oct 17, 2026
4 checks passed
@nicksinas
nicksinas deleted the nsinas/build-check-targets branch October 17, 2026 16:36
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.

3 participants