Skip to content

Commit

Permalink
chore: update to Zig v2024.1.0-mach
Browse files Browse the repository at this point in the history
  • Loading branch information
paoda committed Jan 17, 2024
1 parent b0389bb commit 7a95a1f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -27,14 +27,14 @@ 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:
runs-on: ubuntu-latest
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
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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");
Expand Down
6 changes: 6 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
.{
.name = "hamt",
.version = "0.1.0",
.paths = .{
"build.zig",
"build.zig.zon",
"README.md",
"src",
},
.dependencies = .{},
}

0 comments on commit 7a95a1f

Please sign in to comment.