Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/custom GitHub actions #6

Merged
merged 8 commits into from
Jul 24, 2024
34 changes: 34 additions & 0 deletions .github/workflows/create_docker_image.yml
Original file line number Diff line number Diff line change
@@ -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 }}
36 changes: 36 additions & 0 deletions .github/workflows/run_benchmarks.yml
Original file line number Diff line number Diff line change
@@ -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"
11 changes: 11 additions & 0 deletions .github/workflows/test_moveit_middleware_benchmark_action.yml
Original file line number Diff line number Diff line change
@@ -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: ./
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: 'MoveIt Middleware Benchmarks'
description: 'Github Action for Middleware Benchmark Tool of MoveIt2'

runs:
using: 'docker'
image: 'Dockerfile'
Loading