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

colcon and ROS2 support #361

Open
wants to merge 17 commits into
base: master
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -15,7 +15,7 @@ services:

before_script:
- apk add --update bash coreutils tar # install industrial_ci dependencies
# for regular users: - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci
# for regular users: - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci -b colcon
- mkdir .industrial_ci && cp -a * .industrial_ci # this is only needed for branch testing of industrial_ci itself

# setup the actual tests
@@ -19,31 +19,29 @@ git:
env:
global:
- POST_PROCESS='echo "post processing reached"'
- "BEFORE_SCRIPT='echo current dir: $(pwd)'"
- "AFTER_SETUP_TARGET_WORKSPACE='echo current dir: $(pwd)'"

matrix:
- ROS_DISTRO=hydro USE_MOCKUP='industrial_ci/mockups/industrial_ci_testpkg' VERBOSE_OUTPUT='true'
- ROS_DISTRO=indigo USE_MOCKUP='industrial_ci/mockups/industrial_ci_testpkg' VERBOSE_OUTPUT='true' CATKIN_LINT=true
- ROS_DISTRO=indigo USE_MOCKUP='industrial_ci/mockups/industrial_ci_testpkg' CMAKE_ARGS="-DFAIL_CMAKE=true" EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo USE_MOCKUP='industrial_ci/mockups/industrial_ci_testpkg' CATKIN_LINT=pedantic EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo USE_MOCKUP='industrial_ci/mockups/industrial_ci_testpkg' ROSDEP_SKIP_KEYS="rospy_tutorials rostest" EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo USE_MOCKUP='industrial_ci/mockups/testpkg_broken_install' EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo USE_MOCKUP='industrial_ci/mockups/testpkg_broken_install' CATKIN_CONFIG='--no-install -DCMAKE_CXX_FLAGS="-Werror=uninitialized -Werror=return-type"'
- DOCKER_IMAGE='arm32v7/ros:indigo-ros-core' ADDITIONAL_DEBS="build-essential python-catkin-tools python-pip" INJECT_QEMU=arm BEFORE_SCRIPT='[[ $(uname -p) == armv7l ]]'
- ROS_DISTRO=indigo TARGET_WORKSPACE='industrial_ci/mockups/industrial_ci_testpkg' VERBOSE_OUTPUT='true' CATKIN_LINT=true
- ROS_DISTRO=indigo TARGET_WORKSPACE='industrial_ci/mockups/industrial_ci_testpkg' CMAKE_ARGS="-DFAIL_CMAKE=true" EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo TARGET_WORKSPACE='industrial_ci/mockups/industrial_ci_testpkg' CATKIN_LINT=pedantic EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo TARGET_WORKSPACE='industrial_ci/mockups/industrial_ci_testpkg' ROSDEP_SKIP_KEYS="rospy_tutorials rostest" EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo TARGET_WORKSPACE='industrial_ci/mockups/testpkg_broken_install' EXPECT_EXIT_CODE=1
- DOCKER_IMAGE='arm32v7/ros:indigo-ros-core' ADDITIONAL_DEBS="build-essential python-catkin-tools python-pip" INJECT_QEMU=arm BEFORE_INIT='[[ $(uname -p) == armv7l ]]'
- ROS_DISTRO=melodic NOT_TEST_BUILD='true' _GUARD_INTERVAL=10
- ROS_DISTRO=indigo NOT_TEST_INSTALL='true' BEFORE_SCRIPT='test -z "${CXX+x}"' # test that CXX is not set
- ROS_DISTRO=indigo NOT_TEST_INSTALL='true' CXX=/usr/bin/gcc BEFORE_SCRIPT='test -z "${CXX+x}"' EXPECT_EXIT_CODE=1 # test the CXX test
- ROS_DISTRO=indigo NOT_TEST_INSTALL='true' BEFORE_INIT='test -z "${CXX+x}"' # test that CXX is not set
- ROS_DISTRO=indigo NOT_TEST_INSTALL='true' CXX=/usr/bin/gcc BEFORE_INIT='test -z "${CXX+x}"' EXPECT_EXIT_CODE=1 # test the CXX test
- ROS_DISTRO=indigo NOT_TEST_BUILD='true' NOT_TEST_INSTALL='true' # This may not make much sense. Only for testing purpose.
- ROS_DISTRO=indigo NOT_TEST_BUILD='true' NOT_TEST_INSTALL='true' POST_PROCESS='I_am_supposed_to_fail'
- ROS_DISTRO=indigo CATKIN_PARALLEL_JOBS='-p1' ROS_PARALLEL_JOBS='-j1' # Intend build on low-power platform
# - env: ROS_DISTRO=indigo PRERELEASE=true ## Comment out because this is meaningless for always failing without prerelease testable contents in industrial_ci.
- ROS_DISTRO=indigo PRERELEASE=true PRERELEASE_DOWNSTREAM_DEPTH=1 DOCKER_BASE_IMAGE=something
- ROS_DISTRO=indigo PRERELEASE=true USE_MOCKUP='industrial_ci/mockups/failing_test' EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo PRERELEASE=true PRERELEASE_DOWNSTREAM_DEPTH=1
- ROS_DISTRO=indigo PRERELEASE=true TARGET_WORKSPACE='industrial_ci/mockups/failing_test' PRERELEASE_REPONAME="failing_test" EXPECT_EXIT_CODE=1
- ROS_DISTRO=kinetic PRERELEASE=true PRERELEASE_REPONAME=industrial_ci
- ROS_DISTRO=indigo UPSTREAM_WORKSPACE=debian AFTER_SCRIPT='ccache 2> /dev/null && exit 1; [ "$?" = "127" ]'
# Using default file name for ROSINSTALL_FILENAME, test CCACHE, verify cache was filled
- ROS_DISTRO=indigo UPSTREAM_WORKSPACE=file CCACHE_DIR=$HOME/.ccache AFTER_SCRIPT='num=($(ccache -s | grep "files in cache")) && (( num[-1] > 0 ))'
- ROS_DISTRO=indigo UPSTREAM_WORKSPACE=file USE_DEB=true # Expected to fail. See https://github.com/ros-industrial/industrial_ci/pull/74
- ROS_DISTRO=indigo UPSTREAM_WORKSPACE=file USE_DEB=true EXPECT_EXIT_CODE=1 # Expected to fail. See https://github.com/ros-industrial/industrial_ci/pull/74
- ROS_DISTRO=indigo UPSTREAM_WORKSPACE=https://raw.githubusercontent.com/ros-industrial/industrial_ci/master/.travis.rosinstall
- ROS_DISTRO=indigo USE_DEB=true # Checking backup compatibility with UPSTREAM_WORKSPACE
- ROS_DISTRO=indigo USE_DEB=false # Checking backup compatibility with UPSTREAM_WORKSPACE
@@ -52,28 +50,35 @@ env:
- ROS_DISTRO=kinetic UPSTREAM_WORKSPACE=file ROSINSTALL_FILENAME=.ci.rosinstall # Testing arbitrary file name without ROS_DISTRO suffix. As of 6/3/2016 this fails due to https://github.com/ros-industrial/industrial_core/pull/144#issuecomment-223186764
- ROS_DISTRO=kinetic UPSTREAM_WORKSPACE=file ROSINSTALL_FILENAME=.i.do.not.exist EXPECT_EXIT_CODE=1
- DOCKER_BASE_IMAGE="ros:kinetic-ros-base" ROS_REPO=ros NOT_TEST_BUILD='true' DEBUG_BASH='true' VERBOSE_OUTPUT='false' DOCKER_COMMIT="img_temp" POST_PROCESS='eval docker image inspect $DOCKER_COMMIT --format="$DOCKER_COMMIT: \"{{.Size}}\" bytes"'
- ROS_DISTRO=lunar ROS_REPO=ros-shadow-fixed USE_MOCKUP='industrial_ci/mockups/industrial_ci_testpkg'
- ROS_DISTRO=lunar ROS_REPO=ros-shadow-fixed TARGET_WORKSPACE='industrial_ci/mockups/industrial_ci_testpkg'
- ROS_DISTRO=melodic AFTER_SCRIPT='grep -q ID=ubuntu /etc/os-release && grep -q VERSION_CODENAME=bionic /etc/os-release'
- ROS_DISTRO=melodic BEFORE_SCRIPT='grep -q ID=debian /etc/os-release && grep -q VERSION_ID=\"9\" /etc/os-release' EXPECT_EXIT_CODE=1
- ROS_DISTRO=melodic BEFORE_INIT='grep -q ID=debian /etc/os-release && grep -q VERSION_ID=\"9\" /etc/os-release' EXPECT_EXIT_CODE=1
- ROS_DISTRO=melodic OS_NAME=debian OS_CODE_NAME=stretch AFTER_SCRIPT='grep -q ID=debian /etc/os-release && grep -q VERSION_ID=\"9\" /etc/os-release'
- ROS_DISTRO=melodic OS_NAME=debian EXPECT_EXIT_CODE=1
- ROS_DISTRO=melodic OS_NAME=debian OS_CODE_NAME=bionic EXPECT_EXIT_CODE=1

