Skip to content

Commit fc570d0

Browse files
committed
ci: use current performance report helpers
1 parent 68b5610 commit fc570d0

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/openclaw-performance.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
env:
9393
KOVA_REF: ${{ inputs.kova_ref || 'b63b6f9e20efb23641df00487e982230d81a90ac' }}
9494
KOVA_HOME: ${{ github.workspace }}/.artifacts/kova/home/${{ matrix.lane }}
95+
PERFORMANCE_HELPER_DIR: ${{ github.workspace }}/.artifacts/performance-workflow
9596
REPORT_DIR: ${{ github.workspace }}/.artifacts/kova/reports/${{ matrix.lane }}
9697
BUNDLE_DIR: ${{ github.workspace }}/.artifacts/kova/bundles/${{ matrix.lane }}
9798
SUMMARY_DIR: ${{ github.workspace }}/.artifacts/kova/summaries
@@ -149,6 +150,15 @@ jobs:
149150
fetch-depth: 1
150151
persist-credentials: false
151152

153+
- name: Checkout performance workflow helpers
154+
if: steps.lane.outputs.run == 'true'
155+
uses: actions/checkout@v6
156+
with:
157+
ref: ${{ github.sha }}
158+
path: .artifacts/performance-workflow
159+
fetch-depth: 1
160+
persist-credentials: false
161+
152162
- name: Record tested revision
153163
if: steps.lane.outputs.run == 'true'
154164
shell: bash
@@ -310,7 +320,7 @@ jobs:
310320
report_url="https://github.com/openclaw/clawgrit-reports/tree/main/openclaw-performance/${ref_slug}/${run_slug}/${LANE_ID}"
311321
fi
312322
summary_path="$SUMMARY_DIR/${LANE_ID}.md"
313-
summary_args=(node scripts/kova-ci-summary.mjs --report "$report_json" --output "$summary_path" --lane "$LANE_ID")
323+
summary_args=(node "$PERFORMANCE_HELPER_DIR/scripts/kova-ci-summary.mjs" --report "$report_json" --output "$summary_path" --lane "$LANE_ID")
314324
if [[ -n "$report_url" ]]; then
315325
summary_args+=(--report-url "$report_url")
316326
fi
@@ -349,6 +359,24 @@ jobs:
349359
fi
350360
351361
mkdir -p "$SOURCE_PERF_DIR/mock-hello"
362+
if ! node -e "const fs=require('node:fs'); const scripts=require('./package.json').scripts||{}; process.exit(scripts['test:gateway:cpu-scenarios'] && scripts.openclaw && fs.existsSync('scripts/bench-cli-startup.ts') ? 0 : 1)"; then
363+
cat > "$SOURCE_PERF_DIR/index.md" <<EOF
364+
# OpenClaw Source Performance
365+
366+
Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)
367+
368+
Source probes skipped for this tested ref because one or more probe entry points are not present in the checked-out source tree.
369+
370+
## Test scope
371+
372+
- Tested ref: ${TESTED_REF}
373+
- Tested SHA: ${TESTED_SHA}
374+
- Required scripts: test:gateway:cpu-scenarios, openclaw, scripts/bench-cli-startup.ts
375+
EOF
376+
cat "$SOURCE_PERF_DIR/index.md" >> "$GITHUB_STEP_SUMMARY"
377+
exit 0
378+
fi
379+
352380
pnpm build
353381
354382
pnpm test:gateway:cpu-scenarios \
@@ -432,7 +460,7 @@ jobs:
432460
cleanup_gateway
433461
trap - EXIT
434462
435-
pnpm perf:source:summary \
463+
node "$PERFORMANCE_HELPER_DIR/scripts/openclaw-performance-source-summary.mjs" \
436464
--source-dir "$SOURCE_PERF_DIR" \
437465
--output "$SOURCE_PERF_DIR/index.md"
438466

0 commit comments

Comments
 (0)