Skip to content

Commit 9987605

Browse files
committed
Fix CI cleanup script
1 parent 1959dbc commit 9987605

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

.gitlab/scripts.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,8 @@ clean_old_dirs:
241241
script:
242242
- cd $SPHERAL_BUILDS_DIR
243243
- ml load mpifileutils
244-
- |
245-
find . -mindepth 1 -maxdepth 1 -type d -mtime +15 -print0 \
246-
| while IFS= read -r -d '' dir; do
247-
$RUN_CMD -n $NPROC drm "$dir"
248-
done
244+
# Run drm on each directory since too many dirs into the command can cause hangs
245+
- find . -mindepth 1 -maxdepth 1 -type d -mtime +15 -print -exec $RUN_CMD -n $NPROC drm {} \;
249246

250247
# Remove performance benchmarks that are older than 6 months
251248
clean_old_perfs:
@@ -262,12 +259,7 @@ clean_old_perfs:
262259
- BENCHMARK_LOC=$(python3 $SCRIPT_DIR/spheral_ats.py --get-benchmark)
263260
- cd $BENCHMARK_LOC
264261
- ml load mpifileutils
265-
- |
266-
find . -mindepth 2 -type d -mtime +200 -print0 \
267-
| while IFS= read -r -d '' dir; do
268-
echo "Removing $dir"
269-
$RUN_CMD -n $NPROC drm "$dir"
270-
done
262+
- find . -mindepth 2 -type d -mtime +200 -print -exec $RUN_CMD -n $NPROC drm {} \;
271263

272264
# ------------------------------------------------------------------------------
273265
# Script Utilities

0 commit comments

Comments
 (0)