diff --git a/.github/actions/lint/Dockerfile b/.github/actions/lint/Dockerfile new file mode 100644 index 000000000..539ea3471 --- /dev/null +++ b/.github/actions/lint/Dockerfile @@ -0,0 +1,16 @@ +FROM ros:humble + +# Install ament linting tools +RUN apt-get update && apt-get install -y \ + ros-humble-ament-lint \ + ros-humble-ament-cppcheck \ + ros-humble-ament-uncrustify \ + ros-humble-ament-lint-cmake \ + ros-humble-ament-cpplint \ + ros-humble-ament-xmllint \ + && rm -rf /var/lib/apt/lists/* + +COPY run.sh /run.sh +RUN chmod +x /run.sh + +ENTRYPOINT ["/run.sh"] \ No newline at end of file diff --git a/.github/actions/lint/run.sh b/.github/actions/lint/run.sh index 4b2b24082..830a24ff6 100755 --- a/.github/actions/lint/run.sh +++ b/.github/actions/lint/run.sh @@ -1,4 +1,5 @@ #!/bin/bash set -e -ament_${LINTER} src/ +source /opt/ros/humble/setup.bash +ament_${LINTER} src/ \ No newline at end of file diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 000000000..0b292b6b6 --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,49 @@ +name: Build and Push Docker Image to GHCR +on: + push: + tags: + - 'v*' + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + file: ./.devcontainer/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/ros.yaml b/.github/workflows/ros.yaml index 026a447d7..7f1e7efcf 100644 --- a/.github/workflows/ros.yaml +++ b/.github/workflows/ros.yaml @@ -2,9 +2,9 @@ name: ROS C++ Testing and Linting on: push: - branches: [main, humble] + branches: [main, humble, feature/*] pull_request: - branches: [main, humble] + branches: [main, humble, feature/*] workflow_dispatch: jobs: diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 2a998d557..f9432e4f8 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -2,9 +2,9 @@ name: Check Code Style - Ruff on: push: - branches: [main, humble] + branches: [main, humble, feature/*] pull_request: - branches: [main, humble] + branches: [main, humble, feature/*] workflow_dispatch: jobs: diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 4db07240e..a4cfc9431 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -8,9 +8,10 @@ name: Lint Code Base (Super-Linter) on: push: - branches: [main, humble] + branches: [main, humble, feature/*] pull_request: - branches: [main, humble] + branches: [main, humble, feature/*] + jobs: run-lint: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 7c280db83..b842bb833 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,4 @@ src/end_effectors/serial/ src/end_effectors/robotiq_hande_driver/ src/end_effectors/robotiq_hande_description/ src/end_effectors/ros2_epick_gripper/ +src/end_effectors/pipettor/ \ No newline at end of file diff --git a/build.sh b/build.sh index d3b967326..f54e6043d 100755 --- a/build.sh +++ b/build.sh @@ -16,4 +16,5 @@ colcon build \ --symlink-install \ --executor sequential \ --cmake-args "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DCMAKE_EXPORT_COMPILE_COMMANDS=On" \ - -Wall -Wextra -Wpedantic + -Wall -Wextra -Wpedantic \ + --packages-skip epick_moveit_studio epick_config \ No newline at end of file diff --git a/setup.sh b/setup.sh index bb31f70c4..372e94e20 100755 --- a/setup.sh +++ b/setup.sh @@ -2,6 +2,7 @@ set -e vcs import < src/ros2.repos src +vcs import < src/end_effectors/end_effectors.repos src/end_effectors sudo apt-get update rosdep update -rosdep install --from-paths src --ignore-src -y +rosdep install --from-paths src --ignore-src -y --skip-keys moveit_studio_behavior_interface --skip-keys epick_moveit_studio \ No newline at end of file diff --git a/src/aruco_pose/COLCON_IGNORE b/src/aruco_pose/COLCON_IGNORE new file mode 100644 index 000000000..e69de29bb diff --git a/src/end_effectors/README.md b/src/end_effectors/README.md index 9e6d455c6..5965c1dc1 100644 --- a/src/end_effectors/README.md +++ b/src/end_effectors/README.md @@ -15,6 +15,7 @@ This pulls in: - `robotiq_hande_driver` - Robotiq HandE gripper driver - `robotiq_hande_description` - Robotiq HandE URDF models - `ros2_epick_gripper` - EPick vacuum gripper driver +- `pipettor` - Custom pipettor developed at CMS NSLS-2 **Note:** The `ros2_epick_gripper` repository includes `epick_moveit_studio` which depends on paywalled MoveIt Studio/MoveIt Pro packages. Since we don't use this package, skip it during build and dependency installation: diff --git a/src/end_effectors/end_effectors.repos b/src/end_effectors/end_effectors.repos index 83b8ea561..7d3929394 100644 --- a/src/end_effectors/end_effectors.repos +++ b/src/end_effectors/end_effectors.repos @@ -14,4 +14,8 @@ repositories: ros2_epick_gripper: type: git url: https://github.com/PickNikRobotics/ros2_epick_gripper.git + version: main + pipettor: + type: git + url: https://github.com/sixym3/pipettor.git version: main \ No newline at end of file diff --git a/src/pdf/COLCON_IGNORE b/src/pdf/COLCON_IGNORE new file mode 100644 index 000000000..e69de29bb