Skip to content

Commit de563e5

Browse files
committed
Simplify validate steps
1 parent 85d1c67 commit de563e5

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
@@ -326,41 +326,21 @@ jobs:
326326
- name: Validate Core benchmark results
327327
if: env.RUN_CORE
328328
run: |
329-
set -e # Exit on any error
330-
echo "🔍 Validating benchmark output files..."
331-
332-
RESULTS_DIR="bench_results"
333-
REQUIRED_FILES=("summary.txt")
334-
MISSING_FILES=()
329+
set -e
330+
echo "🔍 Validating benchmark results..."
335331
336-
# Check if results directory exists
337-
if [ ! -d "${RESULTS_DIR}" ]; then
338-
echo "❌ ERROR: Benchmark results directory '${RESULTS_DIR}' not found"
332+
if [ ! -f "bench_results/summary.txt" ]; then
333+
echo "❌ ERROR: benchmark summary file not found"
339334
exit 1
340335
fi
341-
342-
# List all generated files
343-
echo "Generated files:"
344-
ls -lh ${RESULTS_DIR}/ || true
345-
echo ""
346336
347-
# Check for required files
348-
for file in "${REQUIRED_FILES[@]}"; do
349-
if [ ! -f "${RESULTS_DIR}/${file}" ]; then
350-
MISSING_FILES+=("${file}")
351-
fi
352-
done
353-
354-
# Report validation results
355-
if [ ${#MISSING_FILES[@]} -eq 0 ]; then
356-
echo "✅ All required benchmark output files present"
357-
echo "📊 Summary preview:"
358-
head -20 ${RESULTS_DIR}/summary.txt || true
359-
else
360-
echo "⚠️ WARNING: Some required files are missing:"
361-
printf ' - %s\n' "${MISSING_FILES[@]}"
362-
echo "Continuing with available results..."
363-
fi
337+
echo "✅ Benchmark results found"
338+
echo ""
339+
echo "📊 Summary:"
340+
column -t -s $'\t' bench_results/summary.txt
341+
echo ""
342+
echo "Generated files:"
343+
ls -lh bench_results/
364344
365345
- name: Upload Core benchmark results
366346
uses: actions/upload-artifact@v4
@@ -491,36 +471,20 @@ jobs:
491471
if: env.RUN_PRO
492472
run: |
493473
set -e
494-
echo "🔍 Validating Pro benchmark output files..."
495-
496-
RESULTS_DIR="bench_results"
497-
REQUIRED_FILES=("summary.txt")
498-
MISSING_FILES=()
474+
echo "🔍 Validating benchmark results..."
499475
500-
if [ ! -d "${RESULTS_DIR}" ]; then
501-
echo "❌ ERROR: Benchmark results directory '${RESULTS_DIR}' not found"
476+
if [ ! -f "bench_results/summary.txt" ]; then
477+
echo "❌ ERROR: benchmark summary file not found"
502478
exit 1
503479
fi
504480
505-
echo "Generated files:"
506-
ls -lh ${RESULTS_DIR}/ || true
481+
echo "✅ Benchmark results found"
507482
echo ""
508-
509-
for file in "${REQUIRED_FILES[@]}"; do
510-
if [ ! -f "${RESULTS_DIR}/${file}" ]; then
511-
MISSING_FILES+=("${file}")
512-
fi
513-
done
514-
515-
if [ ${#MISSING_FILES[@]} -eq 0 ]; then
516-
echo "✅ All required benchmark output files present"
517-
echo "📊 Summary preview:"
518-
head -20 ${RESULTS_DIR}/summary.txt || true
519-
else
520-
echo "⚠️ WARNING: Some required files are missing:"
521-
printf ' - %s\n' "${MISSING_FILES[@]}"
522-
echo "Continuing with available results..."
523-
fi
483+
echo "📊 Summary:"
484+
column -t -s $'\t' bench_results/summary.txt
485+
echo ""
486+
echo "Generated files:"
487+
ls -lh bench_results/
524488
525489
- name: Upload Pro benchmark results
526490
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)