Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small artifacts for bloat reports (#9331)
* Small-artifact bloat reports #### Problem The current bloat report requires preserving large binaries, and has trouble matching tree parents for comparison. #### Change overview This change makes example builds generate small artifacts containing json file(s) containing build item identification and section sizes. Artifacts names have the form “Size,PR,WORKFLOW,CURRENT_SHA,PARENT_SHA”; these contain one or more json files, each containing a report on one build target. The reporting scripts then examines the list of available artifacts to list of artifacts to identify pairs with the same $WORKFLOW where one's $CURRENT_SHA is the other's $PARENT_SHA, and only then downloads and processes those artifacts to generate comparisons for matching builds. - Changes to `examples-…` workflows: - Adds some `GH_EVENT_…` variables to workflow `env`, to identify the current run. - Uses the `gh_sizes.py` script to generate size report json files. - Uploads size report artifacts. - Changes to `scripts/tools/memory`: - Adds minimal platform config files for recently-added platforms. - Adds markdown output options (required for github comments) along with some associated cleanup. - Adds a script `scripts/tools/memory/gh_sizes.py` for use by workflows; this is similar to `report_summary.py` with a suitable consistent set of arguments. - Adds a script `scripts/tools/memory/gh_report.py` to analyze size report artifacts. - Modifies `bloat_check.py` to ignore the size report artifacts. The github comments produced by `gh_report.py` are slightly different fromt the existing reports. Since this change enables reports for many more builds, a full report will be over a hundred lines, and is placed inside a details tag. Only size changes above a configurable threshold are called out ‘above the fold’. Note that this PR does _not_ include a change to actually send size report comments on github; this is left to a followup after that code has been verified on real-world size artifacts. #### Testing Fork-CI runs and offline verification on resulting artifacts. * remove leftover debug print * small json format change * changes from review - restore original scripts/examples/esp_example.sh and scripts/examples/gn_efr32_example.sh - avoid a problem using pyelftools `describe_p_type` * telink output moved * report sections directly rather than aggregated symbols by section
- Loading branch information