From f605dd43ec469ecc5fda5bcc3738ed371a2cfccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Thu, 14 Dec 2023 15:49:40 +0100 Subject: [PATCH] Add build summary for each board build (#2990) This allows for rudimentary image/partition size tracking between builds, potentially this could be further extended with more useful information about the build (TBD). --- .github/workflows/build.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c93e4581b..f20d41f2f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -234,6 +234,22 @@ jobs: path: /mnt/cache/cc key: haos-cc-${{ matrix.board.id }}-${{ github.run_id }} + - name: Generate build summary + run: | + echo "# ${{ matrix.board.id }} build summary" >> $GITHUB_STEP_SUMMARY + echo "## Artifacts" >> $GITHUB_STEP_SUMMARY + echo "| File | Size (bytes) | Size (formatted) |" >> $GITHUB_STEP_SUMMARY + echo "|:-|:-|:-|" >> $GITHUB_STEP_SUMMARY + for f in output/images/haos_*; do + echo "| $(basename $f) | $(du -b $f | cut -f1) | $(du -bh $f | cut -f1) |" >> $GITHUB_STEP_SUMMARY + done + echo "## Partitions" >> $GITHUB_STEP_SUMMARY + echo "| File | Size (bytes) | Size (formatted) |" >> $GITHUB_STEP_SUMMARY + echo "|:-|:-|:-|" >> $GITHUB_STEP_SUMMARY + for f in boot.vfat kernel.img rootfs.squashfs overlay.ext4 data.ext4; do + echo "| ${f} | $(du -b output/images/$f | cut -f1) | $(du -bh output/images/$f | cut -f1) |" >> $GITHUB_STEP_SUMMARY + done + - name: Upload ova image to artifacts for test job uses: actions/upload-artifact@v3 if: ${{ matrix.board.id == 'ova' }}