|
92 | 92 | env: |
93 | 93 | KOVA_REF: ${{ inputs.kova_ref || 'b63b6f9e20efb23641df00487e982230d81a90ac' }} |
94 | 94 | KOVA_HOME: ${{ github.workspace }}/.artifacts/kova/home/${{ matrix.lane }} |
| 95 | + PERFORMANCE_HELPER_DIR: ${{ github.workspace }}/.artifacts/performance-workflow |
95 | 96 | REPORT_DIR: ${{ github.workspace }}/.artifacts/kova/reports/${{ matrix.lane }} |
96 | 97 | BUNDLE_DIR: ${{ github.workspace }}/.artifacts/kova/bundles/${{ matrix.lane }} |
97 | 98 | SUMMARY_DIR: ${{ github.workspace }}/.artifacts/kova/summaries |
@@ -149,6 +150,15 @@ jobs: |
149 | 150 | fetch-depth: 1 |
150 | 151 | persist-credentials: false |
151 | 152 |
|
| 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 | + |
152 | 162 | - name: Record tested revision |
153 | 163 | if: steps.lane.outputs.run == 'true' |
154 | 164 | shell: bash |
@@ -310,7 +320,7 @@ jobs: |
310 | 320 | report_url="https://github.com/openclaw/clawgrit-reports/tree/main/openclaw-performance/${ref_slug}/${run_slug}/${LANE_ID}" |
311 | 321 | fi |
312 | 322 | 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") |
314 | 324 | if [[ -n "$report_url" ]]; then |
315 | 325 | summary_args+=(--report-url "$report_url") |
316 | 326 | fi |
@@ -349,6 +359,24 @@ jobs: |
349 | 359 | fi |
350 | 360 |
|
351 | 361 | 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 | +
|
352 | 380 | pnpm build |
353 | 381 |
|
354 | 382 | pnpm test:gateway:cpu-scenarios \ |
@@ -432,7 +460,7 @@ jobs: |
432 | 460 | cleanup_gateway |
433 | 461 | trap - EXIT |
434 | 462 |
|
435 | | - pnpm perf:source:summary \ |
| 463 | + node "$PERFORMANCE_HELPER_DIR/scripts/openclaw-performance-source-summary.mjs" \ |
436 | 464 | --source-dir "$SOURCE_PERF_DIR" \ |
437 | 465 | --output "$SOURCE_PERF_DIR/index.md" |
438 | 466 |
|
|
0 commit comments