diff --git a/.github/workflows/crates_check.sh b/.github/workflows/crates_check.sh index e8ec76cbce..7e9fca4c8c 100755 --- a/.github/workflows/crates_check.sh +++ b/.github/workflows/crates_check.sh @@ -16,6 +16,7 @@ cargo check -p zenoh-link-udp --manifest-path io/zenoh-links/zenoh-link-udp/Carg cargo check -p zenoh-link-tcp --manifest-path io/zenoh-links/zenoh-link-tcp/Cargo.toml && cargo check -p zenoh-link-tls --manifest-path io/zenoh-links/zenoh-link-tls/Cargo.toml && cargo check -p zenoh-link-quic --manifest-path io/zenoh-links/zenoh-link-quic/Cargo.toml && +cargo check -p zenoh-link-unixpipe --manifest-path io/zenoh-links/zenoh-link-unixpipe/Cargo.toml && cargo check -p zenoh-link-unixsock_stream --manifest-path io/zenoh-links/zenoh-link-unixsock_stream/Cargo.toml && cargo check -p zenoh-link-serial --manifest-path io/zenoh-links/zenoh-link-serial/Cargo.toml && cargo check -p zenoh-link-ws --manifest-path io/zenoh-links/zenoh-link-ws/Cargo.toml && diff --git a/.github/workflows/crates_publish.sh b/.github/workflows/crates_publish.sh index 4e8b93b856..3cd1243a61 100755 --- a/.github/workflows/crates_publish.sh +++ b/.github/workflows/crates_publish.sh @@ -1,31 +1,32 @@ cargo login $1 -(cd commons/zenoh-result && cargo publish) -(cd commons/zenoh-core && cargo publish) -(cd commons/zenoh-keyexpr && cargo publish) -(cd commons/zenoh-collections && cargo publish) -(cd commons/zenoh-crypto && cargo publish) -(cd commons/zenoh-buffers && cargo publish) -(cd commons/zenoh-protocol && cargo publish) -(cd commons/zenoh-util && cargo publish) -(cd commons/zenoh-sync && cargo publish) -(cd commons/zenoh-macros && cargo publish) -(cd commons/zenoh-shm && cargo publish) -(cd commons/zenoh-codec && cargo publish) -(cd commons/zenoh-config && cargo publish) -(cd io/zenoh-link-commons && cargo publish) -(cd io/zenoh-links/zenoh-link-udp && cargo publish) -(cd io/zenoh-links/zenoh-link-tcp && cargo publish) -(cd io/zenoh-links/zenoh-link-tls && cargo publish) -(cd io/zenoh-links/zenoh-link-quic && cargo publish) -(cd io/zenoh-links/zenoh-link-unixsock_stream && cargo publish) -(cd io/zenoh-links/zenoh-link-serial && cargo publish) -(cd io/zenoh-links/zenoh-link-ws && cargo publish) -(cd io/zenoh-link && cargo publish) -(cd io/zenoh-transport && cargo publish) -(cd plugins/zenoh-plugin-trait && cargo publish) -(cd zenoh && cargo publish) -(cd zenoh-ext && cargo publish) -(cd zenohd && cargo publish) -(cd plugins/zenoh-plugin-rest && cargo publish) -(cd plugins/zenoh-backend-traits && cargo publish) -(cd plugins/zenoh-plugin-storage-manager && cargo publish) \ No newline at end of file +(cd commons/zenoh-result && cargo publish; cargo clean) +(cd commons/zenoh-core && cargo publish; cargo clean) +(cd commons/zenoh-keyexpr && cargo publish; cargo clean) +(cd commons/zenoh-collections && cargo publish; cargo clean) +(cd commons/zenoh-crypto && cargo publish; cargo clean) +(cd commons/zenoh-buffers && cargo publish; cargo clean) +(cd commons/zenoh-protocol && cargo publish; cargo clean) +(cd commons/zenoh-util && cargo publish; cargo clean) +(cd commons/zenoh-sync && cargo publish; cargo clean) +(cd commons/zenoh-macros && cargo publish; cargo clean) +(cd commons/zenoh-shm && cargo publish; cargo clean) +(cd commons/zenoh-codec && cargo publish; cargo clean) +(cd commons/zenoh-config && cargo publish; cargo clean) +(cd io/zenoh-link-commons && cargo publish; cargo clean) +(cd io/zenoh-links/zenoh-link-udp && cargo publish; cargo clean) +(cd io/zenoh-links/zenoh-link-tcp && cargo publish; cargo clean) +(cd io/zenoh-links/zenoh-link-tls && cargo publish; cargo clean) +(cd io/zenoh-links/zenoh-link-quic && cargo publish; cargo clean) +(cd io/zenoh-links/zenoh-link-unixpipe && cargo publish; cargo clean) +(cd io/zenoh-links/zenoh-link-unixsock_stream && cargo publish; cargo clean) +(cd io/zenoh-links/zenoh-link-serial && cargo publish; cargo clean) +(cd io/zenoh-links/zenoh-link-ws && cargo publish; cargo clean) +(cd io/zenoh-link && cargo publish; cargo clean) +(cd io/zenoh-transport && cargo publish; cargo clean) +(cd plugins/zenoh-plugin-trait && cargo publish; cargo clean) +(cd zenoh && cargo publish; cargo clean) +(cd zenoh-ext && cargo publish; cargo clean) +(cd zenohd && cargo publish; cargo clean) +(cd plugins/zenoh-plugin-rest && cargo publish; cargo clean) +(cd plugins/zenoh-backend-traits && cargo publish; cargo clean) +(cd plugins/zenoh-plugin-storage-manager && cargo publish; cargo clean) \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b3a767ceb..b3e2837a56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,12 +23,27 @@ on: runtests: description: "run tests" type: boolean - dockerhub: - description: "publish to dockerhub" - type: boolean doc: description: "generate doc" type: boolean + build: + description: "build" + type: boolean + publish: + description: "publish" + type: boolean + githubrelease: + description: "publish as github release" + type: boolean + eclipse: + description: "publish to download.eclipse.org/zenoh" + type: boolean + cratesio: + description: "publish to crates.io" + type: boolean + dockerhub: + description: "publish to dockerhub" + type: boolean features: description: "build with specified features (comma separated, no space)" type: string @@ -162,6 +177,7 @@ jobs: builds: name: Build for ${{ matrix.job.target }} on ${{ matrix.job.os }} + if: ${{ !(github.event.inputs.build == 'false') }} needs: checks runs-on: ${{ matrix.job.os }} strategy: @@ -330,7 +346,7 @@ jobs: publication: name: Release publication - if: ${{ needs.checks.outputs.IS_RELEASE == 'true' && !failure() }} + if: ${{ (needs.checks.outputs.IS_RELEASE == 'true' || github.event.inputs.publish == 'true') && !failure() }} needs: [checks, builds, tests, doc] runs-on: ubuntu-latest steps: @@ -339,10 +355,12 @@ jobs: with: path: ARTIFACTS - name: Publish as github release + if: ${{ !(github.event.inputs.githubrelease == 'false') }} uses: softprops/action-gh-release@v1 with: files: ARTIFACTS/*/*.* - name: Publish to download.eclipse.org/zenoh + if: ${{ !(github.event.inputs.eclipse == 'false') }} env: SSH_TARGET: genie.zenoh@projects-storage.eclipse.org ECLIPSE_BASE_DIR: /home/data/httpd/download.eclipse.org/zenoh @@ -367,13 +385,18 @@ jobs: ssh-add -D - uses: actions/checkout@v2 - name: Install Rust toolchain + if: ${{ !(github.event.inputs.cratesio == 'false') }} run: rustup show - name: Check crates + if: ${{ !(github.event.inputs.cratesio == 'false') }} shell: bash run: .github/workflows/crates_check.sh - name: Publish to crates.io + if: ${{ !(github.event.inputs.cratesio == 'false') }} shell: bash - run: .github/workflows/crates_publish.sh ${{ secrets.CRATES_IO_TOKEN }} + run: | + set +x + .github/workflows/crates_publish.sh ${{ secrets.CRATES_IO_TOKEN }} - name: Cancel workflow if fail # thus Docker job be interrupted if: failure() uses: andymckay/cancel-action@0.2 diff --git a/Cargo.lock b/Cargo.lock index e945a9e637..5366b3d307 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5003,7 +5003,6 @@ dependencies = [ "zenoh-result", "zenoh-shm", "zenoh-sync", - "zenoh-transport", "zenoh-util", ] diff --git a/Cargo.toml b/Cargo.toml index bbc55a6c7e..b28bb8ad05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -173,7 +173,7 @@ zenoh-collections = { version = "0.10.0-dev", path = "commons/zenoh-collections" zenoh-macros = { version = "0.10.0-dev", path = "commons/zenoh-macros" } zenoh-plugin-trait = { version = "0.10.0-dev", path = "plugins/zenoh-plugin-trait", default-features = false } zenoh_backend_traits = { version = "0.10.0-dev", path = "plugins/zenoh-backend-traits" } -zenoh-transport = { version = "0.10.0-dev", path = "io/zenoh-transport" } +zenoh-transport = { version = "0.10.0-dev", path = "io/zenoh-transport", default-features = false } zenoh-link-tls = { version = "0.10.0-dev", path = "io/zenoh-links/zenoh-link-tls" } zenoh-link-tcp = { version = "0.10.0-dev", path = "io/zenoh-links/zenoh-link-tcp" } zenoh-link-unixsock_stream = { version = "0.10.0-dev", path = "io/zenoh-links/zenoh-link-unixsock_stream" } diff --git a/DEFAULT_CONFIG.json5 b/DEFAULT_CONFIG.json5 index 2a0af258cd..dae3ebc9aa 100644 --- a/DEFAULT_CONFIG.json5 +++ b/DEFAULT_CONFIG.json5 @@ -125,7 +125,7 @@ max_sessions: 1000, /// Maximum number of incoming links that are admitted per session max_links: 1, - /// Enables the LowLatency transport. WARNING: This option is still experimental! + /// Enables the LowLatency transport /// This option does not make LowLatency transport mandatory, the actual implementation of transport /// used will depend on Establish procedure and other party's settings /// diff --git a/io/zenoh-links/zenoh-link-unixpipe/Cargo.toml b/io/zenoh-links/zenoh-link-unixpipe/Cargo.toml index 112e9705a6..51e746a2d3 100644 --- a/io/zenoh-links/zenoh-link-unixpipe/Cargo.toml +++ b/io/zenoh-links/zenoh-link-unixpipe/Cargo.toml @@ -32,7 +32,7 @@ async-std = { workspace = true } async-trait = { workspace = true } async-io = ">= 1.13.0" log = { workspace = true } -rand = { workspace = true } +rand = { workspace = true, features = ["default"] } zenoh-buffers = { workspace = true } zenoh-core = { workspace = true } zenoh-config = { workspace = true } diff --git a/io/zenoh-transport/Cargo.toml b/io/zenoh-transport/Cargo.toml index 77f6b18db3..0921f4e1ee 100644 --- a/io/zenoh-transport/Cargo.toml +++ b/io/zenoh-transport/Cargo.toml @@ -46,6 +46,7 @@ transport_unixpipe = ["zenoh-link/transport_unixpipe"] stats = ["zenoh-protocol/stats"] test = [] unstable = [] +default = ["test", "transport_multilink"] [dependencies] async-executor = { workspace = true } @@ -78,5 +79,3 @@ zenoh-util = { workspace = true } env_logger = { workspace = true } panic-message = { workspace = true } zenoh-protocol = { workspace = true, features = ["test"] } -zenoh-transport = { workspace = true, features = ["test", "transport_multilink"] } -