e7738de6d2
CI / Deep Native Runtime Cases (1/6) (push) Has been skipped
CI / Native Preflight (push) Failing after 1s
CI / Native Runtime Cases (1/2) (push) Failing after 0s
CI / Native Runtime Cases (2/2) (push) Failing after 1s
CI / Native Metadata Reports (push) Failing after 0s
CI / Native Direct Backend Artifacts (push) Failing after 0s
CI / Native Sanitizer Smoke (push) Failing after 1s
CI / Command Contract Snapshots (push) Failing after 1s
CI / Deep Conformance Suite (push) Has been skipped
CI / Graph Build Perf (push) Failing after 1s
CI / Deep Native Preflight (push) Has been skipped
CI / Deep Native Runtime Cases (2/6) (push) Has been skipped
CI / Deep Native Runtime Cases (3/6) (push) Has been skipped
CI / Conformance Suite (push) Failing after 1s
CI / Workspace Checks (push) Failing after 0s
CI / Deep Native Runtime Cases (5/6) (push) Has been skipped
CI / Deep Native Runtime Cases (6/6) (push) Has been skipped
CI / Deep Native Runtime Cases (4/6) (push) Has been skipped
CI / Deep Graph Build Perf (push) Has been skipped
32 lines
1.1 KiB
TypeScript
Executable File
32 lines
1.1 KiB
TypeScript
Executable File
#!/usr/bin/env -S node --experimental-strip-types --disable-warning=ExperimentalWarning
|
|
import { execFileSync } from "node:child_process";
|
|
import { mkdirSync } from "node:fs";
|
|
|
|
const targetByHost = {
|
|
"darwin:arm64": "darwin-arm64",
|
|
"darwin:x64": "darwin-x64",
|
|
"linux:arm64": "linux-musl-arm64",
|
|
"linux:x64": "linux-musl-x64",
|
|
"win32:arm64": "win32-arm64.exe",
|
|
"win32:x64": "win32-x64.exe",
|
|
};
|
|
|
|
function run(command, args, options = {}) {
|
|
execFileSync(command, args, { stdio: "inherit", ...options });
|
|
}
|
|
|
|
const target = targetByHost[`${process.platform}:${process.arch}`];
|
|
if (!target) {
|
|
console.error(`native smoke does not know a runnable target for ${process.platform}/${process.arch}`);
|
|
process.exit(1);
|
|
}
|
|
|
|
const out = ".zero/out/add-native";
|
|
const exe = target.startsWith("win32-") ? `${out}.exe` : out;
|
|
|
|
mkdirSync(".zero/out", { recursive: true });
|
|
run("make", ["-C", "native/zero-c"]);
|
|
run("bin/zero", ["check", "examples/hello.graph"]);
|
|
run("bin/zero", ["build", "--emit", "exe", "--target", target, "examples/add.graph", "--out", out]);
|
|
run(exe, []);
|