diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f954b20..2affad3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: goto-bus-stop/setup-zig@v2 with: - version: master + version: 0.12.0-dev.2063+804cee3b9 - uses: actions/checkout@v3 - run: zig fmt src/*.zig test: @@ -27,7 +27,7 @@ jobs: steps: - uses: goto-bus-stop/setup-zig@v2 with: - version: master + version: 0.12.0-dev.2063+804cee3b9 - uses: actions/checkout@v3 - run: zig build test bench: @@ -35,6 +35,6 @@ jobs: steps: - uses: goto-bus-stop/setup-zig@v2 with: - version: master + version: 0.12.0-dev.2063+804cee3b9 - uses: actions/checkout@v3 - run: zig build -Doptimize=ReleaseFast -Dcpu=baseline bench diff --git a/build.zig b/build.zig index 5e774a2..e78946a 100644 --- a/build.zig +++ b/build.zig @@ -15,7 +15,7 @@ pub fn build(b: *std.Build) void { // set a preferred release mode, allowing the user to decide how to optimize. const optimize = b.standardOptimizeOption(.{}); - const hamt_module = b.addModule("hamt", .{ .source_file = .{ .path = "src/lib.zig" } }); + const mod = b.addModule("hamt", .{ .root_source_file = .{ .path = "src/lib.zig" } }); const lib = b.addStaticLibrary(.{ .name = "hamt", @@ -36,9 +36,9 @@ pub fn build(b: *std.Build) void { .name = "hamt-benchmark", .root_source_file = .{ .path = "src/bench.zig" }, .target = target, - .optimize = optimize, + .optimize = .ReleaseFast, }); - bench.addModule("hamt", hamt_module); + bench.root_module.addImport("hamt", mod); const bench_cmd = b.addRunArtifact(bench); const bench_step = b.step("bench", "Run benchmark"); diff --git a/build.zig.zon b/build.zig.zon index cd579bc..46477fb 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,5 +1,11 @@ .{ .name = "hamt", .version = "0.1.0", + .paths = .{ + "build.zig", + "build.zig.zon", + "README.md", + "src", + }, .dependencies = .{}, }