diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 5064d7b..d4c17c2 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -52,9 +52,9 @@ jobs: run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV - name: Install Zig - uses: goto-bus-stop/setup-zig@v2 + uses: mlugg/setup-zig@v1 with: - version: 0.12.1 + version: 0.14.0 - name: Show Zig version run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1db3794..f37a84a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,9 +29,9 @@ jobs: uses: actions/checkout@v3 - name: Install Zig - uses: goto-bus-stop/setup-zig@v2 + uses: mlugg/setup-zig@v1 with: - version: 0.12.1 + version: 0.14.0 - name: Show Zig version run: | @@ -46,15 +46,15 @@ jobs: test: name: Test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout the repository uses: actions/checkout@v3 - name: Install Zig - uses: goto-bus-stop/setup-zig@v2 + uses: mlugg/setup-zig@v1 with: - version: 0.12.1 + version: 0.14.0 - name: Install kcov run: | @@ -84,9 +84,9 @@ jobs: uses: actions/checkout@v3 - name: Install Zig - uses: goto-bus-stop/setup-zig@v2 + uses: mlugg/setup-zig@v1 with: - version: 0.12.1 + version: 0.14.0 - name: Check formatting run: zig fmt --check . diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 81d6232..879263b 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -28,9 +28,9 @@ jobs: uses: actions/checkout@v3 - name: Install Zig - uses: goto-bus-stop/setup-zig@v2 + uses: mlugg/setup-zig@v1 with: - version: 0.12.1 + version: 0.14.0 - name: Show Zig version run: | diff --git a/Dockerfile b/Dockerfile index 7f0ac61..56def54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM euantorano/zig:0.10.1 as builder +FROM eloitor/zig:0.14.0 as builder RUN apk update RUN apk add --no-cache git WORKDIR /app diff --git a/README.md b/README.md index 871a545..2d9f1f7 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ #### Prerequisites -- [Zig](https://ziglang.org/download/) (`0.12` or `0.13`) +- [Zig](https://ziglang.org/download/) (`0.14`) #### Instructions diff --git a/build.zig b/build.zig index 06b9ab2..3c9cd6d 100644 --- a/build.zig +++ b/build.zig @@ -10,7 +10,7 @@ const version = "0.2.0"; // managed by release.sh /// /// This is used for providing the dependencies for main executable as well as the tests. fn addPackages(b: *std.Build, exe: *std.Build.Step.Compile) !void { - const clap = b.dependency("zig-clap", .{}).module("clap"); + const clap = b.dependency("clap", .{}).module("clap"); exe.root_module.addImport("clap", clap); for ([_][]const u8{ "file", "gen", "wav" }) |package| { const path = b.fmt("src/{s}.zig", .{package}); diff --git a/build.zig.zon b/build.zig.zon index 50496dc..bf488df 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,6 +1,8 @@ .{ - .name = "linuxwave", + .name = .linuxwave, .version = "0.1.5", + .fingerprint = 0x217eafdf4732b5f9, + .minimum_zig_version = "0.14.0", .paths = .{ "build.zig", "build.zig.zon", @@ -9,9 +11,9 @@ "README.md", }, .dependencies = .{ - .@"zig-clap" = .{ - .url = "https://github.com/Hejsil/zig-clap/archive/refs/tags/0.9.1.tar.gz", - .hash = "122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b", + .clap = .{ + .url = "https://github.com/Hejsil/zig-clap/archive/refs/tags/0.10.0.tar.gz", + .hash = "clap-0.10.0-oBajB434AQBDh-Ei3YtoKIRxZacVPF1iSwp3IX_ZB8f0", }, }, } diff --git a/src/file.zig b/src/file.zig index c5a565e..0a4e78a 100644 --- a/src/file.zig +++ b/src/file.zig @@ -18,7 +18,7 @@ pub fn readBytes( test "read bytes from the file" { // Get the current directory. - var cwd_buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined; + var cwd_buffer: [std.fs.max_path_bytes]u8 = undefined; const cwd = try std.posix.getcwd(&cwd_buffer); // Concatenate the current directory with the builder file. diff --git a/src/main.zig b/src/main.zig index bef62e8..20a4025 100644 --- a/src/main.zig +++ b/src/main.zig @@ -30,7 +30,7 @@ fn run(allocator: std.mem.Allocator, output: anytype) !void { // Create generator configuration. const scale = s: { var scale = std.ArrayList(u8).init(allocator); - var splits = std.mem.split(u8, if (cli.args.scale) |s| s else defaults.scale, ","); + var splits = std.mem.splitAny(u8, if (cli.args.scale) |s| s else defaults.scale, ","); while (splits.next()) |chunk| { try scale.append(try std.fmt.parseInt(u8, chunk, 0)); }