diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2d1f2c7..cdd0465 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,12 +12,12 @@ jobs: strategy: fail-fast: false matrix: - zig-version: ["0.14.1"] - os: [macos-latest, windows-latest] + zig-version: ["0.15.2"] + os: [macos-latest, windows-latest, ubuntu-latest] include: - zig-version: "0.14.1" + check-format: true os: ubuntu-latest - - zig-version: "master" check-format: true build-options: "-Dbuild-apps" diff --git a/build.zig b/build.zig index c77ba6e..6601a88 100644 --- a/build.zig +++ b/build.zig @@ -385,18 +385,9 @@ pub fn build(b: *std.Build) !void { else => @panic("unsupported target CPU arch"), }); - libressl_common.installHeader(conf_header, "openssl/opensslconf.h"); - - try libressl_common.installHeaders( - b, - upstream, - source_header_prefix, - &.{ - .{ .starts_with = "compat" }, - .{ .starts_with = "arch" }, - .{ .ends_with = "pqueue.h" }, - }, - ); + libressl_common.libtls.installHeader(upstream.path("include/tls.h"), "tls.h"); + libressl_common.libssl.installHeader(conf_header, "openssl/opensslconf.h"); + libressl_common.libssl.installHeadersDirectory(upstream.path("include/openssl"), "openssl", .{}); for (libcrypto_include_paths) |path| { libressl_common.libcrypto.root_module.addIncludePath(upstream.path(path)); @@ -559,32 +550,6 @@ const LibreSslCommon = struct { self.libssl.installHeader(source, dest); self.libtls.installHeader(source, dest); } - - pub fn installHeaders( - self: LibreSslCommon, - b: *std.Build, - upstream: *std.Build.Dependency, - base: []const u8, - skiplist: []const SkipSpec, - ) !void { - const dir = try upstream.builder.build_root.handle.openDir(base, .{ .iterate = true }); - var walker = try dir.walk(b.allocator); - defer walker.deinit(); - - walker: while (try walker.next()) |child| { - for (skiplist) |entry| { - switch (entry) { - .starts_with => |name| if (std.mem.startsWith(u8, child.path, name)) continue :walker, - .ends_with => |name| if (std.mem.endsWith(u8, child.path, name)) continue :walker, - } - } - - if (std.mem.endsWith(u8, child.basename, ".h")) { - const full = b.pathJoin(&.{ base, child.path }); - self.installHeader(upstream.path(full), child.path); - } - } - } }; const SkipSpec = union(enum) { diff --git a/readme.md b/readme.md index 08fcb82..49f67f9 100644 --- a/readme.md +++ b/readme.md @@ -48,8 +48,5 @@ your_exe.linkLibrary(libressl_dependency.artifact("tls")); // or "ssl", or "cryp | Refname | LibreSSL Version | Zig `0.16.0-dev` | Zig `0.15.x` | Zig `0.14.x` | Zig `0.13.x` | Zig `0.12.x` | |-----------|------------------|------------------|--------------|--------------|--------------|--------------| -| `4.0.0+4` | `4.0.0` | ✅ | ✅ | ✅ | ❌ | ❌ | -| `4.0.0+3` | `4.0.0` | ❌ | ✅ | ✅ | ❌ | ❌ | -| `4.0.0+2` | `4.0.0` | ❌ | ❌ | ✅ | ❌ | ❌ | +| `4.0.0+5` | `4.0.0` | ✅ | ✅ | ✅ | ❌ | ❌ | | `4.0.0+1` | `4.0.0` | ❌ | ❌ | ❌ | ✅ | ✅ | -| `3.9.2+1` | `3.9.2` | ❌ | ❌ | ❌ | ✅ | ✅ |