Skip to content

Commit

Permalink
Move CI to an independent crate.
Browse files Browse the repository at this point in the history
Signed-off-by: ChenYing Kuo <[email protected]>
  • Loading branch information
evshary committed Dec 12, 2024
1 parent 443dd97 commit ad0fb3b
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 193 deletions.
78 changes: 39 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,45 +63,45 @@ jobs:
- name: Run tests
run: cargo test --verbose

# system_tests_with_ros2_humble:
# name: System tests with ROS 2 Humble
# runs-on: ubuntu-latest
# container:
# image: rostooling/setup-ros-docker:ubuntu-jammy-ros-humble-ros-base-latest
# steps:
# - uses: ros-tooling/[email protected]
# with:
# required-ros-distributions: humble

# - uses: actions/checkout@v4
# - uses: actions-rust-lang/setup-rust-toolchain@v1

# - name: Install ACL
# run: sudo apt-get -y install libacl1-dev

# - name: Run ROS tests (enable feature ros_test)
# shell: bash
# run: "source /opt/ros/humble/setup.bash && cargo test --features ros_test --verbose"

# system_tests_with_ros2_jazzy:
# name: System tests with ROS 2 Jazzy
# runs-on: ubuntu-latest
# container:
# image: rostooling/setup-ros-docker:ubuntu-noble-ros-jazzy-ros-base-latest
# steps:
# - uses: ros-tooling/[email protected]
# with:
# required-ros-distributions: jazzy

# - uses: actions/checkout@v4
# - uses: actions-rust-lang/setup-rust-toolchain@v1

# - name: Install ACL
# run: sudo apt-get -y install libacl1-dev

# - name: Run ROS tests (enable feature ros_test)
# shell: bash
# run: "source /opt/ros/jazzy/setup.bash && cargo test --features ros_test --verbose"
system_tests_with_ros2_humble:
name: System tests with ROS 2 Humble
runs-on: ubuntu-latest
container:
image: rostooling/setup-ros-docker:ubuntu-jammy-ros-humble-ros-base-latest
steps:
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: humble

- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install ACL
run: sudo apt-get -y install libacl1-dev

- name: Run ROS tests
shell: bash
run: "source /opt/ros/humble/setup.bash && cd zenoh-test-ros2dds && cargo test --verbose"

system_tests_with_ros2_jazzy:
name: System tests with ROS 2 Jazzy
runs-on: ubuntu-latest
container:
image: rostooling/setup-ros-docker:ubuntu-noble-ros-jazzy-ros-base-latest
steps:
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: jazzy

- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install ACL
run: sudo apt-get -y install libacl1-dev

- name: Run ROS tests
shell: bash
run: "source /opt/ros/jazzy/setup.bash && cd zenoh-test-ros2dds && cargo test --verbose"

# NOTE: In GitHub repository settings, the "Require status checks to pass
# before merging" branch protection rule ensures that commits are only merged
Expand Down
5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ zenoh-plugin-rest = { version = "1.0.0-dev", git = "https://github.com/eclipse-z
] }
zenoh-plugin-trait = { version = "1.0.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", default-features = false }

# r2r is for tests only. See in in zenoh-plugins-ros2dds/Cargo.toml
# TODO: The ros_test should be re-enabled as soon the r2r dependency is removed from the build of zenoh-plugin-ros2dds
# r2r = "0.9"


[profile.release]
codegen-units = 1
debug = false
Expand Down
9 changes: 0 additions & 9 deletions zenoh-plugin-ros2dds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ stats = ["zenoh/stats"]
dynamic_plugin = []
dds_shm = ["cyclors/iceoryx"]

# TODO: The ros_test should be re-enabled as soon the r2r dependency is removed from the build of zenoh-plugin-ros2dds
# ros_test = ["r2r"]

[dependencies]
async-trait = { workspace = true }
bincode = { workspace = true }
Expand All @@ -57,12 +54,6 @@ zenoh-config = { workspace = true }
zenoh-ext = { workspace = true }
zenoh-plugin-trait = { workspace = true }

# r2r is for tests only. It has to be optional because its building requires a full ROS 2 environement
# However "optional" is not supported for "dev-dependencies".
# Hence it's declared as a dependency but active only with "ros_test" feature
# r2r = { workspace = true, optional = true }


[build-dependencies]
rustc_version = { workspace = true }

Expand Down
140 changes: 0 additions & 140 deletions zenoh-plugin-ros2dds/tests/test.rs

This file was deleted.

33 changes: 33 additions & 0 deletions zenoh-test-ros2dds/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright (c) 2024 ZettaScale Technology
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# ZettaScale Zenoh Team, <[email protected]>
#
[package]
name = "zenoh-test-ros2dds"
edition = "2021"

[dependencies]
cdr = "0.2.4"
futures = "0.3.26"
r2r = "0.9"
serde = "1.0.154"
serde_json = "1.0.114"
tokio = { version = "1.35.1", default-features = false } # Default features are disabled due to some crates' requirements
zenoh = { version = "1.0.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", features = [
"plugins",
"unstable",
] }
zenoh-config = { version = "1.0.0-dev", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", default-features = false }
zenoh-plugin-ros2dds = { version = "1.0.0-dev", path = "../zenoh-plugin-ros2dds/", default-features = false }

# We need an empty workspace to avoid being viewed as a part of zenoh-plugin-ros2dds
[workspace]
Loading

0 comments on commit ad0fb3b

Please sign in to comment.