Skip to content

Commit

Permalink
re-enable zig build test
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet committed Aug 5, 2023
1 parent 94ec373 commit 5238029
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,4 @@ jobs:
zig-version: 0.11.0

- name: Test
run: zig test src/main.zig

- name: Extra test
run: zig test src/tests.zig
run: zig build test
7 changes: 4 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Builder = @import("std").build.Builder;
const Builder = @import("std").Build;

pub fn build(b: *Builder) void {
const target = b.standardTargetOptions(.{});
Expand All @@ -11,7 +11,7 @@ pub fn build(b: *Builder) void {
});
b.installArtifact(lib);

var main_tests = b.addTest(.{
const main_tests = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" },
.optimize = optimize,
.target = target,
Expand All @@ -21,8 +21,9 @@ pub fn build(b: *Builder) void {
.optimize = optimize,
.target = target,
});
const run_main_tests = b.addRunArtifact(main_tests);

const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
test_step.dependOn(&tests_tests.step);
test_step.dependOn(&run_main_tests.step);
}

0 comments on commit 5238029

Please sign in to comment.