nuttx/.github
zhangning21 44cdacf607 ci: apply Depends-On dependencies to the memory report
The memory report builds this pull request merged into master, together
with the nuttx-apps default branch, and nothing else, so a companion or
predecessor pull request it declares is absent. For a breaking change the
target then fails to build and no report is produced at all, even though
the Build workflow already tests the declared sources through Depends-On.

Apply the declared dependencies before building, reusing the parser and
the fetch/cherry-pick sequence that build.yml uses, and mapping each
repository to its checkout exactly as build.yml does. A stacked nuttx
dependency is no more optional than an apps one: a pull request that uses
an API its predecessor introduces does not build without it.

As build.yml does, read the description through the API rather than
trusting the event payload, so that a manual re-run after editing a
Depends-On line applies the current declaration instead of the one the run
was created with. Unlike build.yml, a failed read stops the job rather
than falling back to the payload: build.yml resolves this once and hands
every target the same tree, while this job runs per target, so a fallback
could leave targets on different declarations while their results are
filed under one SHA.

A declared dependency that cannot be applied fails the job, and so does a
missing parser, a parser crash, or a status this step does not recognise:
each of those means the declaration was never evaluated, and continuing
would measure a combination nobody asked for. build.yml fails Fetch-Source
on the same conditions, and no other step in this job carries
continue-on-error, so falling back silently would be inconsistent with
both. A declaration that parses to nothing valid only warns, again
matching build.yml.

Forward the parser's warnings too. --print-state prints only the state, so
an entry the parser drops -- an unsupported repository, say -- would
otherwise leave no trace here at all, although build.yml annotates it, and
the source set named below would be silently incomplete.

The report is filed under the pull request head SHA rather than the SHA of
the tree that was built, so the measurement cannot be reproduced from that
SHA alone and cannot be split per dependency. That limits provenance, not
the measurement: a combined result is what the declaration asks for, and a
regression that only appears in combination is still a regression. Name
the whole source set in the step summary so the reader knows which heads
went into the number.

Note in the parser that the --print-state output is a parsed contract; the
edit gate that used to be its only caller is gone.

Update the CI documentation to match. Its Pull Request Dependencies
section attributes dependency application to build.yml's Fetch-Source
job alone, so after this change it would read as if the memory report
measured the normal source selection. Cross-reference the two sections
rather than restating the rules, which stay shared.

Signed-off-by: zhangning21 <zhangning21@xiaomi.com>
2026-09-15 08:47:25 -03:00
..
actions free disk space action added to fix docker image build issue 2023-12-08 14:42:17 +01:00
ISSUE_TEMPLATE .github/ISSUE_TEMPLATE: Add host_info command section into bug report template 2025-01-21 09:11:17 +08:00
linters .github/linters: Ignore E704 warning 2024-11-17 08:31:08 -03:00
scripts ci: apply Depends-On dependencies to the memory report 2026-09-15 08:47:25 -03:00
workflows ci: apply Depends-On dependencies to the memory report 2026-09-15 08:47:25 -03:00
CODEOWNERS tools/ci: remove obsolete testrun harness 2026-09-02 11:44:23 -03:00
dependabot.yml chore: Included githubactions in the dependabot config 2022-06-19 11:43:10 +08:00
gcc.json .github/gcc.json: Fix space/tab inconsistency 2022-04-12 13:43:06 +08:00
labeler.yml CI: fix labeler for common boards files 2026-03-08 17:29:17 +01:00
membrowse-targets.json ci/testing: Update MemBrowse targets and concurrency condition 2026-06-25 12:56:02 -03:00
nxstyle.json Add problem matching for gcc and nxstyle to github actions 2020-06-11 00:52:55 +08:00
PULL_REQUEST_TEMPLATE.md docs/pr-template: Update the testing section of the PR template 2025-09-08 08:09:57 -03:00
SECURITY.md .github: SECURITY.md update. 2026-07-08 09:52:09 +08:00