From 40621b4d64493ee1f5fb9757c85f8df60a3ec39e Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 4 Apr 2024 16:01:41 +0200 Subject: [PATCH 01/28] feat: Add `Cross.toml` --- Cross.toml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Cross.toml diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 000000000..127ef5ec8 --- /dev/null +++ b/Cross.toml @@ -0,0 +1,18 @@ +[target.x86_64-unknown-linux-musl] +image = "jenoch/rust-cross:x86_64-unknown-linux-musl" + +[target.arm-unknown-linux-gnueabi] +image = "jenoch/rust-cross:arm-unknown-linux-gnueabi" + +[target.arm-unknown-linux-gnueabihf] +image = "jenoch/rust-cross:arm-unknown-linux-gnueabihf" + +[target.armv7-unknown-linux-gnueabihf] +image = "jenoch/rust-cross:armv7-unknown-linux-gnueabihf" + +[target.aarch64-unknown-linux-gnu] +image = "jenoch/rust-cross:aarch64-unknown-linux-gnu" + +[target.aarch64-unknown-linux-musl] +image = "jenoch/rust-cross:aarch64-unknown-linux-musl" + From 5aa776cfb763eeee5a1234a7abe1ba9e979a21e0 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Mon, 8 Apr 2024 16:49:51 +0200 Subject: [PATCH 02/28] feat: Statically link C runtime on `-musl` targets --- .cargo/config.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..5adae5e04 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +[target.x86_64-unknown-linux-musl] +rustflags = "-Ctarget-feature=-crt-static" + +[target.aarch64-unknown-linux-musl] +rustflags = "-Ctarget-feature=-crt-static" From 2bb7b1621d98d04e7738c1548c571b530d2e5010 Mon Sep 17 00:00:00 2001 From: eclipse-zenoh-bot <61247838+eclipse-zenoh-bot@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:47:30 +0200 Subject: [PATCH 03/28] build: Sync with eclipse-zenoh/zenoh@0926dd3 from 2024-04-08 (#309) Co-authored-by: eclipse-zenoh-bot --- Cargo.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 959b85749..644a21aaa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2953,7 +2953,7 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "zenoh" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-trait", "base64", @@ -3004,7 +3004,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "zenoh-collections", ] @@ -3036,7 +3036,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "log", "serde", @@ -3049,12 +3049,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" [[package]] name = "zenoh-config" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "flume", "json5", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-global-executor", "lazy_static", @@ -3086,7 +3086,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "aes", "hmac", @@ -3099,7 +3099,7 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "bincode", "env_logger 0.11.2", @@ -3121,7 +3121,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "hashbrown 0.14.0", "keyed-set", @@ -3135,7 +3135,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-trait", "zenoh-config", @@ -3153,7 +3153,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-trait", "flume", @@ -3176,7 +3176,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-trait", "base64", @@ -3204,7 +3204,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-trait", "log", @@ -3222,7 +3222,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-trait", "base64", @@ -3250,7 +3250,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-trait", "log", @@ -3271,7 +3271,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-trait", "futures", @@ -3291,7 +3291,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-trait", "futures-util", @@ -3312,7 +3312,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "proc-macro2", "quote", @@ -3323,7 +3323,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "const_format", "libloading", @@ -3339,7 +3339,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "const_format", "rand", @@ -3353,7 +3353,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "anyhow", ] @@ -3361,7 +3361,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "futures", "lazy_static", @@ -3373,7 +3373,7 @@ dependencies = [ [[package]] name = "zenoh-shm" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "log", "serde", @@ -3385,7 +3385,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "event-listener 4.0.0", "futures", @@ -3399,7 +3399,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "futures", "log", @@ -3412,7 +3412,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-trait", "flume", @@ -3445,7 +3445,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#02d4783042d50110ccfb79aada420ff5231ae840" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" dependencies = [ "async-std", "async-trait", From f6a73c0a89c12fc27dc04165fce912a9f21cfac3 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 14:11:40 +0200 Subject: [PATCH 04/28] feat: Add bump.bash script --- ci/scripts/bump.bash | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 ci/scripts/bump.bash diff --git a/ci/scripts/bump.bash b/ci/scripts/bump.bash new file mode 100644 index 000000000..c2b90cc64 --- /dev/null +++ b/ci/scripts/bump.bash @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Project version +readonly VERSION +# Zenoh dependencies' version +readonly ZENOH_VERSION +# Zenoh dependencies' git branch +readonly ZENOH_BRANCH + +cargo +stable install toml-cli + +# NOTE(fuzzypixelz): toml-cli doesn't yet support in-place modification +# See: https://github.com/gnprice/toml-cli?tab=readme-ov-file#writing-ish-toml-set +function toml_set_in_place() { + local tmp=$(mktemp) + toml set "$1" "$2" "$3" > "$tmp" + mv "$tmp" "$1" +} + +# Bump CMake project version +sed -i "s;^set(ZENOHC_VERSION .*)$;set(ZENOHC_VERSION $VERSION);" CMakeLists.txt +# Propagate version change to Cargo.toml and Cargo.toml.in +cmake . -DZENOHC_BUILD_IN_SOURCE_TREE=TRUE -DCMAKE_BUILD_TYPE=Release + +git commit CMakeLists.txt Cargo.toml Cargo.lock -m "chore: Bump version to $VERSION" + +# Select all package dependencies that match 'zenoh.*' and bump them to $ZENOH_VERSION +zenoh_deps=$(toml get Cargo.toml dependencies | jq -r 'keys.[] | select(test("zenoh.*"))') +for dep in $zenoh_deps; do + [[ -n $ZENOH_VERSION ]] && toml_set_in_place Cargo.toml "dependencies.$dep.version" "$ZENOH_VERSION" + [[ -n $ZENOH_BRANCH ]] && toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$ZENOH_BRANCH" +done +# Update lockfile +cargo check + +if [[ -n $ZENOH_VERSION || -n $ZENOH_BRANCH ]]; then + git commit Cargo.toml Cargo.lock -m "chore: Bump Zenoh version to $ZENOH_VERSION" +else + echo "info: no changes have been made to Zenoh dependencies" +fi From afd74cc536b8e1b5f3f1b15364a6581465db6b94 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 14:24:48 +0200 Subject: [PATCH 05/28] feat: Support `x.y.z` project version numbers --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d236e99fe..35728830d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,10 +36,10 @@ declare_cache_var(ZENOHC_LIB_STATIC FALSE BOOL "Alias zenohc::lib target to zeno # set(project_version "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") if(NOT PROJECT_VERSION_TWEAK) + set(project_version "${project_version}") +elseif(PROJECT_VERSION_TWEAK EQUAL 0) set(project_version "${project_version}-dev") -elseif(PROJECT_VERSION_TWEAK EQUAL 1) - set(project_version "${project_version}-rc") -elseif(PROJECT_VERSION_TWEAK LESS 255) +elseif(PROJECT_VERSION_TWEAK GREATER 1) set(project_version "${project_version}-rc.${PROJECT_VERSION_TWEAK}") endif() status_print(project_version) From cb2c4e0d48c9fa9237cdfc147e38bc91d6655147 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 14:34:47 +0200 Subject: [PATCH 06/28] fix: Remove enforce-linking-issues workflow --- .github/workflows/enforce-linking-issues.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .github/workflows/enforce-linking-issues.yml diff --git a/.github/workflows/enforce-linking-issues.yml b/.github/workflows/enforce-linking-issues.yml deleted file mode 100644 index ebeddd9ee..000000000 --- a/.github/workflows/enforce-linking-issues.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: Enforce linking issues - -on: - pull_request_target: - types: [opened, edited, labeled] - -jobs: - main: - uses: eclipse-zenoh/zenoh/.github/workflows/enforce-linking-issues.yml@main - secrets: inherit From 43b16343115654633c519f6acd7fdc185049e51d Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 14:39:37 +0200 Subject: [PATCH 07/28] fix: Enable unbound variables --- ci/scripts/bump.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/scripts/bump.bash b/ci/scripts/bump.bash index c2b90cc64..9b39cb021 100644 --- a/ci/scripts/bump.bash +++ b/ci/scripts/bump.bash @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -euo pipefail +set -eo pipefail # Project version readonly VERSION From 64e6d174549b43d9fcac2c2642e345bb235fd4d2 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 14:40:07 +0200 Subject: [PATCH 08/28] fix: Update Read the Docs version in bump.bash --- ci/scripts/bump.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/scripts/bump.bash b/ci/scripts/bump.bash index 9b39cb021..11fd44a2d 100644 --- a/ci/scripts/bump.bash +++ b/ci/scripts/bump.bash @@ -23,6 +23,8 @@ function toml_set_in_place() { sed -i "s;^set(ZENOHC_VERSION .*)$;set(ZENOHC_VERSION $VERSION);" CMakeLists.txt # Propagate version change to Cargo.toml and Cargo.toml.in cmake . -DZENOHC_BUILD_IN_SOURCE_TREE=TRUE -DCMAKE_BUILD_TYPE=Release +# Update Read the Docs version +sed -i "s;^release = .*$;release = '$VERSION';" docs/conf.py git commit CMakeLists.txt Cargo.toml Cargo.lock -m "chore: Bump version to $VERSION" From 355eda36ef9eff3142bf4a5fbfa4110f5f18abaa Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 15:02:24 +0200 Subject: [PATCH 09/28] fix: Bump Debian self dependency version --- ci/scripts/bump.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/scripts/bump.bash b/ci/scripts/bump.bash index 11fd44a2d..6b196021b 100644 --- a/ci/scripts/bump.bash +++ b/ci/scripts/bump.bash @@ -25,8 +25,11 @@ sed -i "s;^set(ZENOHC_VERSION .*)$;set(ZENOHC_VERSION $VERSION);" CMakeLists.txt cmake . -DZENOHC_BUILD_IN_SOURCE_TREE=TRUE -DCMAKE_BUILD_TYPE=Release # Update Read the Docs version sed -i "s;^release = .*$;release = '$VERSION';" docs/conf.py +# Update Debian dependency of libzenohc-dev +toml_set_in_place Cargo.toml "package.metadata.deb.variants.libzenohc-dev.depends" "libzenohc (=$VERSION)" +toml_set_in_place Cargo.toml.in "package.metadata.deb.variants.libzenohc-dev.depends" "libzenohc (=$VERSION)" -git commit CMakeLists.txt Cargo.toml Cargo.lock -m "chore: Bump version to $VERSION" +git commit CMakeLists.txt Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump version to $VERSION" # Select all package dependencies that match 'zenoh.*' and bump them to $ZENOH_VERSION zenoh_deps=$(toml get Cargo.toml dependencies | jq -r 'keys.[] | select(test("zenoh.*"))') From 3627c822678e32684af578c7148d992cf2df9ad8 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 15:03:24 +0200 Subject: [PATCH 10/28] fix: Bump Zenoh dependencies in Cargo.toml.in --- ci/scripts/bump.bash | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ci/scripts/bump.bash b/ci/scripts/bump.bash index 6b196021b..e77d3ae1c 100644 --- a/ci/scripts/bump.bash +++ b/ci/scripts/bump.bash @@ -34,14 +34,21 @@ git commit CMakeLists.txt Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump ve # Select all package dependencies that match 'zenoh.*' and bump them to $ZENOH_VERSION zenoh_deps=$(toml get Cargo.toml dependencies | jq -r 'keys.[] | select(test("zenoh.*"))') for dep in $zenoh_deps; do - [[ -n $ZENOH_VERSION ]] && toml_set_in_place Cargo.toml "dependencies.$dep.version" "$ZENOH_VERSION" - [[ -n $ZENOH_BRANCH ]] && toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$ZENOH_BRANCH" + if [[ -n $ZENOH_VERSION ]]; then + toml_set_in_place Cargo.toml "dependencies.$dep.version" "$ZENOH_VERSION" + toml_set_in_place Cargo.toml.in "dependencies.$dep.version" "$ZENOH_VERSION" + fi + + if [[ -n $ZENOH_BRANCH ]]; then + toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$ZENOH_BRANCH" + toml_set_in_place Cargo.toml.in "dependencies.$dep.branch" "$ZENOH_BRANCH" + fi done # Update lockfile cargo check if [[ -n $ZENOH_VERSION || -n $ZENOH_BRANCH ]]; then - git commit Cargo.toml Cargo.lock -m "chore: Bump Zenoh version to $ZENOH_VERSION" + git commit Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump Zenoh version to $ZENOH_VERSION" else echo "info: no changes have been made to Zenoh dependencies" fi From 038edf4ca0678be961eb61cd522fca0d72f56160 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 15:08:14 +0200 Subject: [PATCH 11/28] fix: Simplify project version matching in CMakeLists.txt --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35728830d..58af3aca4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,12 @@ cmake_minimum_required(VERSION 3.16) + +# NOTE(fuzzpixelz): The ci/scripts/bump.bash scripts sets the project version +# using regular expressions on this statement. +set(ZENOHC_VERSION 0.11.0.0) + project( zenohc - VERSION 0.11.0.0 + VERSION ${ZENOHC_VERSION} DESCRIPTION "The C bindings for Zenoh" HOMEPAGE_URL "https://github.com/eclipse-zenoh/zenoh-c" LANGUAGES C From 6400eb6995bf7a9426dc221184497bca81439470 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 17:20:50 +0200 Subject: [PATCH 12/28] feat: Automate Release workflow --- .github/workflows/release.yml | 346 ++++++++++++---------------------- ci/scripts/bump.bash | 59 ++++-- 2 files changed, 164 insertions(+), 241 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40d2cdb45..9451f6465 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,237 +14,135 @@ name: Release on: - release: - types: [published] schedule: - - cron: "0 1 * * 1-5" + - cron: "0 0 * * 1-5" workflow_dispatch: + inputs: + live-run: + type: boolean + description: Live-run + required: false + version: + type: string + description: Release number + required: false + zenoh-version: + type: string + description: Release number of Zenoh + required: false jobs: - checks: - name: Code checks + tag: + name: Branch, Bump & tag runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Rust toolchain - run: rustup component add rustfmt clippy - - - name: Code format check - run: cargo fmt --check - - - name: Clippy check - run: cargo clippy --all-targets --all-features -- --deny warnings - - - name: Environment setup - id: env - shell: bash - run: | - # log some info - gcc --version || true - rustup -V - rustup toolchain list - rustup default - cargo -V - rustc -V - - echo "GITHUB_REF=${GITHUB_REF}" - echo "GITHUB_SHA=${GITHUB_SHA:0:8}" - GIT_BRANCH=`[[ $GITHUB_REF =~ ^refs/heads/.* ]] && echo ${GITHUB_REF/refs\/heads\//} || true` - echo "GIT_BRANCH=${GIT_BRANCH}" - echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_OUTPUT - GIT_TAG=`[[ $GITHUB_REF =~ ^refs/tags/.* ]] && echo ${GITHUB_REF/refs\/tags\//} || true` - echo "GIT_TAG=${GIT_TAG}" - echo "GIT_TAG=${GIT_TAG}" >> $GITHUB_OUTPUT - - ZENOH_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1) - echo "ZENOH_VERSION=${ZENOH_VERSION}" - echo "ZENOH_VERSION=${ZENOH_VERSION}" >> $GITHUB_OUTPUT - if [ -n "${GIT_TAG}" ]; then - IS_RELEASE="true" - echo "IS_RELEASE=${IS_RELEASE}" - echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT - PKG_VERSION=${ZENOH_VERSION} - elif [ -n "${GIT_BRANCH}" ]; then - PKG_VERSION=${GIT_BRANCH}-${GITHUB_SHA:0:8} - else - PKG_VERSION=${ZENOH_VERSION}-${GITHUB_SHA:0:8} - fi - echo "PKG_VERSION=${PKG_VERSION}" - echo "PKG_VERSION=${PKG_VERSION}" >> $GITHUB_OUTPUT outputs: - GIT_BRANCH: ${{ steps.env.outputs.GIT_BRANCH }} - GIT_TAG: ${{ steps.env.outputs.GIT_TAG }} - IS_RELEASE: ${{ steps.env.outputs.IS_RELEASE }} - ZENOH_VERSION: ${{ steps.env.outputs.ZENOH_VERSION }} - PKG_VERSION: ${{ steps.env.outputs.PKG_VERSION }} - - builds: - name: Build for ${{ matrix.job.target }} on ${{ matrix.job.os }} - needs: checks - runs-on: ${{ matrix.job.os }} - strategy: - fail-fast: false - matrix: - job: - - { target: x86_64-unknown-linux-gnu, arch: amd64, os: ubuntu-20.04, build-cmd: "cargo" } - - { target: arm-unknown-linux-gnueabi, arch: armel, os: ubuntu-20.04, build-cmd: "cross" } - - { - target: arm-unknown-linux-gnueabihf, - arch: armhf, - os: ubuntu-20.04, - build-cmd: "cross", - } - - { - target: armv7-unknown-linux-gnueabihf, - arch: armhf, - os: ubuntu-20.04, - build-cmd: "cross", - } - - { target: aarch64-unknown-linux-gnu, arch: arm64, os: ubuntu-20.04, build-cmd: "cross" } - - { target: x86_64-apple-darwin, arch: darwin, os: macos-latest, build-cmd: "cargo" } - - { target: aarch64-apple-darwin, arch: darwin, os: macos-latest, build-cmd: "cargo" } - - { target: x86_64-pc-windows-msvc, arch: win64, os: windows-2019, build-cmd: "cargo" } - - { target: x86_64-pc-windows-gnu, arch: win64, os: windows-2019, build-cmd: "cargo" } - env: - CMAKE_CROSSCOMPILING: ON + version: ${{ steps.create-release-branch.outputs.version }} + branch: ${{ steps.create-release-branch.outputs.branch }} steps: - - name: Checkout source code - uses: actions/checkout@v4 + - id: create-release-branch + uses: eclipse-zenoh/ci/create-release-branch@main with: - fetch-depth: 500 # NOTE: get long history for git-version crate to correctly compute a version - - name: Fetch Git tags # NOTE: workaround for https://github.com/actions/checkout/issues/290 - shell: bash - run: git fetch --tags --force - - name: Install prerequisites - shell: bash - run: | - case ${{ matrix.job.target }} in - *-linux-gnu*) cargo install cargo-deb ;; - esac - - case ${{ matrix.job.target }} in - arm-unknown-linux-gnueabi) - sudo apt-get -y update - sudo apt-get -y install gcc-arm-linux-gnueabi - ;; - arm*-unknown-linux-gnueabihf) - sudo apt-get -y update - sudo apt-get -y install gcc-arm-linux-gnueabihf - ;; - aarch64-unknown-linux-gnu) - sudo apt-get -y update - sudo apt-get -y install gcc-aarch64-linux-gnu - ;; - esac - - cargo install cross --git https://github.com/cross-rs/cross - - - name: Install Rust toolchain - run: | - rustup set profile minimal - rustup target add ${{ matrix.job.target }} - - - name: Build for ${{ matrix.job.target }} target - run: ${{ matrix.job.build-cmd }} build --release --target=${{ matrix.job.target }} --features=logger-autoinit --features=shared-memory + repo: ${{ github.repository }} + live-run: ${{ inputs.live-run }} + version: ${{ inputs.version }} + github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }} - - name: Debian package - libzenohc - if: contains(matrix.job.target, '-linux-gnu') - run: cargo deb --no-build --no-strip --target=${{ matrix.job.target }} --variant=libzenohc - - - name: Debian package - libzenohc-dev - if: contains(matrix.job.target, '-linux-gnu') - run: cargo deb --no-build --no-strip --target=${{ matrix.job.target }} --variant=libzenohc-dev - - - name: Packaging - id: package - shell: bash - run: | - TARGET=${{ matrix.job.target }} - LIB_PKG_NAME="${GITHUB_WORKSPACE}/zenoh-c-${{ needs.checks.outputs.PKG_VERSION }}-${TARGET}.zip" - DEBS_PKG_NAME="${GITHUB_WORKSPACE}/zenoh-c-${{ needs.checks.outputs.PKG_VERSION }}-${TARGET}-deb-pkgs.zip" - - case ${TARGET} in - *linux*) - cd "target/${TARGET}/release/" - echo "Packaging ${LIB_PKG_NAME}:" - mkdir lib && cp libzenohc.so lib/ - zip -r ${LIB_PKG_NAME} lib - cd - - zip -r ${LIB_PKG_NAME} include - echo "LIB_PKG_NAME=${LIB_PKG_NAME}" >> $GITHUB_OUTPUT - - # check if debian packages has been created and packages them in a single tgz - if [[ -d target/${TARGET}/debian ]]; then - cd target/${TARGET}/debian - echo "Packaging ${DEBS_PKG_NAME}:" - zip ${DEBS_PKG_NAME} *.deb - cd - - echo "DEBS_PKG_NAME=${DEBS_PKG_NAME}" >> $GITHUB_OUTPUT - fi - ;; - *apple*) - cd "target/${TARGET}/release/" - echo "Packaging ${LIB_PKG_NAME}:" - mkdir lib && cp libzenohc.dylib lib/ - zip -r ${LIB_PKG_NAME} lib - cd - - zip -r ${LIB_PKG_NAME} include - echo "LIB_PKG_NAME=${LIB_PKG_NAME}" >> $GITHUB_OUTPUT - ;; - *windows*) - cd "target/${TARGET}/release/" - echo "Packaging ${LIB_PKG_NAME}:" - mkdir lib && cp zenohc.dll lib/ - 7z -y -r a "${LIB_PKG_NAME}" lib - cd - - 7z -y -r a "${LIB_PKG_NAME}" include - echo "LIB_PKG_NAME=${LIB_PKG_NAME}" >> $GITHUB_OUTPUT - ;; - esac - - - name: "Upload packages" - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.job.target }} - path: | - ${{ steps.package.outputs.LIB_PKG_NAME }} - ${{ steps.package.outputs.DEBS_PKG_NAME }} - - publication: - name: Publish the release - if: needs.checks.outputs.IS_RELEASE == 'true' - needs: [checks, builds] - runs-on: ubuntu-latest - steps: - - name: Download result of previous builds - uses: actions/download-artifact@v3 - with: - path: ARTIFACTS - - name: Publish as github release - uses: softprops/action-gh-release@v1 - with: - files: ARTIFACTS/*/*.* - - name: Publish to download.eclipse.org/zenoh + - name: Bump and tag project + run: bash ci/scripts/bump-and-tag.bash env: - SSH_TARGET: genie.zenoh@projects-storage.eclipse.org - ECLIPSE_BASE_DIR: /home/data/httpd/download.eclipse.org/zenoh/zenoh-c - shell: bash - run: | - echo "--- setup ssh-agent" - eval "$(ssh-agent -s)" - echo 'echo "${{ secrets.SSH_PASSPHRASE }}"' > ~/.ssh_askpass && chmod +x ~/.ssh_askpass - echo "${{ secrets.SSH_PRIVATE_KEY }}" | tr -d '\r' | DISPLAY=NONE SSH_ASKPASS=~/.ssh_askpass ssh-add - > /dev/null 2>&1 - rm -f ~/.ssh_askpass - echo "--- test ssh:" - ssh -o "StrictHostKeyChecking=no" ${SSH_TARGET} ls -al - echo "---- list artifacts to upload:" - ls -R ARTIFACTS || true - DOWNLOAD_DIR=${ECLIPSE_BASE_DIR}/${{ needs.checks.outputs.ZENOH_VERSION }} - echo "---- copy artifacts into ${DOWNLOAD_DIR}" - ssh -o "StrictHostKeyChecking=no" ${SSH_TARGET} mkdir -p ${DOWNLOAD_DIR} - cd ARTIFACTS - sha256sum */* > sha256sums.txt - scp -o "StrictHostKeyChecking=no" -r * ${SSH_TARGET}:${DOWNLOAD_DIR}/ - echo "---- cleanup identity" - ssh-add -D + REPO: ${{ github.repository }} + VERSION: ${{ steps.create-release-branch.outputs.version }} + BRANCH: ${{ steps.create-release-branch.outputs.branch }} + BUMP_DEPS_VERSION: ${{ inputs.zenoh-version }} + BUMP_DEPS_PATTERN: ${{ inputs.zenoh-version && 'zenoh.*' || '^$' }} + BUMP_DEPS_BRANCH: ${{ inputs.zenoh-version && format('release/{0}', inputs.zenoh-version) || '' }} + GH_TOKEN: ${{ secrets.BOT_TOKEN_WORKFLOW }} + GIT_USER_NAME: eclipse-zenoh-bot + GIT_USER_EMAIL: eclipse-zenoh-bot@users.noreply.github.com + + build-debian: + name: Build Debian packages + needs: tag + uses: eclipse-zenoh/ci/.github/workflows/build-crates-debian.yml@main + with: + repo: ${{ github.repository }} + version: ${{ needs.tag.outputs.version }} + branch: ${{ needs.tag.outputs.branch }} + secrets: inherit + + build-standalone: + name: Build executables and libraries + needs: tag + uses: eclipse-zenoh/ci/.github/workflows/build-crates-standalone.yml@main + with: + repo: ${{ github.repository }} + version: ${{ needs.tag.outputs.version }} + branch: ${{ needs.tag.outputs.branch }} + artifact-patterns: | + ^libzenohc\.(dylib|so)$ + ^zenohc\.dll$ + ^include$ + secrets: inherit + + debian: + name: Publish Debian packages + needs: [tag, build-debian] + uses: eclipse-zenoh/ci/.github/workflows/release-crates-debian.yml@main + with: + no-build: true + live-run: ${{ inputs.live-run || false }} + version: ${{ needs.tag.outputs.version }} + repo: ${{ github.repository }} + branch: ${{ needs.tag.outputs.branch }} + installation-test: false + secrets: inherit + + homebrew: + name: Publish Homebrew formulae + needs: [tag, build-standalone] + uses: eclipse-zenoh/ci/.github/workflows/release-crates-homebrew.yml@main + with: + no-build: true + repo: ${{ github.repository }} + live-run: ${{ inputs.live-run || false }} + version: ${{ needs.tag.outputs.version }} + branch: ${{ needs.tag.outputs.branch }} + artifact-patterns: | + ^libzenohc\.dylib$ + ^include$ + formulae: | + libzenohc + secrets: inherit + + eclipse: + name: Publish artifacts to Eclipse downloads + needs: [tag, build-standalone] + uses: eclipse-zenoh/ci/.github/workflows/release-crates-eclipse.yml@main + with: + no-build: true + live-run: ${{ inputs.live-run || false }} + version: ${{ needs.tag.outputs.version }} + repo: ${{ github.repository }} + branch: ${{ needs.tag.outputs.branch }} + artifact-patterns: | + ^libzenohc\.(dylib|so)$ + ^zenohc\.dll$ + ^include$ + name: zenoh-c + secrets: inherit + + github: + name: Publish artifacts to GitHub Releases + needs: [tag, build-standalone] + uses: eclipse-zenoh/ci/.github/workflows/release-crates-github.yml@main + with: + no-build: true + live-run: ${{ inputs.live-run || false }} + version: ${{ needs.tag.outputs.version }} + repo: ${{ github.repository }} + branch: ${{ needs.tag.outputs.branch }} + artifact-patterns: | + ^libzenohc\.(dylib|so)$ + ^zenohc\.dll$ + ^include$ + secrets: inherit diff --git a/ci/scripts/bump.bash b/ci/scripts/bump.bash index e77d3ae1c..3c3bae3cf 100644 --- a/ci/scripts/bump.bash +++ b/ci/scripts/bump.bash @@ -2,12 +2,24 @@ set -eo pipefail -# Project version +# Repository +readonly REPO +# Release number readonly VERSION -# Zenoh dependencies' version -readonly ZENOH_VERSION -# Zenoh dependencies' git branch -readonly ZENOH_BRANCH +# Release branch +readonly BRANCH +# Dependencies' pattern +readonly BUMP_DEPS_PATTERN +# Dependencies' version +readonly BUMP_DEPS_VERSION +# Dependencies' git branch +readonly BUMP_DEPS_BRANCH +# GitHub token +readonly GH_TOKEN +# Git actor name +readonly GIT_USER_NAME +# Git actor email +readonly GIT_USER_EMAIL cargo +stable install toml-cli @@ -19,6 +31,13 @@ function toml_set_in_place() { mv "$tmp" "$1" } +export GIT_AUTHOR_NAME=$GIT_USER_NAME +export GIT_AUTHOR_EMAIL=$GIT_USER_EMAIL +export GIT_COMMITTER_NAME=$GIT_USER_NAME +export GIT_COMMITTER_EMAIL=$GIT_USER_EMAIL + +git clone --recursive --single-branch --branch "$BRANCH" "https://github.com/$REPO" + # Bump CMake project version sed -i "s;^set(ZENOHC_VERSION .*)$;set(ZENOHC_VERSION $VERSION);" CMakeLists.txt # Propagate version change to Cargo.toml and Cargo.toml.in @@ -31,24 +50,30 @@ toml_set_in_place Cargo.toml.in "package.metadata.deb.variants.libzenohc-dev.dep git commit CMakeLists.txt Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump version to $VERSION" -# Select all package dependencies that match 'zenoh.*' and bump them to $ZENOH_VERSION -zenoh_deps=$(toml get Cargo.toml dependencies | jq -r 'keys.[] | select(test("zenoh.*"))') -for dep in $zenoh_deps; do - if [[ -n $ZENOH_VERSION ]]; then - toml_set_in_place Cargo.toml "dependencies.$dep.version" "$ZENOH_VERSION" - toml_set_in_place Cargo.toml.in "dependencies.$dep.version" "$ZENOH_VERSION" +# Select all package dependencies that match $BUMP_DEPS_PATTERN and bump them to $BUMP_DEPS_VERSION +deps=$(toml get Cargo.toml dependencies | jq -r "keys.[] | select(test(\"$BUMP_DEPS_PATTERN\"))") +for dep in $deps; do + if [[ -n $BUMP_DEPS_VERSION ]]; then + toml_set_in_place Cargo.toml "dependencies.$dep.version" "$BUMP_DEPS_VERSION" + toml_set_in_place Cargo.toml.in "dependencies.$dep.version" "$BUMP_DEPS_VERSION" fi - if [[ -n $ZENOH_BRANCH ]]; then - toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$ZENOH_BRANCH" - toml_set_in_place Cargo.toml.in "dependencies.$dep.branch" "$ZENOH_BRANCH" + if [[ -n $BUMP_DEPS_BRANCH ]]; then + toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$BUMP_DEPS_BRANCH" + toml_set_in_place Cargo.toml.in "dependencies.$dep.branch" "$BUMP_DEPS_BRANCH" fi done # Update lockfile cargo check -if [[ -n $ZENOH_VERSION || -n $ZENOH_BRANCH ]]; then - git commit Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump Zenoh version to $ZENOH_VERSION" +if [[ -n $BUMP_DEPS_VERSION || -n $BUMP_DEPS_BRANCH ]]; then + git commit Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump $BUMP_DEPS_PATTERN + version to $BUMP_DEPS_VERSION" else - echo "info: no changes have been made to Zenoh dependencies" + echo "info: no changes have been made to any dependencies" fi + +git tag "$VERSION" -m "v$VERSION" +git log -10 +git show-ref --tags +git push "https://$GH_TOKEN@github.com/$REPO" "$BRANCH" "$VERSION" From 2680c15e84366766218b628b713d883d741ab3fd Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 18:50:41 +0200 Subject: [PATCH 13/28] fix: Copy include folder into Cargo target directory --- Cargo.lock | 7 +++++++ Cargo.toml | 1 + Cargo.toml.in | 1 + build.rs | 39 +++++++++++++++++++++++++++++++++++++-- 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 644a21aaa..4d1b176cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -731,6 +731,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures" version = "0.3.28" @@ -3019,6 +3025,7 @@ dependencies = [ "chrono", "env_logger 0.10.2", "fs2", + "fs_extra", "futures", "json5", "lazy_static", diff --git a/Cargo.toml b/Cargo.toml index 95867f95f..a654da5db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,6 +60,7 @@ zenoh-ext = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/ze cbindgen = "0.24.3" fs2 = "0.4.3" serde_yaml = "0.9.19" +fs_extra = "1.3.0" [lib] path="src/lib.rs" diff --git a/Cargo.toml.in b/Cargo.toml.in index f434df3a1..be9b3f1b7 100644 --- a/Cargo.toml.in +++ b/Cargo.toml.in @@ -60,6 +60,7 @@ zenoh-ext = { version = "0.11.0-dev", git = "https://github.com/eclipse-zenoh/ze cbindgen = "0.24.3" fs2 = "0.4.3" serde_yaml = "0.9.19" +fs_extra = "1.3.0" [lib] path="@CARGO_PROJECT_DIR@src/lib.rs" diff --git a/build.rs b/build.rs index 17dde1894..66267e883 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,12 @@ use fs2::FileExt; +use std::env; use std::io::{Read, Write}; -use std::{borrow::Cow, collections::HashMap, io::BufWriter, path::Path}; +use std::{ + borrow::Cow, + collections::HashMap, + io::BufWriter, + path::{Path, PathBuf}, +}; const GENERATION_PATH: &str = "include/zenoh-gen.h"; const SPLITGUIDE_PATH: &str = "splitguide.yaml"; @@ -33,10 +39,39 @@ fn main() { split_bindings(&split_guide).unwrap(); text_replace(split_guide.rules.iter().map(|(name, _)| name.as_str())); + fs_extra::copy_items( + &["include"], + cargo_target_dir(), + &fs_extra::dir::CopyOptions::default().overwrite(true), + ) + .expect("include should be copied to CARGO_TARGET_DIR"); + println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-changed=src"); println!("cargo:rerun-if-changed=splitguide.yaml"); - println!("cargo:rerun-if-changed=cbindgen.toml") + println!("cargo:rerun-if-changed=cbindgen.toml"); + println!("cargo:rerun-if-changed=include"); +} + +// See: https://github.com/rust-lang/cargo/issues/9661 +// See: https://github.com/rust-lang/cargo/issues/545 +fn cargo_target_dir() -> PathBuf { + let out_dir = PathBuf::from(env::var("OUT_DIR").expect("OUT_DIR should be set")); + let profile = env::var("PROFILE").expect("PROFILE should be set"); + + let mut target_dir = None; + let mut out_dir_path = out_dir.as_path(); + while let Some(parent) = out_dir_path.parent() { + if parent.ends_with(&profile) { + target_dir = Some(parent); + break; + } + out_dir_path = parent; + } + + target_dir + .expect("OUT_DIR should be a child of a PROFILE directory") + .to_path_buf() } fn configure() { From 644fc000c41870cc35725187867dfc0da5f7466c Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 18:51:26 +0200 Subject: [PATCH 14/28] fix: Use `NOT DEFINED` to check for undefined version tweak --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58af3aca4..cb9000cf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ declare_cache_var(ZENOHC_LIB_STATIC FALSE BOOL "Alias zenohc::lib target to zeno # Setup project version # set(project_version "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") -if(NOT PROJECT_VERSION_TWEAK) +if(NOT DEFINED PROJECT_VERSION_TWEAK) set(project_version "${project_version}") elseif(PROJECT_VERSION_TWEAK EQUAL 0) set(project_version "${project_version}-dev") From fb45c005f6e90c43630c520e9d687651cb40c2cd Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 10 Apr 2024 18:57:59 +0200 Subject: [PATCH 15/28] fix: Set `live-run` default in Release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9451f6465..9c6418b0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: uses: eclipse-zenoh/ci/create-release-branch@main with: repo: ${{ github.repository }} - live-run: ${{ inputs.live-run }} + live-run: ${{ inputs.live-run || false }} version: ${{ inputs.version }} github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }} From 0b5b06b50f4cf0e22046f197bd384e56bed8450a Mon Sep 17 00:00:00 2001 From: eclipse-zenoh-bot <61247838+eclipse-zenoh-bot@users.noreply.github.com> Date: Thu, 11 Apr 2024 02:33:02 +0200 Subject: [PATCH 16/28] build: Sync with eclipse-zenoh/zenoh@15a46a0 from 2024-04-10 (#323) Co-authored-by: eclipse-zenoh-bot --- Cargo.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 644a21aaa..aabca4640 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2953,7 +2953,7 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "zenoh" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-trait", "base64", @@ -3004,7 +3004,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "zenoh-collections", ] @@ -3036,7 +3036,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "log", "serde", @@ -3049,12 +3049,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" [[package]] name = "zenoh-config" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "flume", "json5", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-global-executor", "lazy_static", @@ -3086,7 +3086,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "aes", "hmac", @@ -3099,7 +3099,7 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "bincode", "env_logger 0.11.2", @@ -3121,7 +3121,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "hashbrown 0.14.0", "keyed-set", @@ -3135,7 +3135,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-trait", "zenoh-config", @@ -3153,7 +3153,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-trait", "flume", @@ -3176,7 +3176,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-trait", "base64", @@ -3204,7 +3204,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-trait", "log", @@ -3222,7 +3222,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-trait", "base64", @@ -3250,7 +3250,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-trait", "log", @@ -3271,7 +3271,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-trait", "futures", @@ -3291,7 +3291,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-trait", "futures-util", @@ -3312,7 +3312,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "proc-macro2", "quote", @@ -3323,7 +3323,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "const_format", "libloading", @@ -3339,7 +3339,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "const_format", "rand", @@ -3353,7 +3353,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "anyhow", ] @@ -3361,7 +3361,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "futures", "lazy_static", @@ -3373,7 +3373,7 @@ dependencies = [ [[package]] name = "zenoh-shm" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "log", "serde", @@ -3385,7 +3385,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "event-listener 4.0.0", "futures", @@ -3399,7 +3399,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "futures", "log", @@ -3412,7 +3412,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-trait", "flume", @@ -3445,7 +3445,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#0926dd36bf81cb56729af63ea39c2c4389bfbad4" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" dependencies = [ "async-std", "async-trait", From ad58ab21558c2f1665a7967304a1e4d4ea8cfaf8 Mon Sep 17 00:00:00 2001 From: eclipse-zenoh-bot <61247838+eclipse-zenoh-bot@users.noreply.github.com> Date: Thu, 11 Apr 2024 09:57:20 +0200 Subject: [PATCH 17/28] build: Sync with eclipse-zenoh/zenoh@d594afb from 2024-04-10 (#324) Co-authored-by: eclipse-zenoh-bot --- Cargo.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aabca4640..cd4a64fa1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2953,7 +2953,7 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "zenoh" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-trait", "base64", @@ -3004,7 +3004,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "zenoh-collections", ] @@ -3036,7 +3036,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "log", "serde", @@ -3049,12 +3049,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" [[package]] name = "zenoh-config" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "flume", "json5", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-global-executor", "lazy_static", @@ -3086,7 +3086,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "aes", "hmac", @@ -3099,7 +3099,7 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "bincode", "env_logger 0.11.2", @@ -3121,7 +3121,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "hashbrown 0.14.0", "keyed-set", @@ -3135,7 +3135,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-trait", "zenoh-config", @@ -3153,7 +3153,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-trait", "flume", @@ -3176,7 +3176,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-trait", "base64", @@ -3204,7 +3204,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-trait", "log", @@ -3222,7 +3222,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-trait", "base64", @@ -3250,7 +3250,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-trait", "log", @@ -3271,7 +3271,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-trait", "futures", @@ -3291,7 +3291,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-trait", "futures-util", @@ -3312,7 +3312,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "proc-macro2", "quote", @@ -3323,7 +3323,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "const_format", "libloading", @@ -3339,7 +3339,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "const_format", "rand", @@ -3353,7 +3353,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "anyhow", ] @@ -3361,7 +3361,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "futures", "lazy_static", @@ -3373,7 +3373,7 @@ dependencies = [ [[package]] name = "zenoh-shm" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "log", "serde", @@ -3385,7 +3385,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "event-listener 4.0.0", "futures", @@ -3399,7 +3399,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "futures", "log", @@ -3412,7 +3412,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-trait", "flume", @@ -3445,7 +3445,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#15a46a076358f2cd09b8b75cfc9eb5d9ba1ff476" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" dependencies = [ "async-std", "async-trait", From 8b0c2c47b45c572a9714ec13f6eba07e1e20992c Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 11 Apr 2024 10:32:04 +0200 Subject: [PATCH 18/28] fix: Rename `bump.bash` to `bump-and-tag.bash` --- CMakeLists.txt | 4 ++-- ci/scripts/{bump.bash => bump-and-tag.bash} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename ci/scripts/{bump.bash => bump-and-tag.bash} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb9000cf5..e264ffb1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) -# NOTE(fuzzpixelz): The ci/scripts/bump.bash scripts sets the project version -# using regular expressions on this statement. +# NOTE(fuzzpixelz): The ci/scripts/bump-and-tag.bash script sets the project +# version using regular expressions on this statement. set(ZENOHC_VERSION 0.11.0.0) project( diff --git a/ci/scripts/bump.bash b/ci/scripts/bump-and-tag.bash similarity index 100% rename from ci/scripts/bump.bash rename to ci/scripts/bump-and-tag.bash From 9e3abf3ae6b87b304aa5f0cd5478874c0e756b29 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 11 Apr 2024 11:26:43 +0200 Subject: [PATCH 19/28] feat: Add `version.txt` and infer version in `bump-and-tag.bash` --- .github/workflows/release.yml | 2 +- CMakeLists.txt | 6 ++-- ci/scripts/bump-and-tag.bash | 68 ++++++++++++++++++----------------- docs/conf.py | 3 +- version.txt | 1 + 5 files changed, 41 insertions(+), 39 deletions(-) create mode 100644 version.txt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c6418b0d..0c2972556 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,7 +56,7 @@ jobs: BUMP_DEPS_VERSION: ${{ inputs.zenoh-version }} BUMP_DEPS_PATTERN: ${{ inputs.zenoh-version && 'zenoh.*' || '^$' }} BUMP_DEPS_BRANCH: ${{ inputs.zenoh-version && format('release/{0}', inputs.zenoh-version) || '' }} - GH_TOKEN: ${{ secrets.BOT_TOKEN_WORKFLOW }} + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN_WORKFLOW }} GIT_USER_NAME: eclipse-zenoh-bot GIT_USER_EMAIL: eclipse-zenoh-bot@users.noreply.github.com diff --git a/CMakeLists.txt b/CMakeLists.txt index e264ffb1d..6dd057a0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,10 @@ cmake_minimum_required(VERSION 3.16) -# NOTE(fuzzpixelz): The ci/scripts/bump-and-tag.bash script sets the project -# version using regular expressions on this statement. -set(ZENOHC_VERSION 0.11.0.0) +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/version.txt version) project( zenohc - VERSION ${ZENOHC_VERSION} + VERSION ${version} DESCRIPTION "The C bindings for Zenoh" HOMEPAGE_URL "https://github.com/eclipse-zenoh/zenoh-c" LANGUAGES C diff --git a/ci/scripts/bump-and-tag.bash b/ci/scripts/bump-and-tag.bash index 3c3bae3cf..90d955a34 100644 --- a/ci/scripts/bump-and-tag.bash +++ b/ci/scripts/bump-and-tag.bash @@ -3,23 +3,23 @@ set -eo pipefail # Repository -readonly REPO +readonly repo=${REPO:?input REPO is required} # Release number -readonly VERSION +readonly version=${VERSION:-''} # Release branch -readonly BRANCH +readonly branch=${BRANCH:?input BRANCH is required} # Dependencies' pattern -readonly BUMP_DEPS_PATTERN +readonly bump_deps_pattern=${BUMP_DEPS_PATTERN:-input BUMP_DEPS_PATTERN is required} # Dependencies' version -readonly BUMP_DEPS_VERSION +readonly bump_deps_version=${BUMP_DEPS_VERSION:-''} # Dependencies' git branch -readonly BUMP_DEPS_BRANCH +readonly bump_deps_branch=${BUMP_DEPS_BRANCH:-''} # GitHub token -readonly GH_TOKEN +readonly github_token=${GITHUB_TOKEN:?input GITHUB_TOKEN is required} # Git actor name -readonly GIT_USER_NAME +readonly git_user_name=${GIT_USER_NAME:?input GIT_USER_NAME is required} # Git actor email -readonly GIT_USER_EMAIL +readonly git_user_email=${GIT_USER_EMAIL:?input GIT_USER_EMAIL is required} cargo +stable install toml-cli @@ -31,49 +31,51 @@ function toml_set_in_place() { mv "$tmp" "$1" } -export GIT_AUTHOR_NAME=$GIT_USER_NAME -export GIT_AUTHOR_EMAIL=$GIT_USER_EMAIL -export GIT_COMMITTER_NAME=$GIT_USER_NAME -export GIT_COMMITTER_EMAIL=$GIT_USER_EMAIL +export GIT_AUTHOR_NAME=$git_user_name +export GIT_AUTHOR_EMAIL=$git_user_email +export GIT_COMMITTER_NAME=$git_user_name +export GIT_COMMITTER_EMAIL=$git_user_email -git clone --recursive --single-branch --branch "$BRANCH" "https://github.com/$REPO" +git clone --recursive --single-branch --branch "$branch" "https://github.com/$repo" # Bump CMake project version -sed -i "s;^set(ZENOHC_VERSION .*)$;set(ZENOHC_VERSION $VERSION);" CMakeLists.txt +if [[ "$version" == '' ]]; then + # If no version has been specified, infer it using git-describe + printf '%s' "$(git describe)" > version.txt +else + printf '%s' "$version" > version.txt +fi # Propagate version change to Cargo.toml and Cargo.toml.in cmake . -DZENOHC_BUILD_IN_SOURCE_TREE=TRUE -DCMAKE_BUILD_TYPE=Release -# Update Read the Docs version -sed -i "s;^release = .*$;release = '$VERSION';" docs/conf.py # Update Debian dependency of libzenohc-dev -toml_set_in_place Cargo.toml "package.metadata.deb.variants.libzenohc-dev.depends" "libzenohc (=$VERSION)" -toml_set_in_place Cargo.toml.in "package.metadata.deb.variants.libzenohc-dev.depends" "libzenohc (=$VERSION)" +toml_set_in_place Cargo.toml "package.metadata.deb.variants.libzenohc-dev.depends" "libzenohc (=$version)" +toml_set_in_place Cargo.toml.in "package.metadata.deb.variants.libzenohc-dev.depends" "libzenohc (=$version)" -git commit CMakeLists.txt Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump version to $VERSION" +git commit version.txt Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump version to $version" -# Select all package dependencies that match $BUMP_DEPS_PATTERN and bump them to $BUMP_DEPS_VERSION -deps=$(toml get Cargo.toml dependencies | jq -r "keys.[] | select(test(\"$BUMP_DEPS_PATTERN\"))") +# Select all package dependencies that match $bump_deps_pattern and bump them to $bump_deps_version +deps=$(toml get Cargo.toml dependencies | jq -r "keys.[] | select(test(\"$bump_deps_pattern\"))") for dep in $deps; do - if [[ -n $BUMP_DEPS_VERSION ]]; then - toml_set_in_place Cargo.toml "dependencies.$dep.version" "$BUMP_DEPS_VERSION" - toml_set_in_place Cargo.toml.in "dependencies.$dep.version" "$BUMP_DEPS_VERSION" + if [[ -n $bump_deps_version ]]; then + toml_set_in_place Cargo.toml "dependencies.$dep.version" "$bump_deps_version" + toml_set_in_place Cargo.toml.in "dependencies.$dep.version" "$bump_deps_version" fi - if [[ -n $BUMP_DEPS_BRANCH ]]; then - toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$BUMP_DEPS_BRANCH" - toml_set_in_place Cargo.toml.in "dependencies.$dep.branch" "$BUMP_DEPS_BRANCH" + if [[ -n $bump_deps_branch ]]; then + toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$bump_deps_branch" + toml_set_in_place Cargo.toml.in "dependencies.$dep.branch" "$bump_deps_branch" fi done # Update lockfile cargo check -if [[ -n $BUMP_DEPS_VERSION || -n $BUMP_DEPS_BRANCH ]]; then - git commit Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump $BUMP_DEPS_PATTERN - version to $BUMP_DEPS_VERSION" +if [[ -n $bump_deps_version || -n $bump_deps_branch ]]; then + git commit Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump $bump_deps_pattern version to $bump_deps_version" else echo "info: no changes have been made to any dependencies" fi -git tag "$VERSION" -m "v$VERSION" +git tag "$version" -m "v$version" git log -10 git show-ref --tags -git push "https://$GH_TOKEN@github.com/$REPO" "$BRANCH" "$VERSION" +git push "https://$github_token@github.com/$repo" "$branch" "$version" diff --git a/docs/conf.py b/docs/conf.py index a9ab9a153..0ce6d7d44 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,7 +19,8 @@ project = 'zenoh-c' copyright = '2017, 2022 ZettaScale Technology' author = 'ZettaScale Zenoh team' -release = '0.11.0.0' +with open("../version.txt", "rt") as f: + release = f.read() # -- General configuration --------------------------------------------------- master_doc = 'index' diff --git a/version.txt b/version.txt new file mode 100644 index 000000000..6e5d683f0 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.11.0.0 \ No newline at end of file From 26d37f512d1fabeea52a2961940f0831b2365b59 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 11 Apr 2024 12:26:38 +0200 Subject: [PATCH 20/28] fix: Clone repository using actions/checkout --- .github/workflows/release.yml | 8 +++++--- ci/scripts/bump-and-tag.bash | 11 ++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c2972556..88e6a672f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,16 +47,18 @@ jobs: version: ${{ inputs.version }} github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }} + - name: Checkout this repository + uses: actions/checkout@v4 + with: + ref: ${{ steps.create-release-branch.outputs.branch }} + - name: Bump and tag project run: bash ci/scripts/bump-and-tag.bash env: - REPO: ${{ github.repository }} VERSION: ${{ steps.create-release-branch.outputs.version }} - BRANCH: ${{ steps.create-release-branch.outputs.branch }} BUMP_DEPS_VERSION: ${{ inputs.zenoh-version }} BUMP_DEPS_PATTERN: ${{ inputs.zenoh-version && 'zenoh.*' || '^$' }} BUMP_DEPS_BRANCH: ${{ inputs.zenoh-version && format('release/{0}', inputs.zenoh-version) || '' }} - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN_WORKFLOW }} GIT_USER_NAME: eclipse-zenoh-bot GIT_USER_EMAIL: eclipse-zenoh-bot@users.noreply.github.com diff --git a/ci/scripts/bump-and-tag.bash b/ci/scripts/bump-and-tag.bash index 90d955a34..dcead5bc2 100644 --- a/ci/scripts/bump-and-tag.bash +++ b/ci/scripts/bump-and-tag.bash @@ -2,20 +2,14 @@ set -eo pipefail -# Repository -readonly repo=${REPO:?input REPO is required} # Release number readonly version=${VERSION:-''} -# Release branch -readonly branch=${BRANCH:?input BRANCH is required} # Dependencies' pattern readonly bump_deps_pattern=${BUMP_DEPS_PATTERN:-input BUMP_DEPS_PATTERN is required} # Dependencies' version readonly bump_deps_version=${BUMP_DEPS_VERSION:-''} # Dependencies' git branch readonly bump_deps_branch=${BUMP_DEPS_BRANCH:-''} -# GitHub token -readonly github_token=${GITHUB_TOKEN:?input GITHUB_TOKEN is required} # Git actor name readonly git_user_name=${GIT_USER_NAME:?input GIT_USER_NAME is required} # Git actor email @@ -36,8 +30,6 @@ export GIT_AUTHOR_EMAIL=$git_user_email export GIT_COMMITTER_NAME=$git_user_name export GIT_COMMITTER_EMAIL=$git_user_email -git clone --recursive --single-branch --branch "$branch" "https://github.com/$repo" - # Bump CMake project version if [[ "$version" == '' ]]; then # If no version has been specified, infer it using git-describe @@ -78,4 +70,5 @@ fi git tag "$version" -m "v$version" git log -10 git show-ref --tags -git push "https://$github_token@github.com/$repo" "$branch" "$version" +git push +git push "$version" From c35e9c8f58e77a08c864081b426a3b47b40626e4 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 11 Apr 2024 14:40:41 +0200 Subject: [PATCH 21/28] fix: Add `CMakeFiles` to `.gitignore` --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d7a6cf967..f5b3fbd49 100644 --- a/.gitignore +++ b/.gitignore @@ -70,4 +70,7 @@ dkms.conf .cache # Platform dependent generated files -include/zenoh_configure.h \ No newline at end of file +include/zenoh_configure.h + +# CMake +CMakeFiles/ \ No newline at end of file From 6acb44f91c7e200d6f4f132126d077c1eb19f236 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 11 Apr 2024 14:42:09 +0200 Subject: [PATCH 22/28] fix: Add `debug` and `release` to `.gitignore` --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f5b3fbd49..68a5929e8 100644 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,6 @@ dkms.conf include/zenoh_configure.h # CMake -CMakeFiles/ \ No newline at end of file +CMakeFiles/ +debug/ +release/ \ No newline at end of file From 2b14ccb327813551d8fcfd96fcd812e161a688ac Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 11 Apr 2024 14:49:23 +0200 Subject: [PATCH 23/28] fix: Provide default release number for testing --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88e6a672f..f35a5745c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,11 @@ jobs: with: repo: ${{ github.repository }} live-run: ${{ inputs.live-run || false }} - version: ${{ inputs.version }} + # NOTE(fuzzypixelz): When the version is undefined (e.g. on schedule + # events) we cannot use git-describe as CMake doesn't support it. + # However, we still need some placeholder version to test that the + # version can be reliably bumped. + version: ${{ inputs.version || '0.0.0' }} github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }} - name: Checkout this repository From db7024fa2521f1cad5079548c915669a93ee11ef Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Thu, 11 Apr 2024 15:19:45 +0200 Subject: [PATCH 24/28] fix: Don't bump deps when pattern is undefined --- .github/workflows/release.yml | 2 +- ci/scripts/bump-and-tag.bash | 40 ++++++++++++++++++----------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f35a5745c..5c9349814 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,7 @@ jobs: env: VERSION: ${{ steps.create-release-branch.outputs.version }} BUMP_DEPS_VERSION: ${{ inputs.zenoh-version }} - BUMP_DEPS_PATTERN: ${{ inputs.zenoh-version && 'zenoh.*' || '^$' }} + BUMP_DEPS_PATTERN: ${{ inputs.zenoh-version && 'zenoh.*' || '' }} BUMP_DEPS_BRANCH: ${{ inputs.zenoh-version && format('release/{0}', inputs.zenoh-version) || '' }} GIT_USER_NAME: eclipse-zenoh-bot GIT_USER_EMAIL: eclipse-zenoh-bot@users.noreply.github.com diff --git a/ci/scripts/bump-and-tag.bash b/ci/scripts/bump-and-tag.bash index dcead5bc2..a8aafb00c 100644 --- a/ci/scripts/bump-and-tag.bash +++ b/ci/scripts/bump-and-tag.bash @@ -1,11 +1,11 @@ #!/usr/bin/env bash -set -eo pipefail +set -xeo pipefail # Release number readonly version=${VERSION:-''} # Dependencies' pattern -readonly bump_deps_pattern=${BUMP_DEPS_PATTERN:-input BUMP_DEPS_PATTERN is required} +readonly bump_deps_pattern=${BUMP_DEPS_PATTERN:-''} # Dependencies' version readonly bump_deps_version=${BUMP_DEPS_VERSION:-''} # Dependencies' git branch @@ -46,25 +46,27 @@ toml_set_in_place Cargo.toml.in "package.metadata.deb.variants.libzenohc-dev.dep git commit version.txt Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump version to $version" # Select all package dependencies that match $bump_deps_pattern and bump them to $bump_deps_version -deps=$(toml get Cargo.toml dependencies | jq -r "keys.[] | select(test(\"$bump_deps_pattern\"))") -for dep in $deps; do - if [[ -n $bump_deps_version ]]; then - toml_set_in_place Cargo.toml "dependencies.$dep.version" "$bump_deps_version" - toml_set_in_place Cargo.toml.in "dependencies.$dep.version" "$bump_deps_version" - fi +if [[ "$bump_deps_pattern" != '' ]]; then + deps=$(toml get Cargo.toml dependencies | jq -r "keys.[] | select(test(\"$bump_deps_pattern\"))") + for dep in $deps; do + if [[ -n $bump_deps_version ]]; then + toml_set_in_place Cargo.toml "dependencies.$dep.version" "$bump_deps_version" + toml_set_in_place Cargo.toml.in "dependencies.$dep.version" "$bump_deps_version" + fi - if [[ -n $bump_deps_branch ]]; then - toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$bump_deps_branch" - toml_set_in_place Cargo.toml.in "dependencies.$dep.branch" "$bump_deps_branch" - fi -done -# Update lockfile -cargo check + if [[ -n $bump_deps_branch ]]; then + toml_set_in_place Cargo.toml "dependencies.$dep.branch" "$bump_deps_branch" + toml_set_in_place Cargo.toml.in "dependencies.$dep.branch" "$bump_deps_branch" + fi + done + # Update lockfile + cargo check -if [[ -n $bump_deps_version || -n $bump_deps_branch ]]; then - git commit Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump $bump_deps_pattern version to $bump_deps_version" -else - echo "info: no changes have been made to any dependencies" + if [[ -n $bump_deps_version || -n $bump_deps_branch ]]; then + git commit Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump $bump_deps_pattern version to $bump_deps_version" + else + echo "warn: no changes have been made to any dependencies matching $bump_deps_pattern" + fi fi git tag "$version" -m "v$version" From 258fbd11041aa96196e49239ffc821df7c700840 Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Thu, 11 Apr 2024 18:19:10 +0200 Subject: [PATCH 25/28] fix sizes of zcu_owned_matching_listener_t and z_owned_reply_t --- include/zenoh_commons.h | 9 ++++++++- src/get.rs | 2 +- src/publisher.rs | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/zenoh_commons.h b/include/zenoh_commons.h index 84b125fbe..d24f08b24 100644 --- a/include/zenoh_commons.h +++ b/include/zenoh_commons.h @@ -352,7 +352,7 @@ typedef struct ALIGN(8) z_owned_reply_t { #endif #if defined(TARGET_ARCH_ARM) typedef struct ALIGN(8) z_owned_reply_t { - uint64_t _0[19]; + uint64_t _0[21]; } z_owned_reply_t; #endif /** @@ -936,9 +936,16 @@ typedef struct zcu_owned_closure_matching_status_t { * * To check if `val` is still valid, you may use `z_X_check(&val)` or `z_check(val)` if your compiler supports `_Generic`, which will return `true` if `val` is valid. */ +#if !defined(TARGET_ARCH_ARM) typedef struct ALIGN(8) zcu_owned_matching_listener_t { uint64_t _0[4]; } zcu_owned_matching_listener_t; +#endif +#if defined(TARGET_ARCH_ARM) +typedef struct ALIGN(4) zcu_owned_matching_listener_t { + uint32_t _0[4]; +} zcu_owned_matching_listener_t; +#endif /** * An owned zenoh publication_cache. * diff --git a/src/get.rs b/src/get.rs index f5b3c6590..8e985d99f 100644 --- a/src/get.rs +++ b/src/get.rs @@ -54,7 +54,7 @@ pub struct z_owned_reply_t([u64; 30]); #[cfg(target_arch = "arm")] #[repr(C, align(8))] -pub struct z_owned_reply_t([u64; 19]); +pub struct z_owned_reply_t([u64; 21]); impl_guarded_transmute!(noderefs ReplyInner, z_owned_reply_t); diff --git a/src/publisher.rs b/src/publisher.rs index f49d8cd31..3b0176546 100644 --- a/src/publisher.rs +++ b/src/publisher.rs @@ -384,8 +384,12 @@ pub extern "C" fn z_publisher_keyexpr(publisher: z_publisher_t) -> z_owned_keyex /// After a move, `val` will still exist, but will no longer be valid. The destructors are double-drop-safe, but other functions will still trust that your `val` is valid. /// /// To check if `val` is still valid, you may use `z_X_check(&val)` or `z_check(val)` if your compiler supports `_Generic`, which will return `true` if `val` is valid. +#[cfg(not(target_arch = "arm"))] #[repr(C, align(8))] pub struct zcu_owned_matching_listener_t([u64; 4]); +#[cfg(target_arch = "arm")] +#[repr(C, align(4))] +pub struct zcu_owned_matching_listener_t([u32; 4]); impl_guarded_transmute!(noderefs Option>, From 58a776a9bb3e73e118aa5b992a70369d277b02ff Mon Sep 17 00:00:00 2001 From: eclipse-zenoh-bot <61247838+eclipse-zenoh-bot@users.noreply.github.com> Date: Fri, 12 Apr 2024 02:36:02 +0200 Subject: [PATCH 26/28] build: Sync with eclipse-zenoh/zenoh@580f0b6 from 2024-04-11 (#330) Co-authored-by: eclipse-zenoh-bot --- Cargo.lock | 288 +++++++++++++++++++++++++++++------------------------ 1 file changed, 156 insertions(+), 132 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac02d01d7..1709bb6fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,54 +70,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anstream" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" - -[[package]] -name = "anstyle-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - [[package]] name = "anyhow" version = "1.0.75" @@ -463,12 +415,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - [[package]] name = "concurrent-queue" version = "2.2.0" @@ -604,16 +550,6 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" -[[package]] -name = "env_filter" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" -dependencies = [ - "log", - "regex", -] - [[package]] name = "env_logger" version = "0.10.2" @@ -627,19 +563,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "env_logger" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c012a26a7f605efc424dd53697843a72be7dc86ad2d01f7814337794a12231d" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -1217,6 +1140,15 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "memchr" version = "2.6.3" @@ -1291,6 +1223,16 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint-dig" version = "0.8.4" @@ -1391,6 +1333,12 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "parking" version = "2.1.0" @@ -1690,8 +1638,17 @@ checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.3.8", + "regex-syntax 0.7.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -1702,9 +1659,15 @@ checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.7.5", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.7.5" @@ -2098,6 +2061,15 @@ dependencies = [ "keccak", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shared_memory" version = "0.12.4" @@ -2308,6 +2280,16 @@ dependencies = [ "syn 2.0.33", ] +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -2448,6 +2430,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", ] [[package]] @@ -2578,12 +2603,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - [[package]] name = "uuid" version = "1.4.1" @@ -2617,6 +2636,12 @@ dependencies = [ "unzip-n", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "value-bag" version = "1.4.1" @@ -2959,19 +2984,17 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "zenoh" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "base64", "const_format", - "env_logger 0.11.2", "event-listener 4.0.0", "flume", "form_urlencoded", "futures", "git-version", "lazy_static", - "log", "ordered-float", "paste", "petgraph", @@ -2984,6 +3007,7 @@ dependencies = [ "stop-token", "tokio", "tokio-util", + "tracing", "uhlc", "uuid", "vec_map", @@ -3010,7 +3034,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "zenoh-collections", ] @@ -3023,7 +3047,7 @@ dependencies = [ "async-trait", "cbindgen", "chrono", - "env_logger 0.10.2", + "env_logger", "fs2", "fs_extra", "futures", @@ -3043,10 +3067,10 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ - "log", "serde", + "tracing", "uhlc", "zenoh-buffers", "zenoh-protocol", @@ -3056,21 +3080,21 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" [[package]] name = "zenoh-config" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "flume", "json5", - "log", "num_cpus", "secrecy", "serde", "serde_json", "serde_yaml", + "tracing", "validated_struct", "zenoh-core", "zenoh-protocol", @@ -3081,7 +3105,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-global-executor", "lazy_static", @@ -3093,7 +3117,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "aes", "hmac", @@ -3106,15 +3130,14 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "bincode", - "env_logger 0.11.2", "flume", "futures", - "log", "serde", "tokio", + "tracing", "zenoh", "zenoh-core", "zenoh-macros", @@ -3128,7 +3151,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "hashbrown 0.14.0", "keyed-set", @@ -3142,7 +3165,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "zenoh-config", @@ -3160,17 +3183,17 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "flume", "futures", - "log", "rustls 0.22.2", "rustls-webpki 0.102.2", "serde", "tokio", "tokio-util", + "tracing", "zenoh-buffers", "zenoh-codec", "zenoh-core", @@ -3183,12 +3206,11 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "base64", "futures", - "log", "quinn", "rustls 0.21.7", "rustls-native-certs 0.7.0", @@ -3198,6 +3220,7 @@ dependencies = [ "tokio", "tokio-rustls 0.24.1", "tokio-util", + "tracing", "zenoh-config", "zenoh-core", "zenoh-link-commons", @@ -3211,12 +3234,12 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", - "log", "tokio", "tokio-util", + "tracing", "zenoh-core", "zenoh-link-commons", "zenoh-protocol", @@ -3229,12 +3252,11 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "base64", "futures", - "log", "rustls 0.22.2", "rustls-pemfile 2.0.0", "rustls-pki-types", @@ -3243,6 +3265,7 @@ dependencies = [ "tokio", "tokio-rustls 0.25.0", "tokio-util", + "tracing", "webpki-roots", "zenoh-config", "zenoh-core", @@ -3257,13 +3280,13 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", - "log", "socket2 0.5.6", "tokio", "tokio-util", + "tracing", "zenoh-buffers", "zenoh-collections", "zenoh-core", @@ -3278,14 +3301,14 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "futures", - "log", "nix 0.27.1", "tokio", "tokio-util", + "tracing", "uuid", "zenoh-core", "zenoh-link-commons", @@ -3298,14 +3321,14 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "futures-util", - "log", "tokio", "tokio-tungstenite", "tokio-util", + "tracing", "url", "zenoh-core", "zenoh-link-commons", @@ -3319,7 +3342,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "proc-macro2", "quote", @@ -3330,13 +3353,13 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "const_format", "libloading", - "log", "serde", "serde_json", + "tracing", "zenoh-keyexpr", "zenoh-macros", "zenoh-result", @@ -3346,7 +3369,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "const_format", "rand", @@ -3360,7 +3383,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "anyhow", ] @@ -3368,7 +3391,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "futures", "lazy_static", @@ -3380,11 +3403,11 @@ dependencies = [ [[package]] name = "zenoh-shm" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ - "log", "serde", "shared_memory", + "tracing", "zenoh-buffers", "zenoh-result", ] @@ -3392,7 +3415,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "event-listener 4.0.0", "futures", @@ -3406,12 +3429,12 @@ dependencies = [ [[package]] name = "zenoh-task" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "futures", - "log", "tokio", "tokio-util", + "tracing", "zenoh-core", "zenoh-runtime", ] @@ -3419,11 +3442,10 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-trait", "flume", - "log", "lz4_flex", "paste", "rand", @@ -3433,6 +3455,7 @@ dependencies = [ "sha3", "tokio", "tokio-util", + "tracing", "zenoh-buffers", "zenoh-codec", "zenoh-collections", @@ -3452,7 +3475,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#d594afbc358be0e8379a25ed985a1fcc1e36f2d8" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#580f0b6142338c73d17da28b17986b0094272c6e" dependencies = [ "async-std", "async-trait", @@ -3462,10 +3485,11 @@ dependencies = [ "lazy_static", "libc", "libloading", - "log", "pnet_datalink", "shellexpand", "tokio", + "tracing", + "tracing-subscriber", "winapi", "zenoh-core", "zenoh-result", From b209194f715156af1d5b96d6a8f37da7d34b85a0 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Fri, 12 Apr 2024 10:14:13 +0200 Subject: [PATCH 27/28] fix: Specify git remote when pushing the tag --- ci/scripts/bump-and-tag.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/scripts/bump-and-tag.bash b/ci/scripts/bump-and-tag.bash index a8aafb00c..660400bd3 100644 --- a/ci/scripts/bump-and-tag.bash +++ b/ci/scripts/bump-and-tag.bash @@ -72,5 +72,5 @@ fi git tag "$version" -m "v$version" git log -10 git show-ref --tags -git push -git push "$version" +git push origin +git push origin "$version" From 3c4f8c670c61adda55314576be902c9c1a3a6e36 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Fri, 12 Apr 2024 12:17:03 +0200 Subject: [PATCH 28/28] fix: Require `VERSION`in `bump-and-tag.bash` --- ci/scripts/bump-and-tag.bash | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ci/scripts/bump-and-tag.bash b/ci/scripts/bump-and-tag.bash index 660400bd3..a80dd5563 100644 --- a/ci/scripts/bump-and-tag.bash +++ b/ci/scripts/bump-and-tag.bash @@ -3,7 +3,7 @@ set -xeo pipefail # Release number -readonly version=${VERSION:-''} +readonly version=${VERSION:?input VERSION is required} # Dependencies' pattern readonly bump_deps_pattern=${BUMP_DEPS_PATTERN:-''} # Dependencies' version @@ -31,12 +31,7 @@ export GIT_COMMITTER_NAME=$git_user_name export GIT_COMMITTER_EMAIL=$git_user_email # Bump CMake project version -if [[ "$version" == '' ]]; then - # If no version has been specified, infer it using git-describe - printf '%s' "$(git describe)" > version.txt -else - printf '%s' "$version" > version.txt -fi +printf '%s' "$version" > version.txt # Propagate version change to Cargo.toml and Cargo.toml.in cmake . -DZENOHC_BUILD_IN_SOURCE_TREE=TRUE -DCMAKE_BUILD_TYPE=Release # Update Debian dependency of libzenohc-dev