|
|
@ -571,7 +571,7 @@ pub fn build(b: *Builder) !void {
|
|
|
|
\\
|
|
|
|
\\
|
|
|
|
\\
|
|
|
|
\\
|
|
|
|
;
|
|
|
|
;
|
|
|
|
const header_step = b.step("header", logo);
|
|
|
|
const header_step = b.step("info", logo);
|
|
|
|
print("{s}\n", .{logo});
|
|
|
|
print("{s}\n", .{logo});
|
|
|
|
|
|
|
|
|
|
|
|
const verify_all = b.step("ziglings", "Check all ziglings");
|
|
|
|
const verify_all = b.step("ziglings", "Check all ziglings");
|
|
|
@ -582,8 +582,7 @@ pub fn build(b: *Builder) !void {
|
|
|
|
|
|
|
|
|
|
|
|
const use_healed = b.option(bool, "healed", "Run exercises from patches/healed") orelse false;
|
|
|
|
const use_healed = b.option(bool, "healed", "Run exercises from patches/healed") orelse false;
|
|
|
|
|
|
|
|
|
|
|
|
// for (exercises) |ex| {
|
|
|
|
for (exercises) |ex| {
|
|
|
|
const ex = exercises[0];
|
|
|
|
|
|
|
|
const base_name = ex.baseName();
|
|
|
|
const base_name = ex.baseName();
|
|
|
|
const file_path = std.fs.path.join(b.allocator, &[_][]const u8{
|
|
|
|
const file_path = std.fs.path.join(b.allocator, &[_][]const u8{
|
|
|
|
if (use_healed) "patches/healed" else "exercises", ex.main_file,
|
|
|
|
if (use_healed) "patches/healed" else "exercises", ex.main_file,
|
|
|
@ -591,7 +590,6 @@ pub fn build(b: *Builder) !void {
|
|
|
|
const build_step = b.addExecutable(.{ .name = base_name, .root_source_file = .{ .path = file_path } });
|
|
|
|
const build_step = b.addExecutable(.{ .name = base_name, .root_source_file = .{ .path = file_path } });
|
|
|
|
|
|
|
|
|
|
|
|
build_step.install();
|
|
|
|
build_step.install();
|
|
|
|
// std.time.sleep(1000000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const verify_step = ZiglingStep.create(b, ex, use_healed);
|
|
|
|
const verify_step = ZiglingStep.create(b, ex, use_healed);
|
|
|
|
|
|
|
|
|
|
|
@ -617,10 +615,7 @@ pub fn build(b: *Builder) !void {
|
|
|
|
|
|
|
|
|
|
|
|
prev_chain_verify.dependOn(chain_verify);
|
|
|
|
prev_chain_verify.dependOn(chain_verify);
|
|
|
|
prev_chain_verify = chain_verify;
|
|
|
|
prev_chain_verify = chain_verify;
|
|
|
|
// std.os.exit(0);
|
|
|
|
}
|
|
|
|
// while (true) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var use_color_escapes = false;
|
|
|
|
var use_color_escapes = false;
|
|
|
@ -638,7 +633,6 @@ const ZiglingStep = struct {
|
|
|
|
pub fn create(builder: *Builder, exercise: Exercise, use_healed: bool) *@This() {
|
|
|
|
pub fn create(builder: *Builder, exercise: Exercise, use_healed: bool) *@This() {
|
|
|
|
const self = builder.allocator.create(@This()) catch unreachable;
|
|
|
|
const self = builder.allocator.create(@This()) catch unreachable;
|
|
|
|
self.* = .{
|
|
|
|
self.* = .{
|
|
|
|
// .step = Step.init(.custom, exercise.main_file, builder.allocator, make),
|
|
|
|
|
|
|
|
.step = Step.init(Step.Options{ .id = .custom, .name = exercise.main_file, .owner = builder, .makeFn = make }),
|
|
|
|
.step = Step.init(Step.Options{ .id = .custom, .name = exercise.main_file, .owner = builder, .makeFn = make }),
|
|
|
|
.exercise = exercise,
|
|
|
|
.exercise = exercise,
|
|
|
|
.builder = builder,
|
|
|
|
.builder = builder,
|
|
|
|