Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ permissions:
jobs:
resolve:
runs-on: ubuntu-24.04
timeout-minutes: 20
# A cache miss builds the web Wasm engine with emsdk, so the job needs more than 20 minutes.
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
Expand All @@ -54,6 +55,9 @@ jobs:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
# The root build includes the examples on the default engine, which stop at
# TN_WASM_ENGINE_MISSING without the web Wasm engine (release run 42296982894).
- uses: ./.github/actions/native-engine-wasm
- name: Build the workspace packages before comparing published bytes
run: pnpm build
- name: Write the request and workflow-derived availability
Expand Down
18 changes: 18 additions & 0 deletions scripts/__tests__/ci-structure.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5028,3 +5028,21 @@ describe("a CI-configuration-only pull request", () => {
}
});
});

// Release run 42296982894: release-candidate's `resolve` ran a root `pnpm build` with no web Wasm engine,
// and examples/spell-lab (default engine) stopped at TN_WASM_ENGINE_MISSING, so `ship` published nothing.
describe("a job that runs the root build restores the web Wasm engine first", () => {
it("puts native-engine-wasm before every root `pnpm build`", async () => {
const missing: string[] = [];
const dir = path.join(process.cwd(), ".github/workflows");
for (const relative of (await readdir(dir)).filter((name) => name.endsWith(".yml"))) {
const source = await readFile(path.join(dir, relative), "utf8");
for (const [job, section] of jobSections(source)) {
const build = section.search(/^\s+(?:-\s+)?run:\s+pnpm build\s*$/mu);
if (build >= 0 && !section.slice(0, build).includes("./.github/actions/native-engine-wasm"))
missing.push(`${relative}:${job}`);
}
}
expect(missing).toEqual([]);
});
});
Loading