Skip to content

Commit e8003f2

Browse files
committed
Simplify validate steps
1 parent f2f5cb3 commit e8003f2

File tree

1 file changed

+20
-56
lines changed

1 file changed

+20
-56
lines changed

.github/workflows/benchmark.yml

Lines changed: 20 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -310,41 +310,21 @@ jobs:
310310
- name: Validate Core benchmark results
311311
if: env.RUN_CORE
312312
run: |
313-
set -e # Exit on any error
314-
echo "🔍 Validating benchmark output files..."
315-
316-
RESULTS_DIR="bench_results"
317-
REQUIRED_FILES=("summary.txt")
318-
MISSING_FILES=()
313+
set -e
314+
echo "🔍 Validating benchmark results..."
319315
320-
# Check if results directory exists
321-
if [ ! -d "${RESULTS_DIR}" ]; then
322-
echo "❌ ERROR: Benchmark results directory '${RESULTS_DIR}' not found"
316+
if [ ! -f "bench_results/summary.txt" ]; then
317+
echo "❌ ERROR: benchmark summary file not found"
323318
exit 1
324319
fi
325-
326-
# List all generated files
327-
echo "Generated files:"
328-
ls -lh ${RESULTS_DIR}/ || true
329-
echo ""
330320
331-
# Check for required files
332-
for file in "${REQUIRED_FILES[@]}"; do
333-
if [ ! -f "${RESULTS_DIR}/${file}" ]; then
334-
MISSING_FILES+=("${file}")
335-
fi
336-
done
337-
338-
# Report validation results
339-
if [ ${#MISSING_FILES[@]} -eq 0 ]; then
340-
echo "✅ All required benchmark output files present"
341-
echo "📊 Summary preview:"
342-
head -20 ${RESULTS_DIR}/summary.txt || true
343-
else
344-
echo "⚠️ WARNING: Some required files are missing:"
345-
printf ' - %s\n' "${MISSING_FILES[@]}"
346-
echo "Continuing with available results..."
347-
fi
321+
echo "✅ Benchmark results found"
322+
echo ""
323+
echo "📊 Summary:"
324+
column -t -s $'\t' bench_results/summary.txt
325+
echo ""
326+
echo "Generated files:"
327+
ls -lh bench_results/
348328
349329
- name: Upload Core benchmark results
350330
uses: actions/upload-artifact@v4
@@ -475,36 +455,20 @@ jobs:
475455
if: env.RUN_PRO
476456
run: |
477457
set -e
478-
echo "🔍 Validating Pro benchmark output files..."
479-
480-
RESULTS_DIR="bench_results"
481-
REQUIRED_FILES=("summary.txt")
482-
MISSING_FILES=()
458+
echo "🔍 Validating benchmark results..."
483459
484-
if [ ! -d "${RESULTS_DIR}" ]; then
485-
echo "❌ ERROR: Benchmark results directory '${RESULTS_DIR}' not found"
460+
if [ ! -f "bench_results/summary.txt" ]; then
461+
echo "❌ ERROR: benchmark summary file not found"
486462
exit 1
487463
fi
488464
489-
echo "Generated files:"
490-
ls -lh ${RESULTS_DIR}/ || true
465+
echo "✅ Benchmark results found"
491466
echo ""
492-
493-
for file in "${REQUIRED_FILES[@]}"; do
494-
if [ ! -f "${RESULTS_DIR}/${file}" ]; then
495-
MISSING_FILES+=("${file}")
496-
fi
497-
done
498-
499-
if [ ${#MISSING_FILES[@]} -eq 0 ]; then
500-
echo "✅ All required benchmark output files present"
501-
echo "📊 Summary preview:"
502-
head -20 ${RESULTS_DIR}/summary.txt || true
503-
else
504-
echo "⚠️ WARNING: Some required files are missing:"
505-
printf ' - %s\n' "${MISSING_FILES[@]}"
506-
echo "Continuing with available results..."
507-
fi
467+
echo "📊 Summary:"
468+
column -t -s $'\t' bench_results/summary.txt
469+
echo ""
470+
echo "Generated files:"
471+
ls -lh bench_results/
508472
509473
- name: Upload Pro benchmark results
510474
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)