Files
oh-my-pi/scripts/ci-release-build-binaries.test.ts
T
roboomp bc7a143c1e fix(setup): used portable native install artifacts
- Built the generic Windows release binary with Bun's baseline x64 runtime so older Windows 10 CPUs do not hit the AVX2-only modern executable.

- Forced pi-natives release builds to link PCRE2 statically so macOS installs do not depend on Homebrew's libpcre2 dylib.

- Added release dry-run and native-build regression coverage for the portable artifact contracts.

Fixes #5172
2026-07-11 09:47:37 +00:00

39 lines
1.3 KiB
TypeScript

import { describe, expect, it } from "bun:test";
import * as path from "node:path";
import { $ } from "bun";
import { resolveCrossBuild } from "../packages/coding-agent/scripts/build-binary";
const repoRoot = path.join(import.meta.dir, "..");
describe("Windows release binary target", () => {
it("builds the generic Windows release asset with the baseline runtime", async () => {
const result = await $`bun scripts/ci-release-build-binaries.ts --dry-run --targets win32-x64`
.cwd(repoRoot)
.quiet()
.nothrow();
expect(result.exitCode).toBe(0);
const output = result.text();
expect(output).toContain("Building packages/coding-agent/binaries/omp-windows-x64.exe...");
expect(output).toContain(
"DRY RUN Bun.build target=bun-windows-x64-baseline outfile=packages/coding-agent/binaries/omp-windows-x64.exe",
);
expect(output).not.toContain("bun-windows-x64-modern");
});
it("uses the baseline runtime for local Windows cross-build aliases", () => {
expect(resolveCrossBuild("win32-x64")).toEqual({
id: "win32-x64",
platform: "win32",
arch: "x64",
target: "bun-windows-x64-baseline",
});
expect(resolveCrossBuild("windows-x64")).toEqual({
id: "windows-x64",
platform: "win32",
arch: "x64",
target: "bun-windows-x64-baseline",
});
});
});