mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
Fix CI
This commit is contained in:
parent
d8a7864f2b
commit
7d099cdd50
2 changed files with 35 additions and 0 deletions
34
build.zig
34
build.zig
|
|
@ -764,6 +764,7 @@ const MiniCiStep = struct {
|
|||
// Run the sequence of `zig build` commands that make up the
|
||||
// mini CI pipeline.
|
||||
try runSubBuild(step, "fmt", "zig build fmt");
|
||||
try checkTestWiring(step);
|
||||
try runSubBuild(step, null, "zig build");
|
||||
try checkBuiltinRocFormatting(step);
|
||||
try runSubBuild(step, "snapshot", "zig build snapshot");
|
||||
|
|
@ -882,6 +883,39 @@ const MiniCiStep = struct {
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
fn checkTestWiring(step: *Step) !void {
|
||||
const b = step.owner;
|
||||
std.debug.print("---- minici: checking test wiring ----\n", .{});
|
||||
|
||||
var child_argv = std.ArrayList([]const u8).empty;
|
||||
defer child_argv.deinit(b.allocator);
|
||||
|
||||
try child_argv.append(b.allocator, b.graph.zig_exe);
|
||||
try child_argv.append(b.allocator, "run");
|
||||
try child_argv.append(b.allocator, "ci/check_test_wiring.zig");
|
||||
|
||||
var child = std.process.Child.init(child_argv.items, b.allocator);
|
||||
child.stdin_behavior = .Inherit;
|
||||
child.stdout_behavior = .Inherit;
|
||||
child.stderr_behavior = .Inherit;
|
||||
|
||||
const term = try child.spawnAndWait();
|
||||
|
||||
switch (term) {
|
||||
.Exited => |code| {
|
||||
if (code != 0) {
|
||||
return step.fail(
|
||||
"Test wiring check failed. Run 'zig run ci/check_test_wiring.zig' to see details.",
|
||||
.{},
|
||||
);
|
||||
}
|
||||
},
|
||||
else => {
|
||||
return step.fail("zig run ci/check_test_wiring.zig terminated abnormally", .{});
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
fn createAndRunBuiltinCompiler(
|
||||
|
|
|
|||
|
|
@ -41,4 +41,5 @@ test "check tests" {
|
|||
std.testing.refAllDecls(@import("test/builtin_scope_test.zig"));
|
||||
std.testing.refAllDecls(@import("test/num_type_inference_test.zig"));
|
||||
std.testing.refAllDecls(@import("test/unify_test.zig"));
|
||||
std.testing.refAllDecls(@import("test/instantiate_tag_union_test.zig"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue