diff --git a/.github/workflows/test_size.yml b/.github/workflows/test_size.yml index 5ee9f13033f32..fe83756a3a759 100644 --- a/.github/workflows/test_size.yml +++ b/.github/workflows/test_size.yml @@ -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