Skip to content

Commit

Permalink
bump zig to 0.13.0 in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Jul 5, 2024
1 parent 8a3f457 commit 3004557
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
zig-version: [master, 0.12.0]
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: ${{ matrix.zig-version }}
- uses: actions/setup-go@v5
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Zig programming language

zig-cache/
.zig-cache/
zig-out/
build/
build-*/
Expand Down
14 changes: 14 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ pub fn build(b: *Build) void {
const run_main_tests = b.addRunArtifact(main_tests);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&run_main_tests.step);

const check_step = b.step("check", "Used for checking the library");
inline for (.{ "basic", "advanced", "multi" }) |name| {
const check_exe = b.addExecutable(.{
.name = "check-" ++ name,
.root_source_file = b.path("examples/" ++ name ++ ".zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
});

check_exe.root_module.addImport(MODULE_NAME, module);
check_step.dependOn(&check_exe.step);
}
}

fn buildLibcurl(
Expand Down

0 comments on commit 3004557

Please sign in to comment.