JuliaCI / julia-buildbot

Buildbot configuration for build.julialang.org
MIT License
19 stars 14 forks source link

Have the coverage runs output to Codecov as well #24

Closed kshyatt closed 9 years ago

kshyatt commented 9 years ago

Since we now have codecov.io working in CoverageBase, all that should be necessary is to take

analyze_cov_cmd = """
import CoverageBase
using Coverage, HDF5, JLD
cd(joinpath(CoverageBase.julia_top()))
results=Coveralls.process_folder("base")
save("coverage.jld", "results", results)
"""

merge_cov_cmd = """
using Coverage, CoverageBase, HDF5, JLD, Compat
cd(joinpath(CoverageBase.julia_top()))
r1 = load("coverage_noninlined.jld", "results")
r2 = load("coverage_inlined.jld", "results")
r = CoverageBase.merge_coverage(r1, r2)
git_info = @compat Dict(
    "branch" => Base.GIT_VERSION_INFO.branch,
    "remotes" => [
        @compat Dict(
            "name" => "origin",
            "url" => "https://github.com/JuliaLang/julia.git"
        )
    ],
    "head" => @compat Dict(
        "id" => Base.GIT_VERSION_INFO.commit,
        "message" => "%(prop:commitmessage)s",
        "committer_name" => "%(prop:commitname)s",
        "committer_email" => "%(prop:commitemail)s",
        "author_name" => "%(prop:authorname)s",
        "author_email" => "%(prop:authoremail)s",
    )
)
println("git_info: ")
println(git_info)
Coveralls.submit_token(r, git_info)
"""

to

analyze_cov_cmd = """
import CoverageBase
using Coverage, HDF5, JLD
cd(joinpath(CoverageBase.julia_top()))
results=Codecov.process_folder("base")
save("coverage.jld", "results", results)
"""

merge_cov_cmd = """
using Coverage, CoverageBase, HDF5, JLD, Compat
cd(joinpath(CoverageBase.julia_top()))
r1 = load("coverage_noninlined.jld", "results")
r2 = load("coverage_inlined.jld", "results")
r = CoverageBase.merge_coverage(r1, r2)

Codecov.submit_token(r, git_info)
"""

I think we may not need the full git info that Coveralls needed. We can test it out and see. The codecov stuff runs off the same .cov files as the Coveralls stuff so we only need to run the tests once. We don't yet have a codecov.io repo set up for JuliaLang/julia but that's a 1 minute process.

tkelman commented 9 years ago

Better as a PR?

kshyatt commented 9 years ago

My hope was that someone else would do the work of actually testing that out, but yes, probably.

tkelman commented 9 years ago

laziness fight between us and @staticfloat? dunno where I'd put my money there

staticfloat commented 9 years ago

laziness fight between us and @staticfloat? dunno where I'd put my money there

Hah!

How does #25 look to you guys?

staticfloat commented 9 years ago

So we've got a failure:

ERROR: MethodError: `getindex` has no method matching getindex(::Tuple{ASCIIString,Array{Union{Int64,Void},1}}, ::ASCIIString)
Closest candidates are:
  getindex(::Tuple, !Matched::Int64)
  getindex(::Tuple, !Matched::Real)
  getindex(::Tuple, !Matched::AbstractArray{Bool,N})
  ...
 in todict at /home/ubuntu/.julia/v0.4/CoverageBase/src/CoverageBase.jl:75
 in merge_coverage at /home/ubuntu/.julia/v0.4/CoverageBase/src/CoverageBase.jl:59
 in process_options at ./client.jl:282
 in _start at ./client.jl:406

Did I screw something up, or does CoverageBase need to be altered?

tkelman commented 9 years ago

@IainNZ needs to tag Coverage.jl

IainNZ commented 9 years ago

Doing now.

tkelman commented 9 years ago

thanks

tkelman commented 9 years ago

I may have been wrong about that, it might still be failing the merge step even after Coverage was tagged?

tkelman commented 9 years ago

Working now?