Skip to content

Commit cce2d39

Browse files
committed
fix(ci): preserve performance target compatibility
1 parent 163227a commit cce2d39

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/openclaw-performance.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,12 @@ jobs:
676676
exit 0
677677
fi
678678
679-
OPENCLAW_BUILD_PRIVATE_QA=1 node scripts/build-all.mjs sourcePerformance
679+
# target_ref may predate the dedicated profile; preserve the historical full build there.
680+
if node -e "import('./scripts/build-all.mjs').then((module) => process.exit(module.BUILD_ALL_PROFILES?.sourcePerformance ? 0 : 1)).catch(() => process.exit(1))"; then
681+
OPENCLAW_BUILD_PRIVATE_QA=1 node scripts/build-all.mjs sourcePerformance
682+
else
683+
pnpm build
684+
fi
680685
681686
pnpm test:gateway:cpu-scenarios \
682687
--output-dir "$SOURCE_PERF_DIR/gateway-cpu" \

test/scripts/openclaw-performance-workflow.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,11 @@ describe("OpenClaw performance workflow", () => {
169169
const run = findStep("Run OpenClaw source performance probes", "source_performance").run ?? "";
170170
const build = "OPENCLAW_BUILD_PRIVATE_QA=1 node scripts/build-all.mjs sourcePerformance";
171171

172+
expect(run).toContain("module.BUILD_ALL_PROFILES?.sourcePerformance");
172173
expect(run).toContain(build);
173-
expect(run).not.toContain("pnpm build");
174+
expect(run).toContain("pnpm build");
174175
expect(run.indexOf(build)).toBeLessThan(run.indexOf("pnpm test:gateway:cpu-scenarios"));
176+
expect(run.indexOf("pnpm build")).toBeLessThan(run.indexOf("pnpm test:gateway:cpu-scenarios"));
175177
});
176178

177179
it("isolates required publication in a fresh artifact-consuming job", () => {

0 commit comments

Comments
 (0)