From 7d0d7d53a032beaa8fc0ac09e05f516f81ecf283 Mon Sep 17 00:00:00 2001 From: stelzo Date: Sun, 23 Jun 2024 19:05:41 +0200 Subject: [PATCH] rclrs jazzy tests --- .github/workflows/rclrs_jazzy.yml | 21 +++++++++++++++++++ tests/Dockerfile_rclrs_jazzy | 34 +++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/rclrs_jazzy.yml create mode 100644 tests/Dockerfile_rclrs_jazzy diff --git a/.github/workflows/rclrs_jazzy.yml b/.github/workflows/rclrs_jazzy.yml new file mode 100644 index 0000000..ff2082e --- /dev/null +++ b/.github/workflows/rclrs_jazzy.yml @@ -0,0 +1,21 @@ +name: rclrs_jazzy + +on: + push: + branches: + - rclrs + pull_request: + branches: + - rclrs + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + +jobs: + tests_jazzy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: docker build . --file ./rpcl2/tests/Dockerfile_rclrs_jazzy --tag rclrs_jazzy + - run: docker run rclrs_jazzy cargo test --features derive,nalgebra,rayon \ No newline at end of file diff --git a/tests/Dockerfile_rclrs_jazzy b/tests/Dockerfile_rclrs_jazzy new file mode 100644 index 0000000..e8ed49b --- /dev/null +++ b/tests/Dockerfile_rclrs_jazzy @@ -0,0 +1,34 @@ +# syntax=docker/dockerfile:1 +FROM ros:jazzy + +# Update default packages +RUN apt-get update + +# Get Ubuntu packages +RUN apt-get install -y \ + build-essential \ + curl \ + libclang-dev \ + git \ + python3-pip \ + python3-vcstool + +# Get Rust +RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | bash -s -- -y +RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc +RUN . $HOME/.cargo/env && cargo install --debug cargo-ament-build +RUN pip install git+https://github.com/colcon/colcon-cargo.git +RUN pip install git+https://github.com/colcon/colcon-ros-cargo.git + +WORKDIR /ros2_rust_build +RUN git clone https://github.com/ros2-rust/ros2_rust.git src/ros2_rust +RUN vcs import src < src/ros2_rust/ros2_rust_jazzy.repos + +WORKDIR /ros2_rust_build/src/ros_pointcloud2_tests +COPY . . + +WORKDIR /ros2_rust_build +RUN . $HOME/.cargo/env && . /opt/ros/jazzy/setup.sh && colcon build + +RUN chmod +x /ros2_rust_build/src/ros_pointcloud2_tests/rpcl2/tests/rclrs_test.bash +ENTRYPOINT [ "/ros2_rust_build/src/ros_pointcloud2_tests/rpcl2/tests/rclrs_test.bash" ] \ No newline at end of file