From 06523bf0ed428b2ecfd8031094fdf6ac12ef6309 Mon Sep 17 00:00:00 2001 From: torque Date: Sun, 15 Sep 2024 20:31:17 -0700 Subject: [PATCH] ci: libsodium 1.0.20 does not build with zig master This is due to the arch enum losing the `aarch64_32` member. This is fixed in libsodium upstream, but is not yet in a release version. --- .github/workflows/ci.yaml | 4 +++- readme.md | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ce064da..34b5a2f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,6 +21,7 @@ jobs: os: ubuntu-latest - zig-version: "master" check-format: true + build-options: "-Denable-libsodium=false" os: ubuntu-latest runs-on: ${{ matrix.os }} steps: @@ -31,10 +32,11 @@ jobs: uses: mlugg/setup-zig@v1 with: version: ${{ matrix.zig-version }} + use-cache: false - if: ${{ matrix.check-format }} name: Check Formatting run: zig fmt --ast-check --check . - name: Build - run: zig build --summary all + run: zig build ${{ matrix.build-options }} --summary all diff --git a/readme.md b/readme.md index e0f0e52..dafaed5 100644 --- a/readme.md +++ b/readme.md @@ -41,9 +41,9 @@ your_exe.linkLibrary(nats_c_dep.artifact("nats_c")); The NATS.c library has optional dependencies: -- [`libressl`][libressl] when building with `enable-tls` -- [`protobuf-c`][protobuf-c] when building with `enable-streaming` -- [`libsodium`][libsodium] when building with `enable-libsodium` +- [`libressl 3.9.2`][libressl] when building with `enable-tls` +- [`protobuf-c 1.5.0`][protobuf-c] when building with `enable-streaming` +- [`libsodium 1.0.20`][libsodium] when building with `enable-libsodium` These dependencies are currently automatically retrieved and compiled as static libraries by the Zig build system. @@ -51,7 +51,7 @@ These dependencies are currently automatically retrieved and compiled as static | Refname | NATS.c Version | Zig `0.12.x` | Zig `0.13.x` | Zig `0.14.0-dev` | |----------|----------------|--------------|--------------|------------------| -| `3.8.2` | `3.8.2` | ✅ | ✅ | ✅ | +| `3.8.2` | `3.8.2` | ✅ | ✅ | with `-Denable-libsodium=false` | [nats.c]: https://github.com/nats-io/nats.c [libressl]: https://github.com/allyourcodebase/libressl