mirror of
https://github.com/servo/servo.git
synced 2025-07-27 17:20:36 +01:00
Collect build timings on GitHub CI
This will help to investigate slow builds on GitHub.
This commit is contained in:
parent
befb472c9d
commit
e679e1f793
5 changed files with 44 additions and 19 deletions
|
@ -393,9 +393,7 @@ class MachCommands(CommandBase):
|
|||
expr = "s#libdir=.*#libdir=%s#g" % gst_lib_path
|
||||
subprocess.call(["perl", "-i", "-pe", expr, pc])
|
||||
|
||||
# https://internals.rust-lang.org/t/exploring-crate-graph-build-times-with-cargo-build-ztimings/10975
|
||||
# Prepend so that e.g. `-Ztimings` (which means `-Ztimings=info,html`)
|
||||
# given on the command line can override it
|
||||
# Gather Cargo build timings (https://doc.rust-lang.org/cargo/reference/timings.html).
|
||||
opts = ["--timings"] + opts
|
||||
|
||||
if very_verbose:
|
||||
|
|
|
@ -245,24 +245,27 @@ class MachCommands(CommandBase):
|
|||
|
||||
packages.discard('stylo')
|
||||
|
||||
if len(packages) > 0 or len(in_crate_packages) > 0:
|
||||
args = []
|
||||
for crate in packages:
|
||||
args += ["-p", "%s_tests" % crate]
|
||||
for crate in in_crate_packages:
|
||||
args += ["-p", crate]
|
||||
args += test_patterns
|
||||
# Return if there is nothing to do.
|
||||
if len(packages) == 0 and len(in_crate_packages) == 0:
|
||||
return 0
|
||||
|
||||
if nocapture:
|
||||
args += ["--", "--nocapture"]
|
||||
# Gather Cargo build timings (https://doc.rust-lang.org/cargo/reference/timings.html).
|
||||
args = ["--timings"]
|
||||
for crate in packages:
|
||||
args += ["-p", "%s_tests" % crate]
|
||||
for crate in in_crate_packages:
|
||||
args += ["-p", crate]
|
||||
args += test_patterns
|
||||
|
||||
err = self.run_cargo_build_like_command("bench" if bench else "test",
|
||||
args,
|
||||
env=self.build_env(test_unit=True),
|
||||
with_layout_2020=with_layout_2020,
|
||||
**kwargs)
|
||||
if err:
|
||||
return err
|
||||
if nocapture:
|
||||
args += ["--", "--nocapture"]
|
||||
|
||||
return self.run_cargo_build_like_command(
|
||||
"bench" if bench else "test",
|
||||
args,
|
||||
env=self.build_env(test_unit=True),
|
||||
with_layout_2020=with_layout_2020,
|
||||
**kwargs)
|
||||
|
||||
@Command('test-content',
|
||||
description='Run the content tests',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue