Closed esteve closed 10 years ago
This seems to work, there's actually a failing test so Travis reports that the build wasn't successful. I'll fix the test in a separate branch and get back to this one to make sure that the rest of the steps are correct.
@wjwwood I reverted my changes and integrated yours. I think we should use catkin_make, though, the more we dogfood on our own tools, the better IMHO. Let's see if this makes the testsuite fail too, it's rather strange that it fails randomly.
@esteve we can certainly use catkin_make
, but it just automation of cmake ... && make
, so sometimes I just use CMake and Make directly for a single package. This is especially useful for single packages because you don't have to setup a workspace, and setting up the workspace on travis is a bit wonky because you already have the source code checked out at the root of your travis instance. Using catkin_make
would look like this:
cd ${BUILD_DIR} && catkin_make --source ${SRC_DIR}
cd ${BUILD_DIR} && catkin_make --source ${SRC_DIR} tests
cd ${BUILD_DIR} && catkin_make --source ${SRC_DIR} run_tests
catkin_test_results ${BUILD_DIR}
Or actually, it should have to be more like this, because you need the source to be in a folder which can have the CMakeLists.txt
top-level CMake file for a catkin workspace:
cd ${BUILD_DIR} && mkdir src
ln -s ${SRC_DIR} ${BUILD_DIR}/src
cd ${BUILD_DIR} && catkin_make
cd ${BUILD_DIR} && catkin_make tests
cd ${BUILD_DIR} && catkin_make run_tests
catkin_test_results ${BUILD_DIR}
It is easy to forget that catkin packages are just CMake projects, and need no special tooling. We made catkin_make
just to help automate the process and put in sane default settings for new users.
Oh I see that you basically had the same thing before you reverted. I should have looked at the commits first.
@wjwwood Yep, I had that code in the commits :-) Though it's strange that it now works, but not with catkin_make
@wjwwood Is there anything under the hood that catkin_make
does that cmake
doesn't? This build [1] finished, but the previous one [2] failed, despite both having the same tests and the same code.
1 - https://travis-ci.org/osrf/capabilities/builds/16662412
2 - https://travis-ci.org/osrf/capabilities/builds/16155234#L1321
I think I partially addressed this in https://github.com/osrf/capabilities/commit/c23d549dc64e7643069cd809745087cc5d09053b#diff-b67911656ef5d18c4ae36cb6741b7965R24
Looks like it needs to be rebased.
@wjwwood Just pushed a rebase and all the tests pass, I think it's safe to merge it.
For some reason coveralls is not commenting here, but coverage is 100%.
Plain CMake works, but using our own tools (such as catkin) will help users understand the ROS workflow better.