-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
Nanosoldier's BenchmarkJob doesn't support such configuration. It would need to be added to the BenchmarkJob struct,
Nanosoldier.jl/src/jobs/BenchmarkJob.jl
Lines 43 to 50 in 542ba41
mutable struct BenchmarkJob <: AbstractJob | |
submission::JobSubmission # the original submission | |
tagpred::String # predicate string to be fed to @tagged | |
against::Union{BuildRef,Nothing} # the comparison build (if available) | |
date::Dates.Date # the date of the submitted job | |
isdaily::Bool # is the job a daily job? | |
skipbuild::Bool # use local julia install instead of a fresh build (for testing) | |
end |
Nanosoldier.jl/src/jobs/BenchmarkJob.jl
Lines 52 to 104 in 542ba41
function BenchmarkJob(submission::JobSubmission) | |
if haskey(submission.kwargs, :vs) | |
againststr = Meta.parse(submission.kwargs[:vs]) | |
if in(SHA_SEPARATOR, againststr) # e.g. againststr == christopher-dG/julia@e83b7559df94b3050603847dbd6f3674058027e6 | |
reporef, againstsha = split(againststr, SHA_SEPARATOR) | |
againstrepo = isempty(reporef) ? submission.config.trackrepo : reporef | |
againstbuild = commitref(submission.config, againstrepo, againstsha) | |
elseif in(BRANCH_SEPARATOR, againststr) | |
reporef, againstbranch = split(againststr, BRANCH_SEPARATOR) | |
againstrepo = isempty(reporef) ? submission.config.trackrepo : reporef | |
againstbuild = branchref(submission.config, againstrepo, againstbranch) | |
elseif in(TAG_SEPARATOR, againststr) | |
reporef, againsttag = split(againststr, TAG_SEPARATOR) | |
againstrepo = isempty(reporef) ? submission.config.trackrepo : reporef | |
againstbuild = tagref(submission.config, againstrepo, againsttag) | |
elseif againststr == SPECIAL_SELF | |
againstbuild = copy(submission.build) | |
else | |
error("invalid argument to `vs` keyword") | |
end | |
against = againstbuild | |
elseif submission.prnumber !== nothing | |
# if there is a PR number, we compare against the base branch | |
merge_base = GitHub.compare(submission.config.trackrepo, | |
"master", "refs/pull/$(submission.prnumber)/head"; | |
auth=submission.config.auth).merge_base_commit | |
against = commitref(submission.config, submission.config.trackrepo, merge_base.sha) | |
else | |
against = nothing | |
end | |
if haskey(submission.kwargs, :skipbuild) | |
skipbuild = submission.kwargs[:skipbuild] == "true" | |
else | |
skipbuild = false | |
end | |
if haskey(submission.kwargs, :isdaily) | |
isdaily = submission.kwargs[:isdaily] == "true" | |
validatate_isdaily(submission) | |
else | |
isdaily = false | |
end | |
tagpred = if isempty(submission.args) | |
"ALL" | |
else | |
first(submission.args) | |
end | |
return BenchmarkJob(submission, tagpred, against, | |
Date(submission.build.time), isdaily, skipbuild) | |
end |
Originally posted by @maleadt in JuliaCI/BaseBenchmarks.jl#305 (comment)