Skip to content
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

move BaseBenchmarks add/checkout logic to post-build step #33

Merged
merged 1 commit into from
May 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions src/jobs/BenchmarkJob.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,6 @@ function Base.run(job::BenchmarkJob)
node = myid()
cfg = submission(job).config

# update BaseBenchmarks for all supported Julia versions
nodelog(cfg, node, "updating local BaseBenchmarks repo")
branchname = cfg.testmode ? "test" : "nanosoldier"
oldpwd = pwd()
versiondirs = ("v0.4", "v0.5", "v0.6")
for v in versiondirs
cd(joinpath(homedir(), ".julia", v, "BaseBenchmarks"))
run(`git fetch --all --quiet`)
run(`git reset --hard --quiet origin/$(branchname)`)
end
cd(oldpwd)

# make temporary directory for job results
# Why not create the job's actual report directory now instead? The answer is that
# the commit SHA that currently describes the job might change if we find out that
Expand Down Expand Up @@ -275,6 +263,16 @@ function execute_benchmarks!(job::BenchmarkJob, whichbuild::Symbol)
# update local Julia packages for the relevant Julia version
run(`$juliapath -e 'Pkg.update()'`)

# add/update BaseBenchmarks for the relevant Julia version + use branch specified by cfg
nodelog(cfg, node, "updating local BaseBenchmarks repo")
branchname = cfg.testmode ? "test" : "nanosoldier"
oldpwd = pwd()
run(`$juliapath -e 'Pkg.add("BaseBenchmarks")'`)
cd(readstring(`$juliapath -e 'print(Pkg.dir("BaseBenchmarks"))'`))
run(`git fetch --all --quiet`)
run(`git reset --hard --quiet origin/$(branchname)`)
cd(oldpwd)

# The following code sets up a CPU shield, then spins up a new julia process on the
# shielded CPU that runs the benchmarks. The results from this new process are
# then serialized to a JLD file so that we can retrieve them.
Expand Down