From 2231bb6baa827490223d3890aba4dee91915dabf Mon Sep 17 00:00:00 2001 From: SamerKhshiboun Date: Mon, 24 Jun 2024 18:32:00 +0000 Subject: [PATCH] update workflows --- .github/workflows/main.yml | 22 ++++---- ...elease.yml => pre-release-development.yml} | 2 +- .github/workflows/pre-release-master.yml | 50 +++++++++++++++++++ realsense2_camera/package.xml | 1 - 4 files changed, 64 insertions(+), 11 deletions(-) rename .github/workflows/{pre-release.yml => pre-release-development.yml} (98%) create mode 100644 .github/workflows/pre-release-master.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 280cc38088..12f1b7f559 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,7 +47,7 @@ jobs: - uses: actions/checkout@v4 with: path: 'ros2/src/realsense-ros' - + - name: Check Copyright & Line-Endings shell: bash run: | @@ -67,7 +67,14 @@ jobs: uses: ros-tooling/setup-ros@v0.7 with: required-ros-distributions: ${{ matrix.ros_distro }} - + + - name: Checkout librealsense/development + uses: actions/checkout@v4 + with: + repository: IntelRealSense/librealsense + path: librealsense + ref: development + - name: Build RealSense SDK 2.0 (development branch) from source run: | @@ -75,9 +82,7 @@ jobs: # This apt install command will be ignored in ubuntu 22.04 as libusb-1.0-0-dev already installed there sudo apt install -y libusb-1.0-0-dev - cd ${{github.workspace}} - git clone https://github.com/IntelRealSense/librealsense.git -b development - cd librealsense + cd ${{github.workspace}}/librealsense sudo mkdir build cd build sudo cmake ../ -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=false -DBUILD_GRAPHICAL_EXAMPLES=false @@ -112,7 +117,7 @@ jobs: # bag_filename="https://librealsense.intel.com/rs-tests/D435i_Depth_and_IMU_Stands_still.bag"; # wget $bag_filename -P "records/" # sudo apt install ros-${{ matrix.ros_distro}}-launch-pytest - + - name: Install Packages For Foxy Tests if: ${{ matrix.ros_distro == 'foxy' }} run: | @@ -138,8 +143,7 @@ jobs: # numpy-quaternion needs numpy<2.0.0. Chose 1.26.4 as it is the lowest working version for ubuntu 24.04. pip3 install --force-reinstall numpy==1.26.4 pip3 install numpy-quaternion tqdm pyyaml - - + - name: Run Tests run: | cd ${{github.workspace}}/ros2 @@ -150,7 +154,7 @@ jobs: sudo apt install -y ros-${{matrix.ros_distro}}-sensor-msgs-py source ../.venv/bin/activate python3 src/realsense-ros/realsense2_camera/scripts/rs2_test.py non_existent_file - + # don't run integration tests for foxy since some testing dependecies packages like # tf_ros_py are not avaialble # TODO: check when we can run integration tests on rolling diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release-development.yml similarity index 98% rename from .github/workflows/pre-release.yml rename to .github/workflows/pre-release-development.yml index 29122ffe10..d851f2a9f8 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release-development.yml @@ -9,7 +9,7 @@ # This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). # For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) -name: pre-release +name: pre-release-development # Controls when the workflow will run on: diff --git a/.github/workflows/pre-release-master.yml b/.github/workflows/pre-release-master.yml new file mode 100644 index 0000000000..3dbd35e155 --- /dev/null +++ b/.github/workflows/pre-release-master.yml @@ -0,0 +1,50 @@ +# This adds "pre-release" builds for Github Actions. These: +# - check if the package builds, installs without issues +# - if unit/system tests are defined, runs them +# If these pass, we cover the general requirements of ROS-based repositories. +# +# These builds run on Github machines, but in the same environment and using the same flow as actual ROS +# distro build farm releases, hence "pre-release". +# +# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). +# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) + +name: pre-release-master + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the ros2-development branch + push: + branches: + - ros2-master + pull_request: + branches: + - ros2-master + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +permissions: read-all + +jobs: + build: + name: Build pre-release tests for ROS2 ${{ matrix.ros_distro }} and ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + ros_distro: [iron, humble] + include: + - ros_distro: 'iron' + os: ubuntu-22.04 + - ros_distro: 'humble' + os: ubuntu-22.04 + + env: + ROS_DISTRO: ${{ matrix.ros_distro }} + PRERELEASE: true + BASEDIR: ${{ github.workspace }}/.work + + steps: + - uses: actions/checkout@v4 + - name: industrial_ci + uses: ros-industrial/industrial_ci@master diff --git a/realsense2_camera/package.xml b/realsense2_camera/package.xml index d2758d223a..9618ed9d78 100644 --- a/realsense2_camera/package.xml +++ b/realsense2_camera/package.xml @@ -21,7 +21,6 @@ rclcpp rclcpp_components realsense2_camera_msgs - sensor_msgs geometry_msgs std_msgs nav_msgs