Skip to content

Commit

Permalink
bump zig version
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Aug 5, 2024
1 parent 54d095c commit 681b5ba
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 19 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ on:
- '**.zig'
- '.github/workflows/CI.yml'

env:
ZIG_VERSION: 0.12.0

jobs:
test:
timeout-minutes: 10
Expand All @@ -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: |
Expand All @@ -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
6 changes: 3 additions & 3 deletions .github/workflows/binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- ".github/workflows/binary.yml"

env:
ZIG_VERSION: 0.12.0
ZIG_VERSION: 0.13.0

jobs:
build:
Expand All @@ -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
Expand Down Expand Up @@ -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 }}

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/simargs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ on:
- 'src/mod/simargs.zig'
- ".github/workflows/simargs.yml"

env:
ZIG_VERSION: 0.12.0

jobs:
memory-leak:
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/zig-out
/zig-cache
/.zig-cache
*lock
docs/resources
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
zig 0.12.0
zig 0.13.0
5 changes: 2 additions & 3 deletions README.org
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/bin/loc.zig
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const Language = enum {
};
}

const ExtLangMap = std.ComptimeStringMap(Self, .{
const ExtLangMap = std.StaticStringMap(Self).initComptime(.{
.{ ".zig", .Zig },
.{ ".c", .C },
.{ ".cpp", .CPP },
Expand All @@ -84,7 +84,7 @@ const Language = enum {
.{ ".json", .JSON },
.{ ".ts", .TypeScript },
});
const FilenameLangMap = std.ComptimeStringMap(Self, .{
const FilenameLangMap = std.StaticStringMap(Self).initComptime(.{
.{ "Makefile", .Makefile },
});

Expand Down

0 comments on commit 681b5ba

Please sign in to comment.