Skip to content

Commit dfc524c

Browse files
sbryngelsonclaude
andcommitted
Add Lustre-safe workspace cleanup for self-hosted runners
Disable actions/checkout's built-in git clean (which fails on Lustre with ESTALE/ENOTEMPTY errors) and add a retry-based rm -rf step before checkout instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0267756 commit dfc524c

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/bench.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,25 @@ jobs:
9090
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
9191
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
9292
steps:
93+
- name: Clean workspace (Lustre-safe)
94+
run: |
95+
for i in 1 2 3 4 5; do
96+
rm -rf "$GITHUB_WORKSPACE"/pr "$GITHUB_WORKSPACE"/master 2>/dev/null && break
97+
echo "Clean attempt $i failed, retrying in 2s..."
98+
sleep 2
99+
done
100+
true
101+
93102
- name: Clone - PR
94103
uses: actions/checkout@v4
95104
with:
105+
clean: false
96106
path: pr
97107

98108
- name: Clone - Master
99109
uses: actions/checkout@v4
100110
with:
111+
clean: false
101112
repository: MFlowCode/MFC
102113
ref: master
103114
path: master

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,19 @@ jobs:
219219
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
220220
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
221221
steps:
222+
- name: Clean workspace (Lustre-safe)
223+
run: |
224+
for i in 1 2 3 4 5; do
225+
rm -rf "$GITHUB_WORKSPACE"/{.,}* 2>/dev/null && break
226+
echo "Clean attempt $i failed, retrying in 2s..."
227+
sleep 2
228+
done
229+
true
230+
222231
- name: Clone
223232
uses: actions/checkout@v4
233+
with:
234+
clean: false
224235

225236
- name: Build
226237
if: matrix.cluster != 'phoenix'

0 commit comments

Comments
 (0)