cfg dep detection
This commit is contained in:
parent
67a5879ad2
commit
3437f26c94
|
|
@ -18,4 +18,4 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: docker build . --file ./rpcl2/tests/Dockerfile_r2r_galactic --tag r2r_galactic
|
- run: docker build . --file ./rpcl2/tests/Dockerfile_r2r_galactic --tag r2r_galactic
|
||||||
- run: docker run r2r_galactic cargo test --features r2r_msg,derive,nalgebra,rayon
|
- run: docker run r2r_galactic cargo test
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,4 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: docker build . --file ./rpcl2/tests/Dockerfile_r2r_humble --tag r2r_humble
|
- run: docker build . --file ./rpcl2/tests/Dockerfile_r2r_humble --tag r2r_humble
|
||||||
- run: docker run r2r_humble cargo test --features r2r_msg,derive,nalgebra,rayon
|
- run: docker run r2r_humble cargo test
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,4 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: docker build . --file ./rpcl2/tests/Dockerfile_r2r_iron --tag r2r_iron
|
- run: docker build . --file ./rpcl2/tests/Dockerfile_r2r_iron --tag r2r_iron
|
||||||
- run: docker run r2r_iron cargo test --features r2r_msg,derive,nalgebra,rayon
|
- run: docker run r2r_iron cargo test
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,4 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: docker build . --file ./rpcl2/tests/Dockerfile_rclrs_humble --tag rclrs_humble
|
- run: docker build . --file ./rpcl2/tests/Dockerfile_rclrs_humble --tag rclrs_humble
|
||||||
- run: docker run rclrs_humble cargo test --features derive,nalgebra,rayon
|
- run: docker run rclrs_humble cargo test
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,4 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: docker build . --file ./rpcl2/tests/Dockerfile_rclrs_iron --tag rclrs_iron
|
- run: docker build . --file ./rpcl2/tests/Dockerfile_rclrs_iron --tag rclrs_iron
|
||||||
- run: docker run rclrs_iron cargo test --features derive,nalgebra,rayon
|
- run: docker run rclrs_iron cargo test
|
||||||
|
|
|
||||||
|
|
@ -105,4 +105,4 @@ jobs:
|
||||||
- name: test
|
- name: test
|
||||||
run: |
|
run: |
|
||||||
source /opt/ros/$ROS_DISTRO/setup.bash
|
source /opt/ros/$ROS_DISTRO/setup.bash
|
||||||
cargo test --features rosrust_msg,derive,nalgebra,rayon
|
cargo test
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,6 @@ exclude = [
|
||||||
rust-version = "1.63"
|
rust-version = "1.63"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rosrust_msg = { version = "0.1", optional = true }
|
|
||||||
rosrust = { version = "0.9.11", optional = true }
|
|
||||||
r2r = { version = "0.9.0", optional = true }
|
|
||||||
rayon = { version = "1", optional = true }
|
rayon = { version = "1", optional = true }
|
||||||
nalgebra = { version = "0.32.5", optional = true, default-features = false }
|
nalgebra = { version = "0.32.5", optional = true, default-features = false }
|
||||||
rpcl2-derive = { version = "0.2.0", optional = true, path = "../rpcl2-derive" }
|
rpcl2-derive = { version = "0.2.0", optional = true, path = "../rpcl2-derive" }
|
||||||
|
|
@ -49,8 +46,6 @@ harness = false
|
||||||
path = "benches/roundtrip.rs"
|
path = "benches/roundtrip.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
rosrust_msg = ["dep:rosrust_msg", "dep:rosrust"]
|
|
||||||
r2r_msg = ["dep:r2r"]
|
|
||||||
rayon = ["dep:rayon"]
|
rayon = ["dep:rayon"]
|
||||||
derive = ["dep:rpcl2-derive", "dep:memoffset"]
|
derive = ["dep:rpcl2-derive", "dep:memoffset"]
|
||||||
nalgebra = ["dep:nalgebra"]
|
nalgebra = ["dep:nalgebra"]
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ pub struct TimeMsg {
|
||||||
pub nanosec: u32,
|
pub nanosec: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "rosrust_msg")]
|
#[cfg(rosrust)]
|
||||||
impl From<rosrust::Time> for TimeMsg {
|
impl From<rosrust::Time> for TimeMsg {
|
||||||
fn from(time: rosrust::Time) -> Self {
|
fn from(time: rosrust::Time) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|
@ -70,7 +70,7 @@ impl Default for PointFieldMsg {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "r2r_msg")]
|
#[cfg(r2r)]
|
||||||
impl From<r2r::sensor_msgs::msg::PointCloud2> for crate::PointCloud2Msg {
|
impl From<r2r::sensor_msgs::msg::PointCloud2> for crate::PointCloud2Msg {
|
||||||
fn from(msg: r2r::sensor_msgs::msg::PointCloud2) -> Self {
|
fn from(msg: r2r::sensor_msgs::msg::PointCloud2) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|
@ -113,7 +113,7 @@ impl From<r2r::sensor_msgs::msg::PointCloud2> for crate::PointCloud2Msg {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "r2r_msg")]
|
#[cfg(r2r)]
|
||||||
impl From<crate::PointCloud2Msg> for r2r::sensor_msgs::msg::PointCloud2 {
|
impl From<crate::PointCloud2Msg> for r2r::sensor_msgs::msg::PointCloud2 {
|
||||||
fn from(msg: crate::PointCloud2Msg) -> Self {
|
fn from(msg: crate::PointCloud2Msg) -> Self {
|
||||||
r2r::sensor_msgs::msg::PointCloud2 {
|
r2r::sensor_msgs::msg::PointCloud2 {
|
||||||
|
|
@ -151,7 +151,7 @@ impl From<crate::PointCloud2Msg> for r2r::sensor_msgs::msg::PointCloud2 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "rosrust_msg")]
|
#[cfg(rosrust)]
|
||||||
impl From<rosrust_msg::sensor_msgs::PointCloud2> for crate::PointCloud2Msg {
|
impl From<rosrust_msg::sensor_msgs::PointCloud2> for crate::PointCloud2Msg {
|
||||||
fn from(msg: rosrust_msg::sensor_msgs::PointCloud2) -> Self {
|
fn from(msg: rosrust_msg::sensor_msgs::PointCloud2) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|
@ -194,7 +194,7 @@ impl From<rosrust_msg::sensor_msgs::PointCloud2> for crate::PointCloud2Msg {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "rosrust_msg")]
|
#[cfg(rosrust)]
|
||||||
impl From<crate::PointCloud2Msg> for rosrust_msg::sensor_msgs::PointCloud2 {
|
impl From<crate::PointCloud2Msg> for rosrust_msg::sensor_msgs::PointCloud2 {
|
||||||
fn from(msg: crate::PointCloud2Msg) -> Self {
|
fn from(msg: crate::PointCloud2Msg) -> Self {
|
||||||
rosrust_msg::sensor_msgs::PointCloud2 {
|
rosrust_msg::sensor_msgs::PointCloud2 {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#[cfg(feature = "r2r_msg")]
|
#[cfg(r2r)]
|
||||||
#[test]
|
#[test]
|
||||||
fn convertxyz_r2r_msg() {
|
fn convertxyz_r2r_msg() {
|
||||||
use ros_pointcloud2::{points::PointXYZ, PointCloud2Msg};
|
use ros_pointcloud2::{points::PointXYZ, PointCloud2Msg};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#[cfg(feature = "rosrust_msg")]
|
#[cfg(rosrust)]
|
||||||
#[test]
|
#[test]
|
||||||
fn convertxyz_rosrust_msg() {
|
fn convertxyz_rosrust_msg() {
|
||||||
use ros_pointcloud2::{points::PointXYZ, PointCloud2Msg};
|
use ros_pointcloud2::{points::PointXYZ, PointCloud2Msg};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue