diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2236e14..0e5dbda 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,9 +15,6 @@ on: - '**.zig' - '.github/workflows/CI.yml' -env: - ZIG_VERSION: 0.12.0 - jobs: test: timeout-minutes: 10 @@ -26,13 +23,14 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] + zig-version: [master, 0.13.0] steps: - uses: actions/checkout@v4 with: submodules: true - - uses: goto-bus-stop/setup-zig@v2 + - uses: mlugg/setup-zig@v1 with: - version: ${{ env.ZIG_VERSION }} + version: ${{ matrix.zig-version }} - name: fmt and test(windows) if: matrix.os == 'windows-latest' run: | @@ -58,7 +56,7 @@ jobs: - uses: actions/checkout@v4 - uses: goto-bus-stop/setup-zig@v2 with: - version: ${{ env.ZIG_VERSION }} + version: 0.13.0 - name: Build run: | zig build -Dtarget=${{ matrix.targets }} -Dis_ci diff --git a/.github/workflows/binary.yml b/.github/workflows/binary.yml index 8ab31b4..8bd853d 100644 --- a/.github/workflows/binary.yml +++ b/.github/workflows/binary.yml @@ -14,7 +14,7 @@ on: - ".github/workflows/binary.yml" env: - ZIG_VERSION: 0.12.0 + ZIG_VERSION: 0.13.0 jobs: build: @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - uses: goto-bus-stop/setup-zig@v2 + - uses: mlugg/setup-zig@v1 with: version: ${{ env.ZIG_VERSION }} - name: Set Environment Variables @@ -67,7 +67,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - uses: goto-bus-stop/setup-zig@v2 + - uses: mlugg/setup-zig@v1 with: version: ${{ env.ZIG_VERSION }} diff --git a/.github/workflows/simargs.yml b/.github/workflows/simargs.yml index 800ab65..276ef15 100644 --- a/.github/workflows/simargs.yml +++ b/.github/workflows/simargs.yml @@ -13,8 +13,6 @@ on: - 'src/mod/simargs.zig' - ".github/workflows/simargs.yml" -env: - ZIG_VERSION: 0.12.0 jobs: memory-leak: @@ -24,11 +22,12 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] + zig-version: [master, 0.13.0] steps: - uses: actions/checkout@v4 - - uses: goto-bus-stop/setup-zig@v2 + - uses: mlugg/setup-zig@v1 with: - version: ${{ env.ZIG_VERSION }} + version: ${{ matrix.zig-version }} - name: Memory leak detect run: | sudo apt update && sudo apt install -y valgrind diff --git a/.gitignore b/.gitignore index 2592f0b..274c7dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /zig-out /zig-cache +/.zig-cache *lock docs/resources \ No newline at end of file diff --git a/.tool-versions b/.tool-versions index c947e45..02050d7 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -zig 0.12.0 +zig 0.13.0 diff --git a/README.org b/README.org index fc453b2..ccc8af2 100644 --- a/README.org +++ b/README.org @@ -1,13 +1,12 @@ #+TITLE: Zigcli #+DATE: 2023-10-21T12:09:48+0800 -#+LASTMOD: 2024-05-02T18:01:55+0800 +#+LASTMOD: 2024-08-05T22:08:33+0800 #+TYPE: docs [[https://github.com/jiacai2050/zigcli/stargazers][https://img.shields.io/github/stars/jiacai2050/zigcli.svg]] -[[https://github.com/jiacai2050/zigcli/blob/main/LICENSE][https://img.shields.io/github/license/jiacai2050/zigcli.svg]] [[https://github.com/jiacai2050/loc/actions/workflows/CI.yml][https://github.com/jiacai2050/loc/actions/workflows/CI.yml/badge.svg]] [[https://github.com/jiacai2050/loc/actions/workflows/binary.yml][https://github.com/jiacai2050/loc/actions/workflows/binary.yml/badge.svg]] -[[https://img.shields.io/badge/zig%20version-0.12.0-blue.svg]] +[[https://img.shields.io/badge/zig%20version-0.13.0-blue.svg]] #+begin_quote [[/][Zigcli]] is a toolkit for building command lines programs in Zig. diff --git a/src/bin/loc.zig b/src/bin/loc.zig index 22b03f1..2861f14 100644 --- a/src/bin/loc.zig +++ b/src/bin/loc.zig @@ -61,7 +61,7 @@ const Language = enum { }; } - const ExtLangMap = std.ComptimeStringMap(Self, .{ + const ExtLangMap = std.StaticStringMap(Self).initComptime(.{ .{ ".zig", .Zig }, .{ ".c", .C }, .{ ".cpp", .CPP }, @@ -84,7 +84,7 @@ const Language = enum { .{ ".json", .JSON }, .{ ".ts", .TypeScript }, }); - const FilenameLangMap = std.ComptimeStringMap(Self, .{ + const FilenameLangMap = std.StaticStringMap(Self).initComptime(.{ .{ "Makefile", .Makefile }, });