Skip to content

Commit b44f351

Browse files
committed
Simplify validate steps
1 parent a175f08 commit b44f351

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
@@ -315,41 +315,21 @@ jobs:
315315
- name: Validate Core benchmark results
316316
if: env.RUN_CORE
317317
run: |
318-
set -e # Exit on any error
319-
echo "🔍 Validating benchmark output files..."
320-
321-
RESULTS_DIR="bench_results"
322-
REQUIRED_FILES=("summary.txt")
323-
MISSING_FILES=()
318+
set -e
319+
echo "🔍 Validating benchmark results..."
324320
325-
# Check if results directory exists
326-
if [ ! -d "${RESULTS_DIR}" ]; then
327-
echo "❌ ERROR: Benchmark results directory '${RESULTS_DIR}' not found"
321+
if [ ! -f "bench_results/summary.txt" ]; then
322+
echo "❌ ERROR: benchmark summary file not found"
328323
exit 1
329324
fi
330-
331-
# List all generated files
332-
echo "Generated files:"
333-
ls -lh ${RESULTS_DIR}/ || true
334-
echo ""
335325
336-
# Check for required files
337-
for file in "${REQUIRED_FILES[@]}"; do
338-
if [ ! -f "${RESULTS_DIR}/${file}" ]; then
339-
MISSING_FILES+=("${file}")
340-
fi
341-
done
342-
343-
# Report validation results
344-
if [ ${#MISSING_FILES[@]} -eq 0 ]; then
345-
echo "✅ All required benchmark output files present"
346-
echo "📊 Summary preview:"
347-
head -20 ${RESULTS_DIR}/summary.txt || true
348-
else
349-
echo "⚠️ WARNING: Some required files are missing:"
350-
printf ' - %s\n' "${MISSING_FILES[@]}"
351-
echo "Continuing with available results..."
352-
fi
326+
echo "✅ Benchmark results found"
327+
echo ""
328+
echo "📊 Summary:"
329+
column -t -s $'\t' bench_results/summary.txt
330+
echo ""
331+
echo "Generated files:"
332+
ls -lh bench_results/
353333
354334
- name: Upload Core benchmark results
355335
uses: actions/upload-artifact@v4
@@ -480,36 +460,20 @@ jobs:
480460
if: env.RUN_PRO
481461
run: |
482462
set -e
483-
echo "🔍 Validating Pro benchmark output files..."
484-
485-
RESULTS_DIR="bench_results"
486-
REQUIRED_FILES=("summary.txt")
487-
MISSING_FILES=()
463+
echo "🔍 Validating benchmark results..."
488464
489-
if [ ! -d "${RESULTS_DIR}" ]; then
490-
echo "❌ ERROR: Benchmark results directory '${RESULTS_DIR}' not found"
465+
if [ ! -f "bench_results/summary.txt" ]; then
466+
echo "❌ ERROR: benchmark summary file not found"
491467
exit 1
492468
fi
493469
494-
echo "Generated files:"
495-
ls -lh ${RESULTS_DIR}/ || true
470+
echo "✅ Benchmark results found"
496471
echo ""
497-
498-
for file in "${REQUIRED_FILES[@]}"; do
499-
if [ ! -f "${RESULTS_DIR}/${file}" ]; then
500-
MISSING_FILES+=("${file}")
501-
fi
502-
done
503-
504-
if [ ${#MISSING_FILES[@]} -eq 0 ]; then
505-
echo "✅ All required benchmark output files present"
506-
echo "📊 Summary preview:"
507-
head -20 ${RESULTS_DIR}/summary.txt || true
508-
else
509-
echo "⚠️ WARNING: Some required files are missing:"
510-
printf ' - %s\n' "${MISSING_FILES[@]}"
511-
echo "Continuing with available results..."
512-
fi
472+
echo "📊 Summary:"
473+
column -t -s $'\t' bench_results/summary.txt
474+
echo ""
475+
echo "Generated files:"
476+
ls -lh bench_results/
513477
514478
- name: Upload Pro benchmark results
515479
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)