Skip to content

Commit

Permalink
jazzy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Sieh committed Jun 22, 2024
1 parent a295a36 commit 60b901d
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/r2r_jazzy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: r2r_jazzy

on:
push:
branches-ignore:
- rclrs
pull_request:
branches-ignore:
- 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_r2r_jazzy --tag r2r_jazzy
- run: docker run r2r_jazzy cargo test --features r2r_msg,derive,nalgebra,rayon
21 changes: 21 additions & 0 deletions .github/workflows/rclrs_jazzy.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions rpcl2/tests/Dockerfile_r2r_jazzy
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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

# Get ros test messages
RUN apt-get install -y ros-jazzy-test-msgs ros-jazzy-example-interfaces

# Get Rust
RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc

COPY . /r2r
RUN chmod +x /r2r/rpcl2/tests/r2r_test.bash
ENTRYPOINT [ "/r2r/rpcl2/tests/r2r_test.bash" ]
34 changes: 34 additions & 0 deletions rpcl2/tests/Dockerfile_rclrs_jazzy
Original file line number Diff line number Diff line change
@@ -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" ]

0 comments on commit 60b901d

Please sign in to comment.