Do not build components unneeded for perf bot in try builds
This commit is contained in:
parent
871b595202
commit
db113b1c2b
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -578,6 +578,7 @@ jobs:
|
|||||||
actions: write
|
actions: write
|
||||||
name: "try - ${{ matrix.name }}"
|
name: "try - ${{ matrix.name }}"
|
||||||
env:
|
env:
|
||||||
|
DIST_TRY_BUILD: 1
|
||||||
CI_JOB_NAME: "${{ matrix.name }}"
|
CI_JOB_NAME: "${{ matrix.name }}"
|
||||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
||||||
SCCACHE_BUCKET: rust-lang-ci-sccache2
|
SCCACHE_BUCKET: rust-lang-ci-sccache2
|
||||||
|
@ -264,6 +264,7 @@ docker \
|
|||||||
--env RUST_CI_OVERRIDE_RELEASE_CHANNEL \
|
--env RUST_CI_OVERRIDE_RELEASE_CHANNEL \
|
||||||
--env CI_JOB_NAME="${CI_JOB_NAME-$IMAGE}" \
|
--env CI_JOB_NAME="${CI_JOB_NAME-$IMAGE}" \
|
||||||
--env BASE_COMMIT="$BASE_COMMIT" \
|
--env BASE_COMMIT="$BASE_COMMIT" \
|
||||||
|
--env DIST_TRY_BUILD \
|
||||||
--init \
|
--init \
|
||||||
--rm \
|
--rm \
|
||||||
rust-ci \
|
rust-ci \
|
||||||
|
@ -757,6 +757,7 @@ jobs:
|
|||||||
<<: *base-ci-job
|
<<: *base-ci-job
|
||||||
name: try - ${{ matrix.name }}
|
name: try - ${{ matrix.name }}
|
||||||
env:
|
env:
|
||||||
|
DIST_TRY_BUILD: 1
|
||||||
<<: [*shared-ci-variables, *prod-variables]
|
<<: [*shared-ci-variables, *prod-variables]
|
||||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -48,6 +48,11 @@ RUSTC_PGO_CRATES = [
|
|||||||
|
|
||||||
LLVM_BOLT_CRATES = LLVM_PGO_CRATES
|
LLVM_BOLT_CRATES = LLVM_PGO_CRATES
|
||||||
|
|
||||||
|
|
||||||
|
def is_try_build() -> bool:
|
||||||
|
return os.environ.get("DIST_TRY_BUILD", "0") != "0"
|
||||||
|
|
||||||
|
|
||||||
class Pipeline:
|
class Pipeline:
|
||||||
# Paths
|
# Paths
|
||||||
def checkout_path(self) -> Path:
|
def checkout_path(self) -> Path:
|
||||||
@ -851,6 +856,13 @@ def run(runner: BenchmarkRunner):
|
|||||||
|
|
||||||
build_args = sys.argv[1:]
|
build_args = sys.argv[1:]
|
||||||
|
|
||||||
|
# Skip components that are not needed for try builds to speed them up
|
||||||
|
if is_try_build():
|
||||||
|
LOGGER.info("Skipping building of unimportant components for a try build")
|
||||||
|
for target in ("rust-docs", "rustc-docs", "rust-docs-json", "rust-analyzer",
|
||||||
|
"rustc-src", "clippy", "miri", "rustfmt"):
|
||||||
|
build_args.extend(["--exclude", target])
|
||||||
|
|
||||||
timer = Timer()
|
timer = Timer()
|
||||||
pipeline = create_pipeline()
|
pipeline = create_pipeline()
|
||||||
|
|
||||||
@ -865,6 +877,7 @@ def run(runner: BenchmarkRunner):
|
|||||||
|
|
||||||
print_binary_sizes(pipeline)
|
print_binary_sizes(pipeline)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
runner = DefaultBenchmarkRunner()
|
runner = DefaultBenchmarkRunner()
|
||||||
run(runner)
|
run(runner)
|
||||||
|
Loading…
Reference in New Issue
Block a user