Skip to content

Commit

Permalink
Merge pull request #1116 from k-okada/fix_travis2
Browse files Browse the repository at this point in the history
update jsk_travis 0.5.22
  • Loading branch information
k-okada committed Dec 21, 2021
2 parents fe1c671 + 9721227 commit c5b5e47
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 25 deletions.
24 changes: 14 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
# Generic MoveIt Travis Continuous Integration Configuration File
# Works with all MoveIt! repositories/branches
# Author: Dave Coleman, Jonathan Bohren
sudo: required
dist: trusty
sudo: true
dist: bionic
language: c++
services:
- docker
cache:
- ccache
- apt
apt: true
pip: true
directories:
- $HOME/.ccache
- $HOME/.cache/pip
- $HOME/apt-cacher-ng
env:
global:
- ROSWS=wstool
Expand All @@ -20,16 +26,14 @@ env:
matrix:
- USE_JENKINS=true ROS_DISTRO=hydro USE_DEB=true
- USE_JENKINS=true ROS_DISTRO=hydro USE_DEB=false NOT_TEST_INSTALL=true
- USE_JENKINS=true ROS_DISTRO=hydro USE_DEB=source NOT_TEST_INSTALL=true EXTRA_DEB="ros-hydro-roseus ros-hydro-euscollada ros-hydro-pr2eus" ROS_PARALLEL_JOBS="-j1 -l1" IS_EUSLISP_TRAVIS_TEST="true"
- USE_JENKINS=true ROS_DISTRO=hydro USE_DEB=source NOT_TEST_INSTALL=true
- USE_JENKINS=true ROS_DISTRO=hydro USE_DEB=true EXTRA_DEB="ros-hydro-hrpsys-ros-bridge ros-hydro-pr2eus" ROS_PARALLEL_JOBS="-j1 -l1" NOT_TEST_INSTALL=true IS_EUSLISP_TRAVIS_TEST="true"
- USE_JENKINS=true ROS_DISTRO=hydro USE_DEB=false EXTRA_DEB="ros-hydro-hrpsys-ros-bridge ros-hydro-pr2eus" ROS_PARALLEL_JOBS="-j1 -l1" NOT_TEST_INSTALL=true IS_EUSLISP_TRAVIS_TEST="true"
- USE_TRAVIS=true ROS_DISTRO=indigo USE_DEB=true
- USE_TRAVIS=true ROS_DISTRO=indigo USE_DEB=false NOT_TEST_INSTALL=true
- USE_TRAVIS=true ROS_DISTRO=indigo USE_DEB=true EXTRA_DEB="ros-indigo-hrpsys-ros-bridge ros-indigo-pr2eus" NOT_TEST_INSTALL=true TEST_PKGS="hrpsys_ros_bridge" IS_EUSLISP_TRAVIS_TEST=true
- USE_JENKINS=true ROS_DISTRO=indigo USE_DEB=false EXTRA_DEB="ros-indigo-hrpsys-ros-bridge ros-indigo-pr2eus" NOT_TEST_INSTALL=true TEST_PKGS="hrpsys_ros_bridge" IS_EUSLISP_TRAVIS_TEST=true
- USE_TRAVIS=true TEST_TYPE=work_with_downstream TEST_PACKAGE=hironx-ros-bridge ROS_DISTRO=indigo EXTRA_DEB="ros-indigo-roslint"
- USE_TRAVIS=true TEST_TYPE=work_with_315_1_10 TEST_PACKAGE=hironx-ros-bridge ROS_DISTRO=indigo EXTRA_DEB="ros-indigo-roslint"
- USE_TRAVIS=true TEST_TYPE=work_with_downstream TEST_PACKAGE=hironx-ros-bridge ROS_DISTRO=indigo EXTRA_DEB="ros-indigo-roslint" DOCKER_IMAGE=ubuntu:trusty
- USE_TRAVIS=true TEST_TYPE=work_with_315_1_10 TEST_PACKAGE=hironx-ros-bridge ROS_DISTRO=indigo EXTRA_DEB="ros-indigo-roslint" DOCKER_IMAGE=ubuntu:trusty
- USE_TRAVIS=true ROS_DISTRO=indigo USE_DEB=true EXTRA_DEB="ros-indigo-pr2eus" NOT_TEST_INSTALL=true IS_EUSLISP_TRAVIS_TEST=false # For updating euslisp-docs (Must be USE_TRAVIS=true and IS_EUSLISP_TRAVIS_TEST=false. See after_success)
- USE_JENKINS=true ROS_DISTRO=kinetic USE_DEB=true
- USE_JENKINS=true ROS_DISTRO=kinetic USE_DEB=false NOT_TEST_INSTALL=true
Expand All @@ -42,7 +46,6 @@ matrix:
fast_finish: true
allow_failures:
# hydro + euslisp test
- env: USE_JENKINS=true ROS_DISTRO=hydro USE_DEB=source NOT_TEST_INSTALL=true EXTRA_DEB="ros-hydro-roseus ros-hydro-euscollada ros-hydro-pr2eus" ROS_PARALLEL_JOBS="-j1 -l1" IS_EUSLISP_TRAVIS_TEST="true"
- env: USE_JENKINS=true ROS_DISTRO=hydro USE_DEB=true EXTRA_DEB="ros-hydro-hrpsys-ros-bridge ros-hydro-pr2eus" ROS_PARALLEL_JOBS="-j1 -l1" NOT_TEST_INSTALL=true IS_EUSLISP_TRAVIS_TEST="true"
- env: USE_JENKINS=true ROS_DISTRO=hydro USE_DEB=false EXTRA_DEB="ros-hydro-hrpsys-ros-bridge ros-hydro-pr2eus" ROS_PARALLEL_JOBS="-j1 -l1" NOT_TEST_INSTALL=true IS_EUSLISP_TRAVIS_TEST="true"
# Running euslisp test on travis often takes more than 50 min
Expand All @@ -56,6 +59,7 @@ notifications:
on_failure: always #[always|never|change] # default: always
before_script:
- set -x
- if [ "${USE_TRAVIS}" == "true" ]; then export USE_DOCKER=true; fi
# Install libopencv-dev manually to compile hrpsys-simulator in hrpsys-base on kinetic
# Details: https://github.com/start-jsk/rtmros_common/pull/1091#issuecomment-611457804
# https://github.com/start-jsk/rtmros_common/pull/1091#issuecomment-611476618
Expand All @@ -76,7 +80,7 @@ before_script:
script:
- if [ "${IS_EUSLISP_TRAVIS_TEST}" != "true" ] ; then export ROS_PARALLEL_JOBS="-j2 -l2" ; fi
- if [ "${ROS_DISTRO}" == "hydro" ] ; then sudo apt-get install -y --force-yes gdebi && wget https://bintray.com/artifact/download/furushchev/ros-shadow-fixed/python-catkin-tools_0.3.1-1_all.deb && wget https://bintray.com/artifact/download/furushchev/ros-shadow-fixed/python-catkin-pkg_0.2.10-1_all.deb && sudo gdebi -n -q python-catkin-pkg_0.2.10-1_all.deb && sudo gdebi -n -q python-catkin-tools_0.3.1-1_all.deb && sudo apt-mark hold python-catkin-tools; fi
- if [ "${TEST_TYPE}" == "" ] ; then source .travis/travis.sh; else source ./.travis_test.sh ; fi
- if [ "${TEST_TYPE}" == "" ] ; then source .travis/travis.sh; else docker pull $DOCKER_IMAGE || true; export CI_SOURCE_PATH=$(pwd); docker run -v $HOME:$HOME -v $HOME/.ccache:$HOME/.ccache/ -v $HOME/.cache/pip:$HOME/.cache/pip/ $DOCKER_XSERVER_OPTIONS -e TRAVIS_BRANCH -e TRAVIS_COMMIT -e TRAVIS_JOB_ID -e TRAVIS_OS_NAME -e TRAVIS_PULL_REQUEST -e TRAVIS_REPO_SLUG -e GITHUB_RUN_ID -e CI_SOURCE_PATH -e HOME -e REPOSITORY_NAME -e BUILD_PKGS -e TARGET_PKGS -e TEST_PKGS -e BEFORE_SCRIPT -e BUILDER -e EXTRA_DEB -e USE_DEB -e ROS_DISTRO -e ROS_LOG_DIR -e ROS_REPOSITORY_PATH -e ROSWS -e CATKIN_TOOLS_BUILD_OPTIONS -e CATKIN_TOOLS_CONFIG_OPTIONS -e CATKIN_PARALLEL_JOBS -e CATKIN_PARALLEL_TEST_JOBS -e ROS_PARALLEL_JOBS -e ROS_PARALLEL_TEST_JOBS -e ROS_PYTHON_VERSION -e ROSDEP_ADDITIONAL_OPTIONS -e ROSDEP_UPDATE_QUIET -e SUDO_PIP -e USE_PYTHON_VIRTUALENV -e NOT_TEST_INSTALL -e DEBUG_TRAVIS_PYTHON -e TEST_PACKAGE -e TEST_TYPE -t $DOCKER_IMAGE bash -c 'cd $CI_SOURCE_PATH; source ./.travis_test.sh' ; fi
- ccache -s
after_success:
- if [ "${TRAVIS_SECURE_ENV_VARS}" == "true" ]; then cd ${TRAVIS_BUILD_DIR}; openssl aes-256-cbc -K $encrypted_b79fc5843df3_key -iv $encrypted_b79fc5843df3_iv -in .secrets.tar.enc -out .secrets.tar -d; tar -C ~/ -xvf .secrets.tar; fi
Expand Down
31 changes: 20 additions & 11 deletions .travis_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@ function error {
exit 1
}

