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

use precompiled rustc for non-dist builders #122709

Merged
merged 12 commits into from
Oct 8, 2024

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Mar 18, 2024

Makes non-dist builders to use precompiled CI rustc by default if they are available for the target triple.

As we are going to make rust.download-rustc=if-unchanged default option with #119899, we need to make sure if-unchanged logic never breaks and works as expected.

As an addition, this will significantly improve the build times on CI when there's no change on the compiler.

blocker for #119899

try-job: x86_64-gnu-nopt
try-job: aarch64-apple

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Mar 18, 2024
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the use-precompiled-rustc-by-default branch from a080419 to 7a798d5 Compare March 18, 2024 19:21
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 18, 2024

☔ The latest upstream changes (presumably #122690) made this pull request unmergeable. Please resolve the merge conflicts.

@onur-ozkan onur-ozkan added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 24, 2024
@onur-ozkan onur-ozkan force-pushed the use-precompiled-rustc-by-default branch 2 times, most recently from 7a8706a to 7ca076d Compare April 1, 2024 13:55
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the use-precompiled-rustc-by-default branch from 7ca076d to 359b0d8 Compare April 1, 2024 14:09
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the use-precompiled-rustc-by-default branch from f581ad1 to 6f7cdd6 Compare April 1, 2024 14:45
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Apr 2, 2024
@onur-ozkan onur-ozkan force-pushed the use-precompiled-rustc-by-default branch from 8306066 to 795d92b Compare April 2, 2024 15:15
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan onur-ozkan force-pushed the use-precompiled-rustc-by-default branch 2 times, most recently from d7edc43 to 7099a13 Compare April 4, 2024 15:06
@onur-ozkan
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2024
…default, r=<try>

prefer precompiled rustc for x86_64-gnu

*-to be filled-*

blocker for rust-lang#119899
r? ghost
@bors
Copy link
Contributor

bors commented Apr 4, 2024

⌛ Trying commit 7099a13 with merge 9ec5616...

@bors
Copy link
Contributor

bors commented Apr 4, 2024

☀️ Try build successful - checks-actions
Build commit: 9ec5616 (9ec5616fdf20bd5f5381043eccffbe26506a80ff)

@onur-ozkan onur-ozkan force-pushed the use-precompiled-rustc-by-default branch from 7099a13 to 731c8eb Compare April 4, 2024 17:31
@onur-ozkan
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Apr 4, 2024

⌛ Trying commit 731c8eb with merge 3a8cf09...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2024
…default, r=<try>

prefer precompiled rustc for x86_64-gnu

*-to be filled-*

blocker for rust-lang#119899
r? ghost
@onur-ozkan
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 8, 2024
…default, r=<try>

use precompiled rustc for non-dist builders

Makes non-dist builders to use precompiled CI rustc by default if they are available for the target triple.

As we are going to make `rust.download-rustc=if-unchanged` default option with rust-lang#119899, we need to make sure `if-unchanged` logic never breaks and works as expected.

As an addition, this will significantly improve the build times on CI when there's no change on the compiler.

blocker for rust-lang#119899

try-job: x86_64-gnu-nopt
try-job: aarch64-apple
@bors
Copy link
Contributor

bors commented Oct 8, 2024

⌛ Trying commit 4082f9f with merge 47cde5e...

@bors
Copy link
Contributor

bors commented Oct 8, 2024

☀️ Try build successful - checks-actions
Build commit: 47cde5e (47cde5ec82414d45ce945e5de5e7d3937b9744b1)

@onur-ozkan
Copy link
Member Author

onur-ozkan commented Oct 8, 2024

Nothing changed (in this PR) since the last merge attempt.

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Oct 8, 2024

📌 Commit 4082f9f has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Oct 8, 2024
@bors
Copy link
Contributor

bors commented Oct 8, 2024

⌛ Testing commit 4082f9f with merge a49aefc...

@bors
Copy link
Contributor

bors commented Oct 8, 2024

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing a49aefc to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 8, 2024
@bors bors merged commit a49aefc into rust-lang:master Oct 8, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 8, 2024
@onur-ozkan onur-ozkan deleted the use-precompiled-rustc-by-default branch October 8, 2024 20:45
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a49aefc): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 775.795s -> 775.772s (-0.00%)
Artifact size: 329.57 MiB -> 329.50 MiB (-0.02%)

@lqd
Copy link
Member

lqd commented Oct 8, 2024

It may be unrelated, but it seems the test added here is failing on some of PR CI eg #131418 (comment) ?

src/ci/run.sh Show resolved Hide resolved
@jieyouxu
Copy link
Member

jieyouxu commented Oct 9, 2024

This test seems to have caused PR CI failure in #131384 (comment)

@onur-ozkan
Copy link
Member Author

It may be unrelated, but it seems the test added here is failing on some of PR CI eg #131418 (comment) ?

It seems to be related. I will look into it today.

@onur-ozkan
Copy link
Member Author

#131434 should fix that issue.

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2024
…onur-ozkan

fix `ci_rustc_if_unchanged_logic` test

Kind a typo from rust-lang#122709, which makes `ci_rustc_if_unchanged_logic` test to fail in any PR that has a change in "library" tree (e.g., rust-lang#131418 (comment)). This fixes that.

r? ghost
builder.run_step_descriptions(&Builder::get_step_descriptions(config.cmd.kind()), &[]);

let compiler_path = build.src.join("compiler");
let library_path = build.src.join("compiler");
Copy link
Member

@RalfJung RalfJung Oct 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a copy-paste mistake?

EDIT: Ah, that got fixed in #131434.

@RalfJung
Copy link
Member

RalfJung commented Oct 13, 2024

As an addition, this will significantly improve the build times on CI when there's no change on the compiler.

It will save CI time if there is no change in the compiler or the library. Which is to say, hardly ever.

Is there some issue with further discussion or so? I am a bit surprised about this change since the trade-off does not seem worth it for me.

@RalfJung
Copy link
Member

There's some discussion hidden away above by github, but sadly I could not find a summary and the PR description is apparently not up-to-date. Anyway, let's move this to an issue: #131658.

@Kobzol
Copy link
Contributor

Kobzol commented Oct 13, 2024

It will save CI time if there is no change in the compiler or the library. Which is to say, hardly ever.

Here are some brief stats of commits for the last year:

Total merge/rollup commits: 2825
Merge/rollup PRs that had no change in library nor compiler: 627 (22%)

Total % of commits that contain a change in the given directory
compiler: 1843 (65.24%)
tests: 1676 (59.33%)
library: 992 (35.12%)
src/bootstrap: 424 (15.01%)
src/librustdoc: 353 (12.50%)
src/ci: 190 (6.73%)
<rest>: 1404 (49.70%)

I'm too worried about the fragility of this code, but I'd also like to see how much CI time can this save us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.