-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 reporting to travis #4538
Conversation
@@ -147,7 +149,7 @@ EOF | |||
prepare_build() { | |||
on_linux verify_linux_environment | |||
|
|||
on_linux docker pull "jhass/crystal-build-$ARCH" | |||
on_linux docker pull "rx14/crystal-build-$ARCH" |
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.
TODO: get jhass/crystal-build-docker#2 merged and move back to @jhass's image.
bin/ci
Outdated
with_build_env 'make crystal spec doc' | ||
with_build_env 'make crystal doc' | ||
on_linux with_build_env 'make spec coverage_output=.build/coverage' | ||
on_osx with_build_env 'make spec' |
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.
Installing kcov on osx is pretty hard and would require compiling kcov every build. Is it worth it when the coverage on linux is likely to be the same? I think so as kcov is actually a really useful test of the debug information's accuracy.
This PR will likely help #3801 once the coverage data is correct. |
I like this, but would be better to decouple things a bit and use a Docker image to run kcov over a binary which is built on jhass docker image? I wouldn't expect changes in the Makefile to achieve this kind of reports. |
@bcardiff running coverage reports is surely something someone does locally as well as on travis. |
dfa9cf9
to
8cd1acb
Compare
Any progress on this? I've just rebased it on master since e811cf9 broke it. |
Do we want to proceed with this? This PR hasn't been touched in 2,5 years. In any case, I figure we can close this because it would probably be easier to start anew. |
I think with the debug location fixes in #8538 this PR will be viable again. This is a good stress test, anyway. |
@RX14 Wow, that's really nice! I wonder if then we could get |
That would be doable, though a generic I'm not sure if we want to "bless" |
So, do we want to move forward with this PR? 👍/👎? |
For information, Travis CI is no longer used (#10078). |
Closing. PRs for adding code coverage to our current CI setup would be welcome. |
This is currently WIP. Depends on jhass/crystal-build-docker#2. Doesn't currently work on OSX. Displays loads of errors to the build log.
This PR uses the
kcov
tool to provide coverage reports on crystal code. Example output here. I think there are bugs with the crystal debug line information, for example this empty line of documentation got 37 hits. I've seen similar impossible debug information when profiling using callgrind + kcachegrind so I suspect the issue is with crystal not kcov. I will shortly create an issue in the kcov repo reporting the ld errors in the build log.