Skip to content

Commit

Permalink
Move the compilation of the vsomeip & Zenoh streamers behind feature …
Browse files Browse the repository at this point in the history
…flag.
  • Loading branch information
PLeVasseur committed Nov 12, 2024
1 parent c8c1ce5 commit 1081c28
Show file tree
Hide file tree
Showing 7 changed files with 263 additions and 229 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/bundled-lint-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,18 @@ jobs:
rustup show
rustup component add rustfmt clippy
- name: Build the project
- name: Build the project without Zenoh & vsomeip streamer reference
working-directory: ${{github.workspace}}
run: cargo build
- name: Build the project with Zenoh & vsomeip streamer reference
working-directory: ${{github.workspace}}
run: cargo build --features bundled-vsomeip,zenoh-vsomeip-reference-streamer
- name: cargo fmt
working-directory: ${{github.workspace}}
run: cargo fmt -- --check
- name: cargo clippy
working-directory: ${{github.workspace}}
run: cargo clippy --all-targets -- -W warnings -D warnings
run: cargo clippy --all-targets -- -W warnings -D warnings --features bundled-vsomeip,zenoh-someip-streamer-reference

test:
name: Test
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/unbundled-lint-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,12 @@ jobs:
rustup show
rustup component add rustfmt clippy
- name: Build the project
- name: Build the project without Zenoh & vsomeip streamer reference
working-directory: ${{github.workspace}}
run: cargo build --no-default-features
run: cargo build
- name: Build the project with Zenoh & vsomeip streamer reference
working-directory: ${{github.workspace}}
run: cargo build --features bundled-vsomeip,zenoh-vsomeip-reference-streamer
- name: cargo fmt
working-directory: ${{github.workspace}}
run: cargo fmt -- --check
Expand Down
9 changes: 8 additions & 1 deletion example-streamer-uses/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,19 @@ license.workspace = true

[[bin]]
name = "me_client"
required-features = ["zenoh-vsomeip-reference-streamer"]

[[bin]]
name = "me_publisher"
required-features = ["zenoh-vsomeip-reference-streamer"]

[[bin]]
name = "me_service"
required-features = ["zenoh-vsomeip-reference-streamer"]

[[bin]]
name = "me_subscriber"
required-features = ["zenoh-vsomeip-reference-streamer"]

[[bin]]
name = "ue_client"
Expand All @@ -43,6 +47,9 @@ name = "ue_service"
[[bin]]
name = "ue_subscriber"

[features]
zenoh-vsomeip-reference-streamer = ["up-transport-vsomeip"]

[dependencies]
async-trait = { workspace = true }
chrono = { version = "0.4" }
Expand All @@ -56,5 +63,5 @@ serde = { workspace = true }
tokio = { workspace = true }
up-rust = { workspace = true }
up-transport-zenoh = { version = "0.3.0" }
up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false }
up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false, optional = true }
zenoh = { version = "1.0.0" }
7 changes: 4 additions & 3 deletions up-linux-streamer-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ keywords.workspace = true
license.workspace = true

[features]
default = ["bundled-vsomeip", "dynamic_plugin"]
default = ["dynamic_plugin"]
zenoh-vsomeip-reference-streamer = ["up-transport-vsomeip"]
bundled-vsomeip = ["up-transport-vsomeip/bundled"]
dynamic_plugin = []

Expand All @@ -37,6 +38,7 @@ crate-type = ["cdylib"]
[dependencies]
async-std = { version = "=1.12.0", default-features = false }
const_format = "0.2.30"
env_logger = "0.10.2"
futures = { version = "0.3.25" }
git-version = { version = "0.3.5" }
tracing = { version = "0.1" }
Expand All @@ -45,7 +47,7 @@ serde_json = { version = "1.0.94" }
tokio = { version = "1.35.1", default-features = false }
up-rust = { workspace = true }
up-transport-zenoh = { version = "0.3.0" }
up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false }
up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false, optional = true }
up-streamer = { path = "../up-streamer" }
usubscription-static-file = {path = "../utils/usubscription-static-file"}
zenoh = { version = "1.0.0", features = ["default", "plugins"] }
Expand All @@ -54,4 +56,3 @@ zenoh-plugin-trait = { version = "1.0.0" }
zenoh-result = { version = "1.0.0" }
zenoh-util = { version = "1.0.0" }
zenoh_backend_traits = { version = "1.0.0" }
env_logger = "0.10.2"
Loading

0 comments on commit 1081c28

Please sign in to comment.