.github: output size diff output to summary

This commit is contained in:
Pierre Kancir 2024-11-25 16:42:09 +01:00 committed by Peter Barker
parent bfc94b6e02
commit c4e72e691f

View File

@ -301,8 +301,26 @@ jobs:
Tools/scripts/extract_features.py "$EF_BASE_BRANCH_BINARY" -nm "${BIN_PREFIX}nm" >features-base_branch.txt
Tools/scripts/extract_features.py "$EF_PR_BRANCH_BINARY" -nm "${BIN_PREFIX}nm" >features-pr.txt
diff -u features-base_branch.txt features-pr.txt || true
diff_output=$(diff -u features-base_branch.txt features-pr.txt || true)
echo "### Features Diff Output" >> $GITHUB_STEP_SUMMARY
if [ -n "$diff_output" ]; then
echo '```diff' >> $GITHUB_STEP_SUMMARY
echo "$diff_output" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
else
echo "No differences found." >> $GITHUB_STEP_SUMMARY
fi
- name: Checksum compare with ${{ github.event.pull_request.base.ref }}
shell: bash
run: |
diff -r $GITHUB_WORKSPACE/base_branch_bin_no_versions $GITHUB_WORKSPACE/pr_bin_no_versions --exclude=*.elf --exclude=*.apj || true
diff_output=$(diff -r $GITHUB_WORKSPACE/base_branch_bin_no_versions $GITHUB_WORKSPACE/pr_bin_no_versions --exclude=*.elf --exclude=*.apj || true || true)
echo "### Checksum Diff Output" >> $GITHUB_STEP_SUMMARY
if [ -n "$diff_output" ]; then
echo '```diff' >> $GITHUB_STEP_SUMMARY
echo "$diff_output" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
else
echo "No differences found." >> $GITHUB_STEP_SUMMARY
fi