Skip to content

Commit 4f39d1b

Browse files
sbryngelsonclaude
andcommitted
Add on_retry_command to clean build state between retry attempts
When a build is killed mid-way (e.g., SIGTERM), the build directory is left in a corrupted state. Subsequent retry attempts fail immediately because set -e exits on the first error from the dirty build tree. Running ./mfc.sh clean between retries restores a fresh build state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 73072bf commit 4f39d1b

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/bench.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ jobs:
110110
(cd pr && ${{ matrix.build_script }}) &
111111
(cd master && ${{ matrix.build_script }}) &
112112
wait %1 && wait %2
113+
on_retry_command: |
114+
(cd pr && ./mfc.sh clean) &
115+
(cd master && ./mfc.sh clean) &
116+
wait
113117
114118
- name: Bench (Master v. PR)
115119
run: bash pr/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.interface }} ${{ matrix.cluster }}

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ jobs:
257257
retry_wait_seconds: 60
258258
timeout_minutes: 480
259259
command: bash .github/workflows/${{ matrix.cluster }}/build.sh ${{ matrix.device }} ${{ matrix.interface }}
260+
on_retry_command: ./mfc.sh clean
260261

261262
- name: Test
262263
run: bash .github/workflows/${{ matrix.cluster }}/submit.sh .github/workflows/${{ matrix.cluster }}/test.sh ${{ matrix.device }} ${{ matrix.interface }} ${{ matrix.shard }}

0 commit comments

Comments
 (0)