# External repositories
- ROS_DISTRO=kinetic _EXTERNAL_REPO='ros-industrial/industrial_core#kinetic-devel'
- ROS_DISTRO=kinetic _EXTERNAL_REPO='ros-industrial/motoman_experimental#kinetic-devel' UPSTREAM_WORKSPACE=file BEFORE_SCRIPT='touch $CATKIN_WORKSPACE/src/ros-industrial/industrial_experimental/IRC_v2/CATKIN_IGNORE'
- ROS_DISTRO=kinetic _EXTERNAL_REPO='ros-controls/ros_control#kinetic-devel' UPSTREAM_WORKSPACE=file ROSINSTALL_FILENAME=ros_control.rosinstall ROS_PARALLEL_TEST_JOBS=-j1
- ROS_DISTRO=kinetic _EXTERNAL_REPO='ipa320/cob_calibration_data#indigo_dev' ROS_REPO=ros UPSTREAM_WORKSPACE=file AFTER_SCRIPT='./.travis.xacro_test.sh'
- ROS_DISTRO=indigo _EXTERNAL_REPO='ros/actionlib#38ce66e2ae2ec9c19cf12ab22d57a8134a9285be' ROS_REPO=ros ABICHECK_URL=url ABICHECK_MERGE=true # actual URL will not be used in the case
- ROS_DISTRO=kinetic _EXTERNAL_REPO='ros-industrial/ros_canopen#0.7.5' ROS_REPO=ros ABICHECK_URL='github:ros-industrial/ros_canopen#0.7.1' ABICHECK_MERGE=false EXPECT_EXIT_CODE=1
- ROS_DISTRO=kinetic _EXTERNAL_REPO='ros-industrial/ros_canopen#0.7.6' ABICHECK_URL='github:ros-industrial/ros_canopen#0.7.5' ABICHECK_MERGE=false
- ROS_DISTRO=kinetic _EXTERNAL_REPO='github:ros-industrial/industrial_core@kinetic-devel'
- ROS_DISTRO=kinetic _EXTERNAL_REPO='gh:ros-industrial/motoman_experimental#kinetic-devel' UPSTREAM_WORKSPACE='.travis.rosinstall -ros-industrial/industrial_experimental/IRC_v2'
- ROS_DISTRO=kinetic _EXTERNAL_REPO='github:ros-controls/ros_control#kinetic-devel' UPSTREAM_WORKSPACE=file ROSINSTALL_FILENAME=ros_control.rosinstall ROS_PARALLEL_TEST_JOBS=-j1
- ROS_DISTRO=kinetic _EXTERNAL_REPO='github:ipa320/cob_calibration_data#indigo_dev' ROS_REPO=ros UPSTREAM_WORKSPACE=file AFTER_SCRIPT='rosenv ./.travis.xacro_test.sh'
- ROS_DISTRO=indigo _EXTERNAL_REPO='github:ros/actionlib#38ce66e2ae2ec9c19cf12ab22d57a8134a9285be' ROS_REPO=ros ABICHECK_URL=url ABICHECK_MERGE=true # actual URL will not be used in the case
- ROS_DISTRO=kinetic _EXTERNAL_REPO='github:ros-industrial/ros_canopen#0.7.5' ROS_REPO=ros ABICHECK_URL='github:ros-industrial/ros_canopen#0.7.1' ABICHECK_MERGE=false EXPECT_EXIT_CODE=1
- ROS_DISTRO=kinetic _EXTERNAL_REPO='github:ros-industrial/ros_canopen#0.7.6' ABICHECK_URL='github:ros-industrial/ros_canopen#0.7.5' ABICHECK_MERGE=false
- ROS_DISTRO=kinetic _EXTERNAL_REPO='github:ros-controls/ros_control#kinetic-devel' UPSTREAM_WORKSPACE="ros_control.rosinstall -ros_control -ros_controllers"
- ROS_DISTRO=melodic NOT_TEST_DOWNSTREAM=true BUILDER=colcon _EXTERNAL_REPO='github:ros-controls/ros_control#melodic-devel' UPSTREAM_WORKSPACE="github:ros-controls/control_msgs#kinetic-devel github:ros-controls/realtime_tools#melodic-devel github:ros-controls/control_toolbox#melodic-devel" DOWNSTREAM_WORKSPACE="github:ros-controls/ros_controllers#melodic-devel"
- ROS_DISTRO=bouncy _EXTERNAL_REPO='github:ros2/joystick_drivers#bouncy'
- ROS_DISTRO=crystal _EXTERNAL_REPO='github:ros-controls/control_msgs#crystal-devel'
- ROS_DISTRO=crystal _EXTERNAL_REPO='github:ros-controls/control_msgs#crystal-devel' PRERELEASE=true
# - ROS_DISTRO=dashing _EXTERNAL_REPO='github:ros-controls/control_msgs#crystal-devel'
- ROS_DISTRO=dashing

