From edd65b7f92745fd78db9a6a768e3472876ce6ae2 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Sat, 8 Jun 2024 10:28:36 -0700 Subject: [PATCH] upgrade to zig 0.13.0 --- .github/workflows/zig-build.yaml | 2 +- .gitignore | 1 + Dockerfile | 2 +- build.zig | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/zig-build.yaml b/.github/workflows/zig-build.yaml index f3876b3..3ead6ab 100644 --- a/.github/workflows/zig-build.yaml +++ b/.github/workflows/zig-build.yaml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: elerch/setup-zig@v3 with: - version: 0.12.0 + version: 0.13.0 - uses: elerch/zig-action-cache@v1.1.6 - name: Build project run: zig build --summary all diff --git a/.gitignore b/.gitignore index 4c82b07..f9a280a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ zig-cache zig-out +.zig-cache diff --git a/Dockerfile b/Dockerfile index dd1433b..f18b1f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update \ ca-certificates \ curl \ xz-utils \ - && curl https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz | tar -C /usr/local/ -xJ \ + && curl https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz | tar -C /usr/local/ -xJ \ && apt-get -y remove curl xz-utils \ && ln -s /usr/local/zig*/zig /usr/local/bin \ && rm -rf /var/lib/apt/lists/* diff --git a/build.zig b/build.zig index 2a31920..0b47ef1 100644 --- a/build.zig +++ b/build.zig @@ -19,7 +19,7 @@ pub fn build(b: *std.Build) void { .name = "fontfinder", // In this case the main source file is merely a path, however, in more // complicated build scripts, this could be a generated file. - .root_source_file = .{ .path = "src/main.zig" }, + .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, }); @@ -59,7 +59,7 @@ pub fn build(b: *std.Build) void { // Creates a step for unit testing. This only builds the test executable // but does not run it. const unit_tests = b.addTest(.{ - .root_source_file = .{ .path = "src/main.zig" }, + .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, });