Skip to content

Commit

Permalink
update zig to 2024.11.0-mach
Browse files Browse the repository at this point in the history
  • Loading branch information
zenith391 committed Dec 31, 2024
1 parent 857363d commit d97e1ad
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
sudo apt-get install libgtk-4-dev
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.14.0-dev.1911+3bf89f55c
version: 0.14.0-dev.2577+271452d22
- name: Check formatting
run: zig fmt --check src examples
- name: Build Capy for native
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.14.0-dev.1911+3bf89f55c

version: 0.14.0-dev.2577+271452d22
- name: Test Coverage Capy for native
run: xvfb-run -a zig build coverage
env:
Expand Down
2 changes: 1 addition & 1 deletion android/Sdk.zig
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ pub fn configureStep(
}) catch unreachable;
const system_include_dir = std.fs.path.resolve(sdk.b.allocator, &[_][]const u8{ include_dir, config.include_dir }) catch unreachable;

configureModule(sdk, &exe.root_module, app_config, target);
configureModule(sdk, exe.root_module, app_config, target);
exe.link_emit_relocs = true;
exe.link_eh_frame_hdr = true;
exe.root_module.pic = true;
Expand Down
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ pub fn build(b: *std.Build) !void {
.target = target,
.optimize = optimize,
});
try installCapyDependencies(b, &tests.root_module, options);
try installCapyDependencies(b, tests.root_module, options);
const run_tests = try runStep(tests, .{});

const test_step = b.step("test", "Run unit tests and also generate the documentation");
Expand All @@ -234,7 +234,7 @@ pub fn build(b: *std.Build) !void {
.target = target,
.optimize = .Debug,
});
try installCapyDependencies(b, &docs.root_module, options);
try installCapyDependencies(b, docs.root_module, options);
const install_docs = b.addInstallDirectory(.{
.source_dir = docs.getEmittedDocs(),
.install_dir = .prefix,
Expand All @@ -255,7 +255,7 @@ pub fn build(b: *std.Build) !void {
.optimize = optimize,
});
coverage_tests.setExecCmd(&.{ "kcov", "--clean", "--include-pattern=src/", "kcov-output", null });
try installCapyDependencies(b, &coverage_tests.root_module, options);
try installCapyDependencies(b, coverage_tests.root_module, options);

const run_coverage_tests = b.addSystemCommand(&.{ "kcov", "--clean", "--include-pattern=src/", "kcov-output" });
run_coverage_tests.addArtifactArg(coverage_tests);
Expand Down
4 changes: 2 additions & 2 deletions build_capy.zig
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ pub fn runStep(step: *std.Build.Step.Compile, options: CapyRunOptions) !*std.Bui
}

comptime {
const supported_zig = std.SemanticVersion.parse("0.14.0-dev.1911+3bf89f55c") catch unreachable;
const supported_zig = std.SemanticVersion.parse("0.14.0-dev.2577+271452d22") catch unreachable;
const zig_version = @import("builtin").zig_version;
if (zig_version.order(supported_zig) != .eq) {
@compileError(std.fmt.comptimePrint("unsupported Zig version ({}). Required Zig version 2024.10.0-mach: https://machengine.org/docs/nominated-zig/#2024100-mach", .{@import("builtin").zig_version}));
@compileError(std.fmt.comptimePrint("unsupported Zig version ({}). Required Zig version 2024.11.0-mach: https://machengine.org/docs/nominated-zig/#2024110-mach", .{@import("builtin").zig_version}));
}
}
2 changes: 1 addition & 1 deletion src/containers.zig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Callbacks = struct {
}
};

fn getExpandedCount(widgets: []*const Widget) u32 {
fn getExpandedCount(widgets: []const *const Widget) u32 {
var expandedCount: u32 = 0;
for (widgets) |widget| {
if (widget.container_expanded) expandedCount += 1;
Expand Down
8 changes: 4 additions & 4 deletions src/window.zig
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const Display = struct { resolution: Size, dpi: u32 };
const isErrorUnion = @import("internal.zig").isErrorUnion;

const devices = std.StaticStringMap(Display).initComptime(.{
.{ "iphone-13-mini", .{ .resolution = Size.init(1080, 2340), .dpi = 476 } },
.{ "iphone-13", .{ .resolution = Size.init(1170, 2532), .dpi = 460 } },
.{ "pixel-6", .{ .resolution = Size.init(1080, 2400), .dpi = 411 } },
.{ "pixel-6-pro", .{ .resolution = Size.init(1440, 3120), .dpi = 512 } },
.{ "iphone-13-mini", Display{ .resolution = Size.init(1080, 2340), .dpi = 476 } },
.{ "iphone-13", Display{ .resolution = Size.init(1170, 2532), .dpi = 460 } },
.{ "pixel-6", Display{ .resolution = Size.init(1080, 2400), .dpi = 411 } },
.{ "pixel-6-pro", Display{ .resolution = Size.init(1440, 3120), .dpi = 512 } },
});

pub const Window = struct {
Expand Down

0 comments on commit d97e1ad

Please sign in to comment.