Skip to content

Commit

Permalink
Merge pull request #118 from traversaro/addGazeboTravis
Browse files Browse the repository at this point in the history
Add compilation of ROBOTOLOGY_USES_GAZEBO in Travis
  • Loading branch information
traversaro authored Sep 14, 2018
2 parents f418c82 + 9c018af commit 685a3df
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 14 deletions.
5 changes: 2 additions & 3 deletions .ci/install_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ apt-get install -y python-dev
# Octave
apt-get install -y liboctave-dev




# Gazebo (use distro packages to support both Ubuntu and Debian)
apt-get install -y libgazebo*-dev
2 changes: 1 addition & 1 deletion .ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ set -e

cd $TRAVIS_BUILD_DIR
mkdir build && cd build
cmake -G"${TRAVIS_CMAKE_GENERATOR}" -DROBOTOLOGY_USES_GAZEBO:BOOL=OFF -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_IHMC:BOOL=ON -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} -DNON_INTERACTIVE_BUILD:BOOL=TRUE ..
cmake -G"${TRAVIS_CMAKE_GENERATOR}" -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_IHMC:BOOL=ON -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} -DNON_INTERACTIVE_BUILD:BOOL=TRUE ..
cmake --build . --config $TRAVIS_BUILD_TYPE
28 changes: 20 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,22 @@ stage_osx:
- brew update
- brew install ccache
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
# Install dependencies
# Install dependencies available from Homebrew/core
- brew install ace asio eigen boost tinyxml swig qt5 gsl pkg-config jpeg sqlite tinyxml
- export Qt5_DIR=/usr/local/opt/qt5/lib/cmake/Qt5
# Workaround for https://github.com/travis-ci/travis-ci/issues/8826
- brew cask uninstall oclint
# Install Gazebo
- brew tap osrf/simulation
- brew install gazebo9
# Install beautifier for Xcode output
- gem install xcpretty-travis-formatter
script: &osx_script
- cd $TRAVIS_BUILD_DIR/.ci
- sh ./script.sh
- sh -c 'sh ./script.sh'
script: &osx_script_xcode
- cd $TRAVIS_BUILD_DIR/.ci
- sh -c 'sh ./script.sh | xcpretty -f `xcpretty-travis-formatter`'

# ======================
# BUILD JOBS FROM STAGES
Expand All @@ -80,18 +90,20 @@ jobs:
before_install: skip
install: *osx_install
before_script: skip
script: *osx_script
script: *osx_script_xcode
after_failure: skip
after_success: skip
after_script: skip
env:
TRAVIS_CMAKE_GENERATOR="Xcode"
TRAVIS_BUILD_TYPE="Debug"
- <<: *osx_template
compiler: clang
env:
TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
TRAVIS_BUILD_TYPE="Debug"
# Disabled for now
# - <<: *osx_template
# script: *osx_script
# compiler: clang
# env:
# TRAVIS_CMAKE_GENERATOR="Unix Makefiles"
# TRAVIS_BUILD_TYPE="Debug"


notifications:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ on Linux and macOS.**
Install Gazebo following the instructions available at http://gazebosim.org/tutorials?cat=install .
Make sure to install also the development files, i.e. `libgazebo*-dev` on Debian/Ubuntu.

**Note for macOS uses: at the moment the gazebo9 formula is available on homebrew, but it is not working. Please use the gazebo8 formula until this issue: https://github.com/robotology/robotology-superbuild/issues/52 is fixed, thanks.**

### Configuration
Once the superbuild with `ROBOTOLOGY_USES_GAZEBO` enabled has been compiled, it is necessary to append a few superbuild-specific path to the Gazebo enviromental variables:
Expand Down
10 changes: 9 additions & 1 deletion cmake/BuildICUB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ if(ROBOTOLOGY_ENABLE_ICUB_ROBOT_ETH OR ROBOTOLOGY_ENABLE_ICUB_ROBOT_CAN)
list(APPEND ICUB_DEPENDS icub-firmware-shared)
endif()

# See discussion in https://github.com/robotology/icub-main/issues/551
if (APPLE)
set(ICUBMAIN_COMPILE_SIMULATORS OFF)
else()
set(ICUBMAIN_COMPILE_SIMULATORS ON)
endif()

ycm_ep_helper(ICUB TYPE GIT
STYLE GITHUB
REPOSITORY robotology/icub-main.git
Expand Down Expand Up @@ -46,4 +53,5 @@ ycm_ep_helper(ICUB TYPE GIT
-DENABLE_icubmod_embObjSkin:BOOL=${ROBOTOLOGY_ENABLE_ICUB_ROBOT_ETH}
-DENABLE_icubmod_embObjStrain:BOOL=${ROBOTOLOGY_ENABLE_ICUB_ROBOT_ETH}
-DENABLE_icubmod_embObjVirtualAnalogSensor:BOOL=${ROBOTOLOGY_ENABLE_ICUB_ROBOT_ETH}
-DENABLE_icubmod_parametricCalibratorEth:BOOL=${ROBOTOLOGY_ENABLE_ICUB_ROBOT_ETH})
-DENABLE_icubmod_parametricCalibratorEth:BOOL=${ROBOTOLOGY_ENABLE_ICUB_ROBOT_ETH}
-DICUBMAIN_COMPILE_SIMULATORS:BOOL=${ICUBMAIN_COMPILE_SIMULATORS})

0 comments on commit 685a3df

Please sign in to comment.