Skip to content

Commit

Permalink
Use install space by default (addresses ros-industrial#54).
Browse files Browse the repository at this point in the history
  • Loading branch information
130s committed Jun 4, 2016
1 parent ef24401 commit ba6a1bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ FAQ
What are checked?
------------------------------------

List of the checked items, in the actual order to be run.
List of the checked items by default, in the actual order to be run. See the `list of optional environment variables <https://github.com/ros-industrial/industrial_ci/blob/master/README.rst#optional-environment-variables>`_ to customize the items.

1. If your package builds.
1. If your package builds (into `install` space by default).
2. If available tests pass in the package. Because tests use software from `install` space, it is important the building step ends without issues (otherwise tests may not be reached).
3. If your package gets installed (i.e. built artifact goes into the `install` space).
4. If tests in designated downstream packages pass.
Expand Down Expand Up @@ -129,6 +129,7 @@ Note that some of these currently tied only to a single option, but we still lea
* `TARGET_PKGS` (default: not set): Used to fill `PKGS_DOWNSTREAM` if it is not set. If not set packages are set using the output of `catkin_topological_order` for the source space.
* `UPSTREAM_WORKSPACE` (default: debian): When this is set `file`, the dependended packages that need to be built from source are downloaded based on a `.rosinstall` file in your repository. Use `$ROSINSTALL_FILENAME` to specify the file name. See more in `this section <https://github.com/ros-industrial/industrial_ci/blob/master/README.rst#optional-build-depended-packages-from-source>`_.
* `USE_DEB` (*DEPRECATED*: use `UPSTREAM_WORKSPACE` instead. default: true): if `true`, `UPSTREAM_WORKSPACE` will be set as `debian`. if `false`, `file` will be set. See `UPSTREAM_WORKSPACE` section for more info.
* `USE_DEVEL_SPACE` (default: false): If `true`, `devel space <http://wiki.ros.org/catkin/workspaces#Development_.28Devel.29_Space>`_ will be used for checking if packages can be built, separately from checking installability.

Note: You see some `*PKGS*` variables. These make things very flexible but in normal usecases you don't need to be bothered with them - just keep them blank.

Expand Down
11 changes: 8 additions & 3 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ travis_time_start init_travis_environment
BUILDER=catkin
ROSWS=wstool
export DOWNSTREAM_REPO_NAME=${PWD##*/}
if [ ! "$USE_DEVEL_SPACE" == "true" ]; then export CATKIN_TOOLS_CONFIG_ARGS="--install"; fi # when using devel space, nothing will be set.
if [ ! "$CATKIN_PARALLEL_JOBS" ]; then export CATKIN_PARALLEL_JOBS="-p4"; fi
if [ ! "$CATKIN_PARALLEL_TEST_JOBS" ]; then export CATKIN_PARALLEL_TEST_JOBS="$CATKIN_PARALLEL_JOBS"; fi
if [ ! "$ROS_PARALLEL_JOBS" ]; then export ROS_PARALLEL_JOBS="-j8"; fi
Expand Down Expand Up @@ -253,7 +254,11 @@ source /opt/ros/$ROS_DISTRO/setup.bash # re-source setup.bash for setting enviro
# for catkin
if [ "${TARGET_PKGS// }" == "" ]; then export TARGET_PKGS=`catkin_topological_order ${CI_SOURCE_PATH} --only-names`; fi
if [ "${PKGS_DOWNSTREAM// }" == "" ]; then export PKGS_DOWNSTREAM=$( [ "${BUILD_PKGS// }" == "" ] && echo "$TARGET_PKGS" || echo "$BUILD_PKGS"); fi
if [ "$BUILDER" == catkin ]; then catkin build -i -v --summarize --no-status $BUILD_PKGS $CATKIN_PARALLEL_JOBS --make-args $ROS_PARALLEL_JOBS ; fi
if [ "$BUILDER" == catkin ]; then
catkin init
catkin config $CATKIN_TOOLS_CONFIG_ARGS
catkin build -i -v --summarize --no-status $BUILD_PKGS $CATKIN_PARALLEL_JOBS --make-args $ROS_PARALLEL_JOBS
fi

travis_time_end # catkin_build

Expand Down Expand Up @@ -282,9 +287,9 @@ if [ "$NOT_TEST_INSTALL" != "true" ]; then
travis_time_start catkin_install_build

# Test if the packages in the downstream repo build.
if [ "$BUILDER" == catkin ]; then
if [ "$BUILDER" == catkin ] && [ "$USE_DEVEL_SPACE" == "true" ]; then
catkin clean --yes
catkin config --install
catkin config --install $CATKIN_TOOLS_CONFIG_ARGS
catkin build -i -v --summarize --no-status $BUILD_PKGS $CATKIN_PARALLEL_JOBS --make-args $ROS_PARALLEL_JOBS
source install/setup.bash
rospack profile
Expand Down

0 comments on commit ba6a1bb

Please sign in to comment.