Skip to content

The only tool you need to know what is happening and how to fix it.

Making results actually committable

ddux64451ffc1782
diff --git a/.github/workflows/benchmark-hardware.yml b/.github/workflows/benchmark-hardware.yml
index bc4b075a..e8f5974d 100644
--- a/.github/workflows/benchmark-hardware.yml
+++ b/.github/workflows/benchmark-hardware.yml
@@ -133,6 +133,15 @@ jobs:
set -euo pipefail
git config user.name "traceway-bot"
git config user.email "[email protected]"
+
+ # The benchmark run takes 2-3 hours, so by the time we get here our
+ # checkout is almost always behind main. Sync to whatever main looks
+ # like *right now* before committing. The result files are untracked,
+ # so a hard reset to origin/main leaves them in place.
+ echo "syncing checkout to latest origin/main before committing"
+ git fetch origin main
+ git reset --hard origin/main
+
git add "${{ steps.stage.outputs.dst }}"
if git diff --cached --quiet; then
echo "nothing to commit"