Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature cleanup #15

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,20 @@ jobs:
override: true
components: rustfmt, clippy

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Cargo Format
working-directory: zenoh-jni
run: cargo fmt --all --check

- name: Clippy Check
working-directory: zenoh-jni
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Cargo Format
- name: Check for feature leaks
working-directory: zenoh-jni
run: cargo fmt --all --check
run: cargo test --no-default-features

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Gradle Test
run: gradle jvmTest --info
65 changes: 41 additions & 24 deletions zenoh-jni/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions zenoh-jni/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ categories = ["network-programming"]
description = "Zenoh: Zero Overhead Pub/sub, Store/Query and Compute."
name = "zenoh_jni"

[features]
default = ["zenoh/default", "zenoh-ext/default"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
android-logd-logger = "0.4.0"
Expand All @@ -33,8 +36,8 @@ clap = "3.2.23"
jni = "0.21.1"
flume = "0.10.14"
uhlc = "0.6.0"
zenoh = { git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "master" }
zenoh-ext = { git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "master" }
zenoh = { git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "master", default-features = false }
zenoh-ext = { git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "master", default-features = false }

[lib]
name = "zenoh_jni"
Expand Down
7 changes: 7 additions & 0 deletions zenoh-jni/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ mod session;
mod subscriber;
mod utils;
mod value;

// Test should be runned with `cargo test --no-default-features`
#[test]
#[cfg(not(feature = "default"))]
fn test_no_default_features() {
assert_eq!(zenoh::FEATURES, concat!(" zenoh/unstable"));
}