# Format tests
- ROS_DISTRO=indigo USE_MOCKUP='industrial_ci/mockups/format_tests/cpp/LLVM' CLANG_FORMAT_CHECK='LLVM' CLANG_FORMAT_VERSION=3.8
- ROS_DISTRO=kinetic USE_MOCKUP='industrial_ci/mockups/format_tests/cpp/LLVM' CLANG_FORMAT_CHECK='LLVM'
- ROS_DISTRO=kinetic USE_MOCKUP='industrial_ci/mockups/format_tests/cpp/WebKit' CLANG_FORMAT_CHECK='LLVM' EXPECT_EXIT_CODE=1
- ROS_DISTRO=kinetic USE_MOCKUP='industrial_ci/mockups/format_tests/cpp/WebKit' CLANG_FORMAT_CHECK='file'
- ROS_DISTRO=kinetic USE_MOCKUP='industrial_ci/mockups/format_tests/cpp/LLVM' CLANG_FORMAT_CHECK='WebKit' EXPECT_EXIT_CODE=1
- ROS_DISTRO=indigo TARGET_WORKSPACE='industrial_ci/mockups/format_tests/cpp/LLVM' CLANG_FORMAT_CHECK='LLVM' CLANG_FORMAT_VERSION=3.8
- ROS_DISTRO=kinetic TARGET_WORKSPACE='industrial_ci/mockups/format_tests/cpp/LLVM' CLANG_FORMAT_CHECK='LLVM'
- ROS_DISTRO=kinetic TARGET_WORKSPACE='industrial_ci/mockups/format_tests/cpp/WebKit' CLANG_FORMAT_CHECK='LLVM' EXPECT_EXIT_CODE=1
- ROS_DISTRO=kinetic TARGET_WORKSPACE='industrial_ci/mockups/format_tests/cpp/WebKit' CLANG_FORMAT_CHECK='file'
- ROS_DISTRO=kinetic TARGET_WORKSPACE='industrial_ci/mockups/format_tests/cpp/LLVM' CLANG_FORMAT_CHECK='WebKit' EXPECT_EXIT_CODE=1
matrix:
allow_failures:
- env: ROS_DISTRO=indigo NOT_TEST_BUILD='true' NOT_TEST_INSTALL='true' POST_PROCESS='I_am_supposed_to_fail'
@@ -2,6 +2,8 @@
Industrial CI
================
CI (Continuous Integration) configuration for `ROS` (`Robot Operating System <http://ros.org>`__).
This is the refactored version with ROS2 support, the old verson can be found in the `legacy branch <https://github.com/ros-industrial/industrial_ci/tree/legacy>`__.
Please check the `migration guide <doc/migration_guide.md>`__ as well.