function apt-get-install {
sudo -E apt-get -y -qq install $@ | pv -i 60 | grep -v -e '\(Preparing to unpack\|Unpacking\|Selecting previously unselected package\)'
[[ ${PIPESTATUS[0]} == 0 ]] || error
}
trap error ERR

# install fundamental packages
sudo -E apt-get -y -qq update
sudo -E apt-get -y -qq install pv
apt-get-install apt-utils build-essential curl git lsb-release wget

# MongoDB hack
dpkg -s mongodb || echo "ok"; export HAVE_MONGO_DB=$?
if [ $HAVE_MONGO_DB == 0 ]; then sudo apt-get remove --purge -qq -y mongodb mongodb-10gen || echo "ok"; fi
if [ $HAVE_MONGO_DB == 0 ]; then sudo apt-get install -qq -y mongodb-clients mongodb-server -o Dpkg::Options::="--force-confdef" || echo "ok"; fi # default actions
if [ $HAVE_MONGO_DB == 0 ]; then apt-get-install mongodb-clients mongodb-server -o Dpkg::Options::="--force-confdef" || echo "ok"; fi # default actions

### before_install: # Use this to prepare the system to install prerequisites or dependencies
# Define some config vars
Expand All @@ -26,14 +35,14 @@ sudo sh -c 'echo "deb http://packages.ros.org/ros-shadow-fixed/ubuntu `lsb_relea
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update -qq
sudo apt-get install -y --force-yes -q -qq dpkg # https://github.com/travis-ci/travis-ci/issues/9361#issuecomment-408431262 dpkg-deb: error: archive has premature member 'control.tar.xz' before 'control.tar.gz' #9361
sudo apt-get install -qq -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin ros-$ROS_DISTRO-rosbash
apt-get-install python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin ros-$ROS_DISTRO-rosbash

