Skip to content

Commit 2cbb8b2

Browse files
author
Felix Exner (fexner)
authored
Use dedicated build for noetic main (#640)
* Use dedicated build for noetic main * Increase timeout waiting for first action server * Add full noetic build matrix * Make the integration test behind a compile flag Since for our integration tests we would require docker being able to spawn a new container that can't necessarily be expected in any usecase. Also, with making this optional we don't require docker as a test dependency which also makes the package a lot more lightweight.
1 parent 1b0b8db commit 2cbb8b2

File tree

11 files changed

+185
-72
lines changed

11 files changed

+185
-72
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/ci_format.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Clang-Format check
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
format_check:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: 'ros-industrial/industrial_ci@master'
17+
env:
18+
ROS_DISTRO: noetic
19+
CLANG_FORMAT_CHECK: file
20+
CLANG_FORMAT_VERSION: "9"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Noetic Binary Build Main
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
schedule:
13+
# Run every morning to detect flakiness and broken dependencies
14+
- cron: '32 5 * * *'
15+
16+
jobs:
17+
binary:
18+
uses: ./.github/workflows/reusable_ici.yml
19+
with:
20+
ros_distro: noetic
21+
ros_repo: main
22+
ref_for_scheduled_build: master
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Noetic Binary Build Testing
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
schedule:
13+
# Run every morning to detect flakiness and broken dependencies
14+
- cron: '32 5 * * *'
15+
16+
jobs:
17+
binary:
18+
uses: ./.github/workflows/reusable_ici.yml
19+
with:
20+
ros_distro: noetic
21+
ros_repo: testing
22+
ref_for_scheduled_build: master
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Noetic Semi-Binary Build Main
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
schedule:
13+
# Run every morning to detect flakiness and broken dependencies
14+
- cron: '32 5 * * *'
15+
16+
jobs:
17+
binary:
18+
uses: ./.github/workflows/reusable_ici.yml
19+
with:
20+
ros_distro: noetic
21+
ros_repo: main
22+
ref_for_scheduled_build: master
23+
upstream_workspace: .noetic.rosinstall
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Noetic Semi-Binary Build Testing
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
schedule:
13+
# Run every morning to detect flakiness and broken dependencies
14+
- cron: '32 5 * * *'
15+
16+
jobs:
17+
binary:
18+
uses: ./.github/workflows/reusable_ici.yml
19+
with:
20+
ros_distro: noetic
21+
ros_repo: testing
22+
ref_for_scheduled_build: master
23+
upstream_workspace: .noetic.rosinstall

.github/workflows/reusable_ici.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Reusable industrial_ci workflow
2+
# original author: Denis Štogl <[email protected]>
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
ref_for_scheduled_build:
8+
description: 'Reference on which the repo should be checkout for scheduled build. Usually is this name of a branch or a tag.'
9+
default: ''
10+
required: false
11+
type: string
12+
13+
upstream_workspace:
14+
description: 'UPSTREAM_WORKSPACE variable for industrial_ci. Usually path to local .repos file.'
15+
default: ''
16+
required: false
17+
type: string
18+
ros_distro:
19+
description: 'ROS_DISTRO variable for industrial_ci'
20+
required: false
21+
type: string
22+
ros_repo:
23+
description: 'ROS_REPO to run for industrial_ci. Possible values: "main", "testing"'
24+
default: 'main'
25+
required: false
26+
type: string
27+
28+
jobs:
29+
reusable_ici:
30+
name: ${{ inputs.ros_distro }} ${{ inputs.ros_repo }} ${{ inputs.os_code_name }}
31+
runs-on: ubuntu-latest
32+
env:
33+
DOCKER_RUN_OPTS: '-v /var/run/docker.sock:/var/run/docker.sock --network ursim_net'
34+
ADDITIONAL_DEBS: 'docker.io'
35+
steps:
36+
- name: Checkout ${{ inputs.ref }} when build is not scheduled
37+
if: ${{ github.event_name != 'schedule' }}
38+
uses: actions/checkout@v3
39+
- name: Checkout ${{ inputs.ref }} on scheduled build
40+
if: ${{ github.event_name == 'schedule' }}
41+
uses: actions/checkout@v3
42+
with:
43+
ref: ${{ inputs.ref_for_scheduled_build }}
44+
- run: docker network create --subnet=192.168.56.0/24 ursim_net
45+
- uses: 'ros-industrial/industrial_ci@master'
46+
env:
47+
UPSTREAM_WORKSPACE: ${{ inputs.upstream_workspace }}
48+
ROS_DISTRO: ${{ inputs.ros_distro }}
49+
ROS_REPO: ${{ inputs.ros_repo }}
50+
CMAKE_ARGS: -DUR_ROBOT_DRIVER_BUILD_INTEGRATION_TESTS=ON

ur_robot_driver/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
88
set(CMAKE_BUILD_TYPE RelWithDebInfo)
99
endif()
1010

11+
# Default to off as this only works in environments where a new docker container can be started with the appropriate networking, which
12+
# might not be possible e.g. inside the buildfarm
13+
option(
14+
UR_ROBOT_DRIVER_BUILD_INTEGRATION_TESTS
15+
"Build integration tests using the start_ursim script"
16+
OFF
17+
)
18+
1119
find_package(catkin REQUIRED
1220
COMPONENTS
1321
actionlib
@@ -127,7 +135,9 @@ target_link_libraries(controller_stopper_node
127135
if(CATKIN_ENABLE_TESTING)
128136
find_package(rostest REQUIRED)
129137

130-
add_rostest(test/driver.test)
138+
if(${UR_ROBOT_DRIVER_BUILD_INTEGRATION_TESTS})
139+
add_rostest(test/driver.test)
140+
endif()
131141
endif()
132142

133143

ur_robot_driver/launch/ur_control.launch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@
7575

7676
<!-- spawn controller manager -->
7777
<node name="ros_control_controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
78-
output="screen" args="$(arg controllers)" />
78+
output="screen" args="$(arg controllers) --timeout 600" />
7979

8080
<!-- load other controller -->
8181
<node name="ros_control_stopped_spawner" pkg="controller_manager" type="spawner" respawn="false"
82-
output="screen" args="--stopped $(arg stopped_controllers)" unless="$(eval arg('stopped_controllers') == '')"/>
82+
output="screen" args="--stopped $(arg stopped_controllers) --timeout 600" unless="$(eval arg('stopped_controllers') == '')"/>
8383

8484
<node name="controller_stopper" pkg="ur_robot_driver" type="controller_stopper_node" respawn="false" output="screen">
8585
<remap from="robot_running" to="ur_hardware_interface/robot_program_running"/>

ur_robot_driver/test/driver.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<arg name="stopped_controllers" value="forward_joint_traj_controller forward_cartesian_traj_controller twist_controller pose_based_cartesian_traj_controller joint_based_cartesian_traj_controller"/>
1313
</include>
1414

15+
<node name="ursim" pkg="ur_client_library" type="start_ursim.sh" respawn="false" output="screen">
16+
</node>
17+
1518
<!--If the default controller changes, this remap has to be adapted, as well-->
1619
<remap from="follow_joint_trajectory" to="/scaled_pos_joint_traj_controller/follow_joint_trajectory" />
1720
<remap from="forward_cartesian_trajectory" to="/forward_cartesian_traj_controller/follow_cartesian_trajectory" />

0 commit comments

Comments
 (0)