.. contents:: Table of Contents
:depth: 2
@@ -20,7 +22,7 @@ Some notable feature:
* Checks if your package builds, installs without issues. If unit/system tests are defined run them. `ROS Prerelease Test <http://wiki.ros.org/bloom/Tutorials/PrereleaseTest>`__ can optionally be run.
* Proven to cover the general requirements of the ROS-based robotics repositories. Easily configurable.
* Users can add custom pre/post processes.
* Covers ROS Hydro, Indigo, Jade, Kinetic, Lunar, Melodic distribution.
* Covers ROS1 Indigo, Jade, Kinetic, Lunar, Melodic and ROS2 distributions.
* This repo provides scripts for `Bitbucket CI`, `Gitlab CI`, and `Travis CI` only, but it can be easily adapted for other CI services.

For a brief overall introduction, you could also check a presentation:
@@ -50,7 +52,7 @@ For Travis CI
- ROS_DISTRO="indigo"

install:
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .industrial_ci
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .industrial_ci -b colcon
script:
- .industrial_ci/travis.sh

@@ -70,7 +72,7 @@ For Gitlab CI
- docker:dind
before_script:
- apk add --update bash coreutils tar
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci -b colcon
indigo:
script: .industrial_ci/gitlab.sh ROS_DISTRO=indigo

@@ -92,7 +94,7 @@ For Bitbucket Pipelines
- docker
script:
- apk add --update bash coreutils tar
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci -b colcon
- .industrial_ci/bitbucket.sh ROS_DISTRO=indigo

definitions:
@@ -33,6 +33,6 @@ matrix:

# clone and run industrial_ci
install:
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .industrial_ci
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .industrial_ci -b colcon
script:
- .industrial_ci/travis.sh
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.