Skip to content

Do not build docs in try builds #111660

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

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ jobs:
actions: write
name: "try - ${{ matrix.name }}"
env:
DIST_TRY_BUILD: 1
CI_JOB_NAME: "${{ matrix.name }}"
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
SCCACHE_BUCKET: rust-lang-ci-sccache2
Expand Down
1 change: 1 addition & 0 deletions src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ docker \
--env RUST_CI_OVERRIDE_RELEASE_CHANNEL \
--env CI_JOB_NAME="${CI_JOB_NAME-$IMAGE}" \
--env BASE_COMMIT="$BASE_COMMIT" \
--env DIST_TRY_BUILD \
--init \
--rm \
rust-ci \
Expand Down
1 change: 1 addition & 0 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ jobs:
<<: *base-ci-job
name: try - ${{ matrix.name }}
env:
DIST_TRY_BUILD: 1
<<: [*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'
strategy:
Expand Down
13 changes: 13 additions & 0 deletions src/ci/stage-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@

LLVM_BOLT_CRATES = LLVM_PGO_CRATES


def is_try_build() -> bool:
return os.environ.get("DIST_TRY_BUILD", "0") != "0"


class Pipeline:
# Paths
def checkout_path(self) -> Path:
Expand Down Expand Up @@ -851,6 +856,13 @@ def run(runner: BenchmarkRunner):

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()
pipeline = create_pipeline()

Expand All @@ -865,6 +877,7 @@ def run(runner: BenchmarkRunner):

print_binary_sizes(pipeline)


if __name__ == "__main__":
runner = DefaultBenchmarkRunner()
run(runner)