Skip to content

Update Zig toolchain and lmdb #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
zig-version: ["master", "0.14.0"]
zig-version: ["master", "0.14.1"]
os: [ubuntu-latest, macos-latest, windows-latest]
optimize: [ReleaseSafe, ReleaseFast]
build-options: ["-Dlto"]
Expand All @@ -32,10 +32,9 @@ jobs:
submodules: false

- name: Set up Zig
uses: mlugg/setup-zig@v1
uses: mlugg/setup-zig@v2
with:
version: ${{ matrix.zig-version }}
use-cache: false

- name: Run `build`
run: zig build ${{ matrix.build-options }} -Doptimize=${{ matrix.optimize }} --summary all
Expand All @@ -45,7 +44,7 @@ jobs:
strategy:
fail-fast: false
matrix:
zig-version: ["master", "0.14.0"]
zig-version: ["master", "0.14.1"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -57,10 +56,9 @@ jobs:
submodules: false

- name: Set up Zig
uses: mlugg/setup-zig@v1
uses: mlugg/setup-zig@v2
with:
version: ${{ matrix.zig-version }}
use-cache: false

- name: Run `build tools on macos and windows`
run: |
Expand All @@ -71,7 +69,7 @@ jobs:
strategy:
fail-fast: false
matrix:
zig-version: ["master", "0.14.0"]
zig-version: ["master", "0.14.1"]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -83,10 +81,9 @@ jobs:
submodules: false

- name: Setup Zig
uses: mlugg/setup-zig@v1
uses: mlugg/setup-zig@v2
with:
version: ${{ matrix.zig-version }}
use-cache: false

- name: Run `Test`
run: zig build test --summary all
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ Using `lmdb` artifacts and module in your project

## Supported on Linux, macOS and Windows
- Zig 0.15.0-dev
- Zig 0.14.0
- Zig 0.14.1
14 changes: 10 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ const cflags = .{
"-std=c23",
};

const sanitize_c = if (builtin.zig_version.order(.{
.major = 0,
.minor = 14,
.patch = 1,
}) == .gt) .off else false;

pub fn build(b: *Build) void {
if (comptime !checkVersion())
@compileError("Update your zig toolchain to >= 0.13.0");
Expand Down Expand Up @@ -64,7 +70,7 @@ const BuildLmdb = struct {
.optimize = opt.optimize,
.link_libc = true,
.strip = opt.strip,
.sanitize_c = false,
.sanitize_c = sanitize_c,
}),
.use_llvm = opt.use_llvm(),
.use_lld = opt.use_lld(),
Expand Down Expand Up @@ -136,7 +142,7 @@ const BuildLmdb = struct {
.optimize = opt_.optimize,
.link_libc = true,
.strip = opt_.strip,
.sanitize_c = false,
.sanitize_c = sanitize_c,
}),
.use_llvm = opt_.use_llvm(),
.use_lld = opt_.use_lld(),
Expand Down Expand Up @@ -242,7 +248,7 @@ const BuildLmdb = struct {
.target = opt.target,
.optimize = .Debug,
.link_libc = true,
.sanitize_c = false,
.sanitize_c = sanitize_c,
}),
.use_lld = opt.use_lld(),
});
Expand Down Expand Up @@ -327,7 +333,7 @@ fn checkVersion() bool {
return false;
}

const needed_version = std.SemanticVersion{ .major = 0, .minor = 14, .patch = 0 };
const needed_version = std.SemanticVersion{ .major = 0, .minor = 14, .patch = 1 };
const version = builtin.zig_version;
const order = version.order(needed_version);
return order != .lt;
Expand Down
6 changes: 3 additions & 3 deletions build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.{
.name = .lmdb,
.version = "0.9.31+2",
.minimum_zig_version = "0.14.0",
.minimum_zig_version = "0.14.1",
.fingerprint = 0xb2966103474360ca,
.dependencies = .{
.lmdb = .{
.url = "https://github.com/LMDB/lmdb/archive/f20e41de09d97e4461946b7e26ec831d0c24fac7.tar.gz",
.hash = "N-V-__8AAC7gCADLpFI1WXLj3t-bdozmit34FAIaqT2ijeAi",
.url = "https://github.com/LMDB/lmdb/archive/14d6629bc8a9fe40d8a6bee1bf71c45afe7576b6.tar.gz",
.hash = "N-V-__8AABzgCAC6yX-gYcngpmRFF74ZANIAhphOalO6yoyI",
.lazy = false,
},
},
Expand Down
Loading