diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..f9d2311 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,21 @@ +name: CI (humble) +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + container: + image: ubuntu:jammy + steps: + - uses: actions/checkout@v4 + - uses: ros-tooling/setup-ros@v0.7 + with: + use-ros2-testing: true + - uses: ros-tooling/action-ros-ci@v0.3 + # continue-on-error: true + with: + target-ros2-distro: humble \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 3f0b5f7..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: CI(humble) -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] -jobs: - CI: - runs-on: ubuntu-latest - permissions: - contents: read - issues: read - checks: write - pull-requests: write - steps: - - name: Prepare - run: | - mkdir -p ${{github.workspace}}/src - - uses: actions/checkout@v4 - with: - path: src/ft_tools_ros2 - - - name: Build Docker Image - uses: docker/build-push-action@v6 - with: - tags: ft_tools_ros2:humble - file: .docker/ci/Dockerfile - push: false - - - name: Build - uses: addnab/docker-run-action@v3 - with: - image: ft_tools_ros2:humble - options: -v ${{github.workspace}}/:/ros/ - run: | - cd /ros # structure = <...>/ros/src/ft_tools_ros2/<...> - . /opt/ros/humble/setup.sh - # vcs import src < src/ft_tools_ros2/ft_tools_ros2.repos - rosdep install --ignore-src --from-paths . -y -r - colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install - - - name: Tests - uses: addnab/docker-run-action@v3 - with: - image: ft_tools_ros2:humble - options: -v ${{github.workspace}}/:/ros/ - run: | - cd /ros - . /opt/ros/humble/setup.sh - # vcs import src < src/ft_tools_ros2/ft_tools_ros2.repos - rosdep install --ignore-src --from-paths . -y -r - colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install - colcon test - colcon test-result - - - name: Upload Tests to Artifacts - uses: actions/upload-artifact@v4 - if: always() - with: - name: test-results - path: build/*/test_results/*/*.xml - - - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - if: always() - with: - files: build/*/test_results/*/*.xml diff --git a/README.md b/README.md index 47b54c0..f1515b2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Wrench estimation and calibration of F/T sensor for ROS2 applications. [![Licence](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -[![CI (humble)](https://github.com/tpoignonec/ft_tools_ros2/actions/workflows/ci.yml/badge.svg)](https://github.com/tpoignonec/ft_tools_ros2/actions/workflows/ci.yml) +[![Build tests (humble)](../../actions/workflows/ci.yaml/badge.svg?branch=main)](../../actions/workflows/ci.yaml?query=branch:humble) **Author:** Thibault Poignonec: [tpoignonec@unistra.fr](mailto:tpoignonec@unistra.fr)