Skip to content

Commit 1081c28

Browse files
committed
Move the compilation of the vsomeip & Zenoh streamers behind feature flag.
1 parent c8c1ce5 commit 1081c28

File tree

7 files changed

+263
-229
lines changed

7 files changed

+263
-229
lines changed

.github/workflows/bundled-lint-and-test.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,18 @@ jobs:
6363
rustup show
6464
rustup component add rustfmt clippy
6565
66-
- name: Build the project
66+
- name: Build the project without Zenoh & vsomeip streamer reference
6767
working-directory: ${{github.workspace}}
6868
run: cargo build
69+
- name: Build the project with Zenoh & vsomeip streamer reference
70+
working-directory: ${{github.workspace}}
71+
run: cargo build --features bundled-vsomeip,zenoh-vsomeip-reference-streamer
6972
- name: cargo fmt
7073
working-directory: ${{github.workspace}}
7174
run: cargo fmt -- --check
7275
- name: cargo clippy
7376
working-directory: ${{github.workspace}}
74-
run: cargo clippy --all-targets -- -W warnings -D warnings
77+
run: cargo clippy --all-targets -- -W warnings -D warnings --features bundled-vsomeip,zenoh-someip-streamer-reference
7578

7679
test:
7780
name: Test

.github/workflows/unbundled-lint-and-test.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,12 @@ jobs:
160160
rustup show
161161
rustup component add rustfmt clippy
162162
163-
- name: Build the project
163+
- name: Build the project without Zenoh & vsomeip streamer reference
164164
working-directory: ${{github.workspace}}
165-
run: cargo build --no-default-features
165+
run: cargo build
166+
- name: Build the project with Zenoh & vsomeip streamer reference
167+
working-directory: ${{github.workspace}}
168+
run: cargo build --features bundled-vsomeip,zenoh-vsomeip-reference-streamer
166169
- name: cargo fmt
167170
working-directory: ${{github.workspace}}
168171
run: cargo fmt -- --check

example-streamer-uses/Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,19 @@ license.workspace = true
2121

2222
[[bin]]
2323
name = "me_client"
24+
required-features = ["zenoh-vsomeip-reference-streamer"]
2425

2526
[[bin]]
2627
name = "me_publisher"
28+
required-features = ["zenoh-vsomeip-reference-streamer"]
2729

2830
[[bin]]
2931
name = "me_service"
32+
required-features = ["zenoh-vsomeip-reference-streamer"]
3033

3134
[[bin]]
3235
name = "me_subscriber"
36+
required-features = ["zenoh-vsomeip-reference-streamer"]
3337

3438
[[bin]]
3539
name = "ue_client"
@@ -43,6 +47,9 @@ name = "ue_service"
4347
[[bin]]
4448
name = "ue_subscriber"
4549

50+
[features]
51+
zenoh-vsomeip-reference-streamer = ["up-transport-vsomeip"]
52+
4653
[dependencies]
4754
async-trait = { workspace = true }
4855
chrono = { version = "0.4" }
@@ -56,5 +63,5 @@ serde = { workspace = true }
5663
tokio = { workspace = true }
5764
up-rust = { workspace = true }
5865
up-transport-zenoh = { version = "0.3.0" }
59-
up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false }
66+
up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false, optional = true }
6067
zenoh = { version = "1.0.0" }

up-linux-streamer-plugin/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ keywords.workspace = true
2020
license.workspace = true
2121

2222
[features]
23-
default = ["bundled-vsomeip", "dynamic_plugin"]
23+
default = ["dynamic_plugin"]
24+
zenoh-vsomeip-reference-streamer = ["up-transport-vsomeip"]
2425
bundled-vsomeip = ["up-transport-vsomeip/bundled"]
2526
dynamic_plugin = []
2627

@@ -37,6 +38,7 @@ crate-type = ["cdylib"]
3738
[dependencies]
3839
async-std = { version = "=1.12.0", default-features = false }
3940
const_format = "0.2.30"
41+
env_logger = "0.10.2"
4042
futures = { version = "0.3.25" }
4143
git-version = { version = "0.3.5" }
4244
tracing = { version = "0.1" }
@@ -45,7 +47,7 @@ serde_json = { version = "1.0.94" }
4547
tokio = { version = "1.35.1", default-features = false }
4648
up-rust = { workspace = true }
4749
up-transport-zenoh = { version = "0.3.0" }
48-
up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false }
50+
up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false, optional = true }
4951
up-streamer = { path = "../up-streamer" }
5052
usubscription-static-file = {path = "../utils/usubscription-static-file"}
5153
zenoh = { version = "1.0.0", features = ["default", "plugins"] }
@@ -54,4 +56,3 @@ zenoh-plugin-trait = { version = "1.0.0" }
5456
zenoh-result = { version = "1.0.0" }
5557
zenoh-util = { version = "1.0.0" }
5658
zenoh_backend_traits = { version = "1.0.0" }
57-
env_logger = "0.10.2"

0 commit comments

Comments
 (0)