Skip to content

Commit

Permalink
Bump to libzmq v4.3.5 (#34)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jean-airoldie committed Nov 6, 2023
1 parent 21056e9 commit 392294d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 25 deletions.
43 changes: 22 additions & 21 deletions .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:
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
args: --manifest-path testcrate/Cargo.toml ${{ matrix.tests }}
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,4 +1,4 @@
[submodule "vendor"]
path = vendor
url = https://github.com/zeromq/libzmq
branch = v4.3.4
branch = v4.3.5
2 changes: 1 addition & 1 deletion 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 <maxence.caron@protonmail.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Expand Up @@ -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");

Expand Down Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion vendor
Submodule vendor updated 869 files

0 comments on commit 392294d

Please sign in to comment.