Merge branch 'ci-jit-cmd'

This commit is contained in:
Alex Rønne Petersen
2026-05-01 00:53:56 +02:00
5 changed files with 19 additions and 11 deletions
-3
View File
@@ -55,9 +55,6 @@ stage3-release/bin/zig build test docs \
stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe
stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug
# Ensure that reduce compiles
stage3-release/bin/zig reduce -h
# Ensure that stage3 and stage4 are byte-for-byte identical.
stage3-release/bin/zig build \
--maxrss ${ZSF_MAX_RSS:-0} \
-3
View File
@@ -77,9 +77,6 @@ stage3-release/bin/zig build test docs \
stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=ReleaseSafe
stage3-release/bin/zig build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug
# Ensure that reduce compiles
stage3-release/bin/zig reduce -h
# Ensure that stage3 and stage4 are byte-for-byte identical.
stage3-release/bin/zig build \
--prefix stage4-release \
-4
View File
@@ -61,10 +61,6 @@ CheckLastExitCode
# stage3-release\bin\zig.exe build test-std --fuzz=1K -Dno-lib -Dfuzz-only -Doptimize=Debug
# CheckLastExitCode
# Ensure that reduce compiles
stage3-release\bin\zig.exe build reduce -h
CheckLastExitCode
# Ensure that stage3 and stage4 are byte-for-byte identical.
Write-Output "Build and compare stage4..."
stage3-release\bin\zig.exe build `
+1 -1
View File
@@ -18,7 +18,7 @@ fn usage(io: Io) noreturn {
\\ By default, enabled unless a port is specified.
\\
) catch {};
std.process.exit(1);
std.process.exit(0);
}
pub fn main(init: std.process.Init) !void {
+18
View File
@@ -2237,6 +2237,24 @@ pub fn addCliTests(b: *std.Build) *Step {
const step = b.step("test-cli", "Test the command line interface");
const s = std.fs.path.sep_str;
{
// Test that all JIT'd commands compile.
for (&[_][]const u8{
"libc",
"objcopy",
"objdump",
"rc",
"reduce",
"std",
}) |cmd| {
const run_help = b.addSystemCommand(&.{ b.graph.zig_exe, cmd, "--help" });
run_help.setName(b.fmt("zig {s} --help", .{cmd}));
run_help.expectStdErrEqual("");
run_help.expectExitCode(0);
step.dependOn(&run_help.step);
}
}
{
// Test `zig init`.
const tmp_path = b.tmpPath();