Skip to content

Commit 1dbcdef

Browse files
committed
perf(ci): use runtime-only builds for Node test prerequisites
1 parent 5ed0c15 commit 1dbcdef

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3042,17 +3042,16 @@ jobs:
30423042
sparse-checkout-cone-mode: false
30433043
persist-credentials: false
30443044

3045-
# A few real-CLI E2E tests need a current dist tree. Build it before
3046-
# Vitest starts so the shard's worker processes cannot consume the
3047-
# cgroup memory that the build admission check must reserve. Reuse the
3048-
# CI artifact profile: these runtime readers do not need global declarations.
3045+
# Build the CLI runtime before Vitest workers consume memory or import dist.
3046+
# qaRuntime supplies the shared JavaScript, assets, and freshness stamps;
3047+
# build-artifacts owns SDK declaration and Control UI validation.
30493048
- name: Build Node test runtime
30503049
if: matrix.pretest_build_mode != null
30513050
env:
30523051
NODE_OPTIONS: --max-old-space-size=8192
30533052
OPENCLAW_BUILD_PRIVATE_QA: ${{ matrix.pretest_build_mode == 'private-qa' && '1' || '0' }}
30543053
VITEST: "1"
3055-
run: pnpm build:ci-artifacts
3054+
run: pnpm build qaRuntime
30563055

30573056
- name: Install ripgrep for native grep tests
30583057
if: matrix.requires_ripgrep == true && runner.os == 'Linux'

‎docs/ci.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ Use `pnpm ci:timings`, `pnpm ci:timings:recent`, or `node scripts/ci-run-timings
9797

9898
Run the timing helper locally; there is no in-workflow timing-summary job (a permanently disabled one was removed once the local helper became the tool everyone actually used). For build timing, check the `build-artifacts` job's `Build dist` step: `pnpm build:ci-artifacts` prints `[build-all] phase timings:` and includes `ui:build`; the job also uploads the `startup-memory` artifact.
9999

100-
Node test shards that need a built CLI use the same `build:ci-artifacts` profile
101-
before starting Vitest. It builds the runtime, Control UI, and scoped plugin SDK
102-
declarations without repeating global declaration emission in each shard.
103-
Private QA shards retain their private runtime build selection. Release package
104-
builds still generate the full declarations.
100+
Node test shards that need a built CLI run `pnpm build qaRuntime` before starting
101+
Vitest. This profile builds runtime JavaScript, plugin assets, and freshness and
102+
provenance metadata. Private QA shards select their private runtime entries. The
103+
`build-artifacts` job owns Control UI and SDK declaration validation; release
104+
package builds still generate the full declarations.
105105

106106
Local `pnpm build:ci-artifacts` uses the same memory admission as full and package
107107
builds. The orchestrator passes the resolved heap budget to every child process,

‎test/scripts/ci-workflow-guards.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9499,7 +9499,7 @@ printf '%s\n' "\${CURL_SUCCESS_IP:-203.0.113.7}"
94999499
OPENCLAW_BUILD_PRIVATE_QA: "${{ matrix.pretest_build_mode == 'private-qa' && '1' || '0' }}",
95009500
VITEST: "1",
95019501
},
9502-
run: "pnpm build:ci-artifacts",
9502+
run: "pnpm build qaRuntime",
95039503
});
95049504
expect(installRipgrepStep).toMatchObject({
95059505
if: "matrix.requires_ripgrep == true && runner.os == 'Linux'",

0 commit comments

Comments
 (0)