diff --git a/.github/workflows/create_docker_image.yml b/.github/workflows/create_docker_image.yml new file mode 100644 index 0000000..652e6ea --- /dev/null +++ b/.github/workflows/create_docker_image.yml @@ -0,0 +1,34 @@ +name: Create Docker Image + +on: [push, pull_request, workflow_dispatch] + +jobs: + build_and_push_docker_image: + name: build + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/CihatAltiparmak/moveit_middleware_benchmark + flavor: latest=true + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/run_benchmarks.yml b/.github/workflows/run_benchmarks.yml new file mode 100644 index 0000000..9f87da6 --- /dev/null +++ b/.github/workflows/run_benchmarks.yml @@ -0,0 +1,36 @@ +name: Run MoveIt Middleware Benchmarks and Push Results + +on: [push] + +jobs: + run_middleware_benchmarks: + name: run_benchmarks + runs-on: ubuntu-latest + permissions: + contents: write + deployments: write + container: + image: ghcr.io/cihataltiparmak/moveit_middleware_benchmark:latest + steps: + - name: run perception benchmark + run: | + cd /ws + . /opt/ros/rolling/setup.sh + . install/setup.sh + ros2 launch moveit_middleware_benchmark scenario_perception_pipeline_benchmark.launch.py + - name: clone repo + uses: actions/checkout@v3 + - name: add to safe directory + run: | + git config --global --add safe.directory /__w/moveit_middleware_benchmark/moveit_middleware_benchmark + - name: push perception benchmark results to github pages + uses: benchmark-action/github-action-benchmark@v1 + with: + name: Movet Middleware Benchmark Project Perception Pipeline Benchmark + tool: 'googlecpp' + output-file-path: /ws/middleware_benchmark_results.json + # Access token to deploy GitHub Pages branch + github-token: ${{ secrets.GITHUB_TOKEN }} + # Push and deploy GitHub pages branch automatically + auto-push: true + gh-pages-branch: "gh-pages" diff --git a/.github/workflows/test_moveit_middleware_benchmark_action.yml b/.github/workflows/test_moveit_middleware_benchmark_action.yml new file mode 100644 index 0000000..b152d3f --- /dev/null +++ b/.github/workflows/test_moveit_middleware_benchmark_action.yml @@ -0,0 +1,11 @@ +name: MoveIt Middleware Benchmark Github Action Test + +on: [push, pull_request, workflow_dispatch] + +jobs: + moveit_middleware_benchmark_github_action_test: + name: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ./ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ff7281a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM ros:rolling + +RUN apt-get update && \ + apt install wget -y + +RUN mkdir ws/src -p + +RUN . /opt/ros/rolling/setup.sh && \ + cd ws/src && \ + git clone https://github.com/CihatAltiparmak/moveit_middleware_benchmark.git -b development && \ + vcs import < moveit_middleware_benchmark/moveit_middleware_benchmark.repos --recursive + +RUN cd ws/src && \ + # git clone https://github.com/ros2/rmw_zenoh.git && \ + git clone https://github.com/ros2/rmw_cyclonedds.git + +RUN . /opt/ros/rolling/setup.sh && \ + cd ws && \ + rosdep update --rosdistro=$ROS_DISTRO && \ + apt-get update && \ + rosdep install --from-paths src --ignore-src -r -y + +RUN . /opt/ros/rolling/setup.sh && \ + cd ws && \ + colcon build --mixin release --packages-skip test_dynmsg dynmsg_demo diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..e5a4c57 --- /dev/null +++ b/action.yml @@ -0,0 +1,6 @@ +name: 'MoveIt Middleware Benchmarks' +description: 'Github Action for Middleware Benchmark Tool of MoveIt2' + +runs: + using: 'docker' + image: 'Dockerfile'