-
Notifications
You must be signed in to change notification settings - Fork 39
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
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked fine.
@davetcoleman I addressed your comments. If you approved, I will move the cleanup commits into their respective branches and perform the final merge. |
I'm not sure what you mean by "move cleanup commits to respective branches"... merging this single PR seems fine to me...? |
This reverts commit 19dcebc.
- use local variables where possible - correctly unset variables TRAVIS_START_TIME, TRAVIS_TIME_ID, TRAVIS_FOLD_NAME - travis_run_true as variant of travis_run
@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. |
This PR is actually a merge of several branches (to resolve conflicts).
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.
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
andROS_REPO
.util.sh
.rosinstall
.my_travis_wait
->travis_run_wait
/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.