-
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
Add codecov.io support #96
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.
As I commented over on the moveit PR that uses this, the codecov.io report it generates is from the wrong base directory and does not show a report on any of the source files in the moveit repo.
https://codecov.io/gh/ros-planning/moveit/tree/edf504374309899cc14da451a8f69688d936e1bf
I'm not sure why it isn't working but it is not generating a coverage report for the moveit repository instead it is only header files found in install/include
(all packages, including dependencies) and some source files from the geometric_shapes project.
Also, I'm opposed to taking the shortcut of only running our tests with optimization. This seems like an oversight that diminishes the quality of CI reporting. If the optimizer optimizes out a section of code with a bug in it and CI passes that seems just as bad as not having CI only run with a debug build as you won't catch bugs introduced because the optimizer step did something unintended. This situation could cause a really frustrating situation where someone is using a debug build of the library to fix a bug in their code and instead has to debug issues introduced because CI never runs in Debug mode. I think we should debug why ccache getting low hit rates instead. The point of coverage reporting is to make CI give more useful feedback to each PR, it is not just about putting a badge in the readme. Lastly, I don't like that we are setting build options with environment variables inside the travis script. The problem with this is if someone builds and runs the tests without using this script they will get a different build. If we want to build our tests with specific build options those should be called out in the cmake files and not in this bash script. Specifically enabling warnings and setting warnings as errors should just be set as the default option in the cmake files for all builds so when someone is building while they are developing a feature they fix those issues before they submit their code to wait on CI. Ideally all build configuration for the project is done in the cmake files and the test environment is exactly the same as the environment used by someone developing against the library and developing for the library. |
Sorry, but I don't agree with most of your writing:
I agree with you, though that we should debug the ccache performance drop in debug mode. |
I have seen a case where a whole block of code was optimized out because it was deemed to not matter by the optimizer with -O3 that had a runtime bug in it that was only found when running tests with a debug build. I will admit that that is much rarer than code that works under debug but doesn't perform as expected with optimizations. |
I would argue that |
Passing configuration to catkin as arguments to cmake is different imho than setting build options via environment variables. I'm not arguing that you shouldn't have different build targets, just that configuration that applies build settings should be specified in the build system and not in a script that runs the build system. At this point I will have to admit that I don't like catkin either and think that having a wrapper around cmake is silly. |
I tested this locally and confirmed this is some issue with codecov.io as you reported in the other pr. Hopefully they can fix that soon. I also tested ccache and I can't reproduce the low cache hits locally :/ I think it has something to do with travis and I don't know yet how to debug that. |
In principle I agree, but I propose another method to ensure that, namely asking developers to configure their development environment appropriately. @davetcoleman, we should discuss this on the next maintainer meeting. |
I got yours to work with one small change... https://codecov.io/gh/ros-planning/moveit/pull/1787/tree |
I tried to create a pull request against this PR by making one against your branch. |
If you accept my small change I vote we submit this and debug the ccache issues in a new PR. |
@tylerjw, thanks a lot for finally solving this issue. |
Further improvement of #91:
I successfully tested this on MoveIt and rviz. From my point of view this is ready for merging.
@tylerjw, @davetcoleman: Please have a look.