summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-06-08 16:11:13 +0700
committerhathach <[email protected]>2026-06-08 16:11:13 +0700
commitfba8d257846ab9149f9db5443827d741492f837d (patch)
tree25b265038c98308ca8ddfaf1f7d52db7f0c972a7 /.github/workflows
parent46aded44af947e1be32426edcd6ff2c0596f1765 (diff)
test/hil: accumulate HIL report across re-runs; post as sticky PR comment
hil_test.py persists results in a hil_report.json sidecar and regenerates hil_report.md from it. A full run starts fresh; a re-run (--skip-board / -bt, i.e. the .skip file) merges into the existing report so already-passed boards/tests are preserved while only re-run cells update. The report dir is configurable via HIL_REPORT_DIR. build.yml: each HIL rig writes the report to a workspace-sibling dir that survives the per-attempt workspace clean, and uploads it as an artifact. A new hil-report job merges the rigs' reports into one sticky PR comment (marocchino) with one table per rig. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml54
1 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e5075f46f..0ff29cdda 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -306,6 +306,9 @@ jobs:
env:
HIL_JSON: ${{ matrix.hil_json }}
steps:
+ - name: Set HIL report dir (sibling of workspace; persists across run attempts)
+ run: echo "HIL_REPORT_DIR=$(dirname "$GITHUB_WORKSPACE")/hil-report" >> "$GITHUB_ENV"
+
- name: Get Skip Boards from previous run
if: github.run_attempt != '1'
run: |
@@ -344,6 +347,15 @@ jobs:
exit 1
fi)
+ - name: Upload HIL report
+ if: always() && github.event_name == 'pull_request'
+ uses: actions/upload-artifact@v7
+ with:
+ name: hil-report-${{ matrix.display }}
+ path: ${{ env.HIL_REPORT_DIR }}/hil_report.md
+ if-no-files-found: ignore
+ overwrite: true
+
# ---------------------------------------
# Hardware in the loop (HIL)
# self-hosted by HFP, build with IAR toolchain, for attached hardware checkout test/hil/hfp.json
@@ -390,3 +402,45 @@ jobs:
- name: Test on actual hardware (hardware in the loop)
run: |
python3 test/hil/hil_test.py hfp.json
+
+ # ---------------------------------------
+ # Combine HIL results from the rigs into a single sticky PR comment (one table per rig)
+ # ---------------------------------------
+ hil-report:
+ needs: hil-tinyusb
+ if: |
+ always() &&
+ needs.hil-tinyusb.result != 'skipped' &&
+ github.event_name == 'pull_request' &&
+ github.repository_owner == 'hathach' &&
+ github.event.pull_request.head.repo.fork == false
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write
+ steps:
+ - name: Download HIL reports
+ uses: actions/download-artifact@v5
+ with:
+ pattern: hil-report-*
+ path: hil-reports
+
+ - name: Combine rig reports (one table per rig)
+ run: |
+ {
+ echo "## HIL test results"
+ echo
+ for d in hil-reports/hil-report-*; do
+ [ -d "$d" ] || continue
+ echo "### ${d#hil-reports/hil-report-}"
+ echo
+ cat "$d/hil_report.md" 2>/dev/null || echo "_no report produced_"
+ echo
+ done
+ } > hil_combined.md
+ cat hil_combined.md
+
+ - name: Post HIL report as sticky PR comment
+ uses: marocchino/sticky-pull-request-comment@v2
+ with:
+ header: hil-report
+ path: hil_combined.md