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

Add pre-release testings to ci #2293

Merged
merged 2 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the ros2-beta branch
push:
branches:
- ros2-beta
pull_request:
branches:
- ros2-beta
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:


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: [foxy, galactic]
include:
- ros_distro: 'foxy'
os: ubuntu-20.04
- ros_distro: 'galactic'
os: ubuntu-20.04

env:
ROS_DISTRO: ${{ matrix.ros_distro }}
PRERELEASE: true
BASEDIR: ${{ github.workspace }}/.work

steps:
- uses: actions/checkout@v2
- name: industrial_ci
uses: ros-industrial/industrial_ci@master
22 changes: 1 addition & 21 deletions realsense2_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -238,27 +238,7 @@ install(DIRECTORY

# Test
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
find_package(OpenCV REQUIRED)

ament_lint_auto_find_test_dependencies()

set(REALSENSE_DEVICE_PLUGIN FALSE)
if(${REALSENSE_DEVICE_PLUGIN})
ament_add_gtest(test_api test/test_api.cpp)
endif()
if(TARGET test_api)
target_include_directories(test_api PUBLIC
${${PROJECT_NAME}_INCLUDE_DIRS}
)
ament_target_dependencies(test_api
OpenCV
rclcpp
sensor_msgs
nav_msgs
tf2
tf2_ros)
endif()
# This does nothing for now, note that ROS build farm build with BUILD_TESTING=1
endif()

# Ament exports
Expand Down
4 changes: 0 additions & 4 deletions realsense2_camera/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
<depend>diagnostic_updater</depend>

<exec_depend>launch_ros</exec_depend>
<test_depend>ament_cmake_gtest</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<test_depend>libopencv-dev</test_depend>
<build_depend>ros_environment</build_depend>

<export>
Expand Down