From 392294d802d52300e7eda7c958bcdbefd78c7ab0 Mon Sep 17 00:00:00 2001 From: jean-airoldie <25088801+jean-airoldie@users.noreply.github.com> Date: Sun, 5 Nov 2023 23:51:47 -0500 Subject: [PATCH] Bump to libzmq v4.3.5 (#34) * Bump to libzmq v4.3.5 * Update ci.yaml * Add ENV variable proper windows compile error messages * Set ZMQ_HAVE_STRUCT_SOCKADDR_UN=1 on windows * Bump to 0.3 --- .github/workflows/ci.yaml | 43 ++++++++++++++++++++------------------- .gitmodules | 2 +- Cargo.toml | 2 +- src/lib.rs | 5 ++++- vendor | 2 +- 5 files changed, 29 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index beb279d..dd05c7d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,9 @@ on: [push, pull_request] name: Continuous integration +env: + # Force Visual Studio compile errors to display in english + VSLANG: 1033 jobs: check: @@ -11,19 +14,18 @@ jobs: rust: [stable] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/cache@v2 - # https://github.com/actions/cache/blob/main/examples.md#rust---cargo + # https://github.com/actions/cache/blob/main/examples.md#rust---cargo + - uses: actions/cache@v3 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-check-${{ hashFiles('**/Cargo.lock') }} + path: ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.rust }} @@ -54,21 +56,20 @@ jobs: tests: ["", "--release", "--features=libsodium"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/cache@v2 - # https://github.com/actions/cache/blob/main/examples.md#rust---cargo + # https://github.com/actions/cache/blob/main/examples.md#rust---cargo + - uses: actions/cache@v3 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} + path: ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Cargo test uses: actions-rs/cargo@v1 with: command: test - args: --manifest-path testcrate/Cargo.toml ${{ matrix.tests }} \ No newline at end of file + args: --manifest-path testcrate/Cargo.toml ${{ matrix.tests }} diff --git a/.gitmodules b/.gitmodules index ff00da4..af7d084 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "vendor"] path = vendor url = https://github.com/zeromq/libzmq - branch = v4.3.4 + branch = v4.3.5 diff --git a/Cargo.toml b/Cargo.toml index 4d410d7..cd3f400 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zeromq-src" -version = "0.2.6+4.3.4" +version = "0.3.0+4.3.5" authors = ["jean-airoldie "] edition = "2018" license = "MIT OR Apache-2.0" diff --git a/src/lib.rs b/src/lib.rs index 04358f6..b879d65 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -378,6 +378,7 @@ impl Build { build.define("ZMQ_IOTHREAD_POLLER_USE_EPOLL", "1"); build.define("ZMQ_POLL_BASED_ON_POLL", "1"); build.define("_WIN32_WINNT", "0x0600"); // vista + build.define("ZMQ_HAVE_STRUCT_SOCKADDR_UN", "1"); println!("cargo:rustc-link-lib=iphlpapi"); @@ -406,6 +407,7 @@ impl Build { build.define("HAVE_STRNLEN", "1"); build.define("ZMQ_HAVE_UIO", "1"); + build.define("ZMQ_HAVE_STRUCT_SOCKADDR_UN", "1"); if target.contains("android") { has_strlcpy = true; @@ -421,6 +423,7 @@ impl Build { build.define("HAVE_STRNLEN", "1"); build.define("ZMQ_HAVE_UIO", "1"); build.define("ZMQ_HAVE_IPC", "1"); + build.define("ZMQ_HAVE_STRUCT_SOCKADDR_UN", "1"); has_strlcpy = true; } @@ -474,7 +477,7 @@ mod test { fn version_works() { let version = testcrate::version(); println!("{:?}", version); - assert_eq!(version, (4, 3, 4)); + assert_eq!(version, (4, 3, 5)); } #[test] diff --git a/vendor b/vendor index 4097855..622fc6d 160000 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit 4097855ddaaa65ed7b5e8cb86d143842a594eebd +Subproject commit 622fc6dde99ee172ebaa9c8628d85a7a1995a21d