if [ "$EXTRA_DEB" ]; then sudo apt-get install -qq -y $EXTRA_DEB; fi
if [ "$EXTRA_DEB" ]; then apt-get-install $EXTRA_DEB; fi
###
pkg=$TEST_PACKAGE
sudo apt-get install -y ros-$ROS_DISTRO-$pkg
apt-get-install ros-$ROS_DISTRO-$pkg

sudo apt-get install -y -qq ros-$ROS_DISTRO-rqt-robot-dashboard
apt-get-install ros-$ROS_DISTRO-rqt-robot-dashboard

#
source /opt/ros/$ROS_DISTRO/setup.bash
Expand All @@ -54,8 +63,8 @@ if [ "$TEST_TYPE" == "work_with_downstream" ]; then
sudo dpkg -r --force-depends ros-$ROS_DISTRO-rtmbuild
# https://github.com/start-jsk/rtmros_hironx/issues/287
sudo sed -i s@test_tf_and_controller@_test_tf_and_controller@ /opt/ros/$ROS_DISTRO/share/hironx_ros_bridge/test/test_hironx_ros_bridge.py
catkin_make $ROS_PARALLEL_JOBS
catkin_make install $ROS_PARALLEL_JOBS
catkin_make $ROS_PARALLEL_JOBS | grep -v '^-- \(Up-to-date\|Installing\):' | grep -v 'Generating \(Python\|C++\) code from' | grep -v '^Compiling .*.py ...$' | uniq
catkin_make install $ROS_PARALLEL_JOBS | grep -v '^-- \(Up-to-date\|Installing\):' | grep -v 'Generating \(Python\|C++\) code from' | grep -v '^Compiling .*.py ...$' | uniq
else
echo "
#
Expand All @@ -80,8 +89,8 @@ else
sed -i "s@install(@dummy_install(@g" src/rtmros_common/${_pkg}/catkin.cmake
fi
done
catkin_make $ROS_PARALLEL_JOBS --only-pkg-with-deps `echo $pkg | sed s/-/_/g`
catkin_make install $ROS_PARALLEL_JOBS
catkin_make $ROS_PARALLEL_JOBS --only-pkg-with-deps `echo $pkg | sed s/-/_/g` | grep -v '^-- \(Up-to-date\|Installing\):' | grep -v 'Generating \(Python\|C++\) code from' | grep -v '^Compiling .*.py ...$' | uniq
catkin_make install $ROS_PARALLEL_JOBS | grep -v '^-- \(Up-to-date\|Installing\):' | grep -v 'Generating \(Python\|C++\) code from' | grep -v '^Compiling .*.py ...$' | uniq
# make sure to kill test
for _pkg in hrpsys_ros_bridge hrpsys_tools rtmbuild; do
rm -fr install/lib/${_pkg}
Expand All @@ -102,11 +111,11 @@ else
find $pkg_path/test -iname "*.test" -print0 | xargs -0 -n1 rostest || export EXIT_STATUS=$?;
fi

if [ -e build ]; then find build -name LastTest.log -exec echo "==== {} ====" \; -exec cat {} \; ; fi
if [ -e ${HOME}/.ros/test_results ]; then find ${HOME}/.ros/test_results -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi
#if [ -e build ]; then find build -name LastTest.log -exec echo "==== {} ====" \; -exec cat {} \; ; fi
if [ $EXIT_STATUS == 0 ] ; then
return 0
else
if [ -e ${HOME}/.ros/test_results ]; then find ${HOME}/.ros/test_results -type f -exec echo "=== {} ===" \; -exec cat {} \; ; fi
exit 1
fi

Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
limbs)
(let ((av1 (send *sr* :angle-vector))
(ctype (read-from-string (format nil "~A-controller" limb))))
;; fix for https://github.com/fkanehiro/hrpsys-base/pull/1297
;; need to send reset-pose to default sequence controller
(send *ri* :angle-vector av0 500)
(send *ri* :wait-interpolation)
;; Send pose just for specific limb controller
(send *ri* :angle-vector (send *sr* :angle-vector) 200 ctype)
(send *ri* :wait-interpolation ctype)
Expand Down
2 changes: 1 addition & 1 deletion openrtm_tools/scripts/rtmlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Here 3 things are happening:
3. Specify rtconnect tag with connecting components info.
'''

from openrtm_tools import rtmstart, rtmlaunch
from openrtm_tools import rtmstart, rtmlaunchlib
from rosgraph import names
import roslaunch, sys

Expand Down
4 changes: 2 additions & 2 deletions openrtm_tools/scripts/rtmlaunch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

from openrtm_tools import rtmlaunch
from openrtm_tools import rtmlaunchlib

import signal, sys
def signal_handler(signum, frame):
Expand All @@ -10,7 +10,7 @@ def signal_handler(signum, frame):

if __name__ == '__main__':
signal.signal(signal.SIGINT, signal_handler)
rtmlaunch.main()
rtmlaunchlib.main()



Expand Down

0 comments on commit c5b5e47

Please sign in to comment.