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

several improvements #33

Merged
merged 14 commits into from
May 1, 2018
Merged

several improvements #33

merged 14 commits into from
May 1, 2018

Conversation

rhaschke
Copy link
Contributor

@rhaschke rhaschke commented Apr 28, 2018

This PR is actually a merge of several branches (to resolve conflicts).

  1. Enabling assertions in Travis build - replacement for Use debug build #25
    To enable assertions, Use debug build #25 originally suggested a Debug build. However, this unneccessarily slows down the unit tests, thus running out of Travis time.
    My suggestion is to just enable assertions, but keep optimizations.
  2. Running clang-format directly within Travis - replacement for run clang-format outside docker container #31.
    The clang-format check doesn't need to be run within a docker container, which is more time-consuming and requires to define variables ROS_DISTRO and ROS_REPO.
  3. General improvements
    • Some fixes to the utility functions in util.sh
    • Enable folding and timing for the main build job too.
    • Only run the full MoveIt! build once. All other test cases can be done with an empty .rosinstall.
    • rename my_travis_wait -> travis_run_wait
  4. Use xvfb to allow for X11-based unittests - replacement for Allow (simulated) display to be used with ci builds #1
  5. New attempt to get rid of weird message - replacement for Fix travis_wait command #26 / cleanup my_travis_wait #32
    /root/moveit/.moveit_ci/util.sh: line 136: 677 Terminated travis_jigger $! $timeout $cmd
    This message originates from bash's job control and can be suppressed as discussed here.
    This works for me locally, but not in Travis.

I suggest to manually push-forward the master branch to keep the branch history.

Copy link
Member

@davetcoleman davetcoleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks like great improvements!

.travis.yml Outdated
script:
- source .moveit_ci/travis.sh # this is intended only for the repo moveit_ci, other repos should use the .travis.yml script in the README.md
- ./travis.sh # this is intended only for the repo moveit_ci, other repos should use the .travis.yml script in the README.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing this will break all the repos using moveit_ci currently - is this necessary? i don't see what the advantage of this is. there could be some that are not under ros-planning

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes needed for repositories using moveit_ci. However, we can use the same syntax as in external repos here too and I will change this accordingly.

README.md Outdated
- ROS_DISTRO=kinetic ROS_REPO=ros UPSTREAM_WORKSPACE=https://raw.githubusercontent.com/ros-planning/moveit/kinetic-devel/moveit.rosinstall
- ROS_DISTRO=kinetic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=https://raw.githubusercontent.com/ros-planning/moveit/kinetic-devel/moveit.rosinstall
- TEST=clang-format
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does moving this to the top will prevent other tests from running if clang fails? so this saves time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just nicer formatting. No functional implications.

travis.sh Outdated
exit 0 # This runs as an independent job, do not run regular travis test
;;
esac
done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by skipping docker you run the risk that the ubuntu version that travis is using could be out of date (it was 12.04 for a very long time) and that the exact command isn't available on certain OSes:

apt-get -qq install -y clang-format-3.8

I'm not convinced loading a docker container for this is that big a cost... they are cached on Travis anyway and pre-built by dockerhub

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a minute extra or so. Sure, not that big a cost.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you don't need to specify ROS_DISTRO and ROS_REPO environment variables needed to run the docker container.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevertheless, I reverted this part.

travis_run apt-get -qq install xvfb mesa-utils
Xvfb -screen 0 640x480x24 :99 &
export DISPLAY=:99.0
travis_run_true glxinfo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

@@ -145,13 +151,13 @@ travis_run rosdep install -y -q -n --from-paths . --ignore-src --rosdistro $ROS_
travis_run cd $CATKIN_WS

# Configure catkin
travis_run catkin config --extend /opt/ros/$ROS_DISTRO --install --cmake-args -DCMAKE_BUILD_TYPE=Release
travis_run catkin config --extend /opt/ros/$ROS_DISTRO --install --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-O3"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the logic for building in very optimized mode? my understanding is that it is risky

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the default of cmake, but with -DNDEBUG removed.

util.sh Outdated

let "TRAVIS_FOLD_COUNTER += 1"
#######################################
# Same as travis_run except ignores errors and does not break build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update comment


return $result
}

#######################################
function my_travis_jigger() {
# helper method for travis_wait()
function travis_jigger() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm nervous there might be a naming conflict with travis' default scripts, but i can't remember if they have a travis_jigger. i found various similar functions though:
https://github.com/matomo-org/travis-scripts/blob/master/travis-helper.sh#L34

something to look out for

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked fine.

@rhaschke
Copy link
Contributor Author

rhaschke commented May 1, 2018

@davetcoleman I addressed your comments. If you approved, I will move the cleanup commits into their respective branches and perform the final merge.

@davetcoleman
Copy link
Member

I'm not sure what you mean by "move cleanup commits to respective branches"... merging this single PR seems fine to me...?

@rhaschke rhaschke merged commit 31cd910 into moveit:master May 1, 2018
@rhaschke
Copy link
Contributor Author

rhaschke commented May 1, 2018

@davetcoleman Thanks for approving. I just re-ordered the commits as I like to the commit history to be grouped semantically and not by time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants