perf(ci): share bytecode across fresh Apple artifact subprocesses
This commit is contained in:
@@ -378,6 +378,8 @@ jobs:
|
|||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- name: Verify Apple artifact formats and metadata
|
- name: Verify Apple artifact formats and metadata
|
||||||
|
env:
|
||||||
|
REA_ARTIFACT_NODE_COMPILE_CACHE: ${{ runner.temp }}/rea-artifact-node-cache
|
||||||
run: |
|
run: |
|
||||||
npm run verify:keyed-archive
|
npm run verify:keyed-archive
|
||||||
npm run verify:asset-catalog
|
npm run verify:asset-catalog
|
||||||
|
|||||||
@@ -991,6 +991,13 @@ the fixture cache. These subprocesses are outside aggregate Vitest coverage;
|
|||||||
subprocess coverage attachment remains disabled. Cold-start import checks launch
|
subprocess coverage attachment remains disabled. Cold-start import checks launch
|
||||||
independently without this fixture cache.
|
independently without this fixture cache.
|
||||||
|
|
||||||
|
The Apple artifact verifier step shares a job-temporary bytecode cache among
|
||||||
|
its fresh CLI/MCP children via `REA_ARTIFACT_NODE_COMPILE_CACHE`. The artifact
|
||||||
|
helper maps this setting to child `NODE_COMPILE_CACHE`; npm, Turbo, and nested
|
||||||
|
Vitest runs do not inherit that setting. Explicit `NODE_COMPILE_CACHE` takes
|
||||||
|
precedence, and coverage collection or `NODE_DISABLE_COMPILE_CACHE=1` disables
|
||||||
|
the helper's cache. The cache is discarded with the CI job.
|
||||||
|
|
||||||
To evaluate persistent compile caching for repeated local runs, opt in for both
|
To evaluate persistent compile caching for repeated local runs, opt in for both
|
||||||
cold and warm measurements with an isolated cache:
|
cold and warm measurements with an isolated cache:
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,23 @@ import { fileURLToPath } from "node:url";
|
|||||||
import { Client } from "@modelcontextprotocol/client";
|
import { Client } from "@modelcontextprotocol/client";
|
||||||
import { StdioClientTransport } from "@modelcontextprotocol/client/stdio";
|
import { StdioClientTransport } from "@modelcontextprotocol/client/stdio";
|
||||||
|
|
||||||
const environment = () => ({
|
const environment = () => {
|
||||||
PATH: process.env.PATH ?? "/usr/bin:/bin",
|
const compileCache =
|
||||||
REA_LOG_LEVEL: "silent",
|
process.env.NODE_COMPILE_CACHE ??
|
||||||
REA_ANALYSIS_PROVIDER: "auto",
|
process.env.REA_ARTIFACT_NODE_COMPILE_CACHE;
|
||||||
// Artifact workflows have no deep-provider prerequisite or GUI authority.
|
return {
|
||||||
HOPPER_LAUNCHER_PATH: "/rea-unconfigured-deep-provider/hopper",
|
PATH: process.env.PATH ?? "/usr/bin:/bin",
|
||||||
});
|
...(compileCache &&
|
||||||
|
process.env.NODE_V8_COVERAGE === undefined &&
|
||||||
|
process.env.NODE_DISABLE_COMPILE_CACHE !== "1"
|
||||||
|
? { NODE_COMPILE_CACHE: compileCache }
|
||||||
|
: {}),
|
||||||
|
REA_LOG_LEVEL: "silent",
|
||||||
|
REA_ANALYSIS_PROVIDER: "auto",
|
||||||
|
// Artifact workflows have no deep-provider prerequisite or GUI authority.
|
||||||
|
HOPPER_LAUNCHER_PATH: "/rea-unconfigured-deep-provider/hopper",
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/** Execute the compiled CLI with production providers and no test adapters. */
|
/** Execute the compiled CLI with production providers and no test adapters. */
|
||||||
export async function artifactCli(
|
export async function artifactCli(
|
||||||
|
|||||||
Reference in New Issue
Block a user