mirror of
https://github.com/servo/servo.git
synced 2025-07-28 09:40:33 +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
8
.github/workflows/linux.yml
vendored
8
.github/workflows/linux.yml
vendored
|
@ -78,6 +78,14 @@ jobs:
|
|||
- name: Unit tests
|
||||
if: ${{ inputs.unit-tests }}
|
||||
run: python3 ./mach test-unit --release --with-${{ env.LAYOUT }}
|
||||
- name: Rename build timing
|
||||
run: cp -r target/cargo-timings target/cargo-timings-linux-${{ env.LAYOUT }}
|
||||
- name: Archive build timing
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cargo-timings
|
||||
# Using a wildcard here ensures that the archive includes the path.
|
||||
path: target/cargo-timings-*-${{ env.LAYOUT }}
|
||||
- name: Lockfile check
|
||||
run: ./etc/ci/lockfile_changed.sh
|
||||
- name: Package
|
||||
|
|
8
.github/workflows/mac.yml
vendored
8
.github/workflows/mac.yml
vendored
|
@ -70,6 +70,14 @@ jobs:
|
|||
run: python3 ./mach package --release
|
||||
- name: Package smoketest
|
||||
run: ./etc/ci/macos_package_smoketest.sh target/release/servo-tech-demo.dmg
|
||||
- name: Rename build timing
|
||||
run: cp -r target/cargo-timings target/cargo-timings-macos-${{ env.LAYOUT }}
|
||||
- name: Archive build timing
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cargo-timings
|
||||
# Using a wildcard here ensures that the archive includes the path.
|
||||
path: target/cargo-timings-*-${{ env.LAYOUT }}
|
||||
- name: Upload package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
|
8
.github/workflows/windows.yml
vendored
8
.github/workflows/windows.yml
vendored
|
@ -72,6 +72,14 @@ jobs:
|
|||
- name: Unit tests
|
||||
if: ${{ inputs.unit-tests }}
|
||||
run: python mach test-unit --release --with-${{ env.LAYOUT }}
|
||||
- name: Rename build timing
|
||||
run: cp C:\a\servo\servo\target\cargo-timings C:\a\servo\servo\target\cargo-timings-windows-${{ env.LAYOUT }} -Recurse
|
||||
- name: Archive build timing
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cargo-timings
|
||||
# Using a wildcard here ensures that the archive includes the path.
|
||||
path: target/cargo-timings-*-${{ env.LAYOUT }}
|
||||
- name: Package
|
||||
run: python mach package --release
|
||||
- name: Upload Package
|
||||
|
|
|
@ -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,8 +245,12 @@ class MachCommands(CommandBase):
|
|||
|
||||
packages.discard('stylo')
|
||||
|
||||
if len(packages) > 0 or len(in_crate_packages) > 0:
|
||||
args = []
|
||||
# Return if there is nothing to do.
|
||||
if len(packages) == 0 and len(in_crate_packages) == 0:
|
||||
return 0
|
||||
|
||||
# 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:
|
||||
|
@ -256,13 +260,12 @@ class MachCommands(CommandBase):
|
|||
if nocapture:
|
||||
args += ["--", "--nocapture"]
|
||||
|
||||
err = self.run_cargo_build_like_command("bench" if bench else "test",
|
||||
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)
|
||||
if err:
|
||||
return err
|
||||
|
||||
@Command('test-content',
|
||||
description='Run the content tests',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue