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

ci: fix explanation why LLVM download is disabled for windows-gnu #133266

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mati865
Copy link
Contributor

@mati865 mati865 commented Nov 20, 2024

Continuation of #132781

@rustbot
Copy link
Collaborator

rustbot commented Nov 20, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Nov 20, 2024
@mati865
Copy link
Contributor Author

mati865 commented Nov 20, 2024

Basically my plan is to do try build with dist so the artifacts get uploaded and then do another try but with test jobs.
If that fails, I think we should merge dist builders change only and then in later PR do the same for test jobs.

@Kobzol
Copy link
Contributor

Kobzol commented Nov 20, 2024

I would personally prefer to disable LLVM download on the dist runners, to exercise the LLVM build path regularly.

@mati865
Copy link
Contributor Author

mati865 commented Nov 20, 2024

I think dist runners always build LLVM artifacts for download (at least that appears to be the case in #132781) despite using the same environment variable.
Even if that's not the case, changing it would be a bigger change that affects all platforms.

@Kobzol
Copy link
Contributor

Kobzol commented Nov 21, 2024

Yeah, just to clarify, what I meant was that we shouldn't change the behavior on dist runners - they should always build.

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Nov 24, 2024

📌 Commit 81f25bb 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-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 24, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Nov 24, 2024

FWIW, this PR currently still enables LLVM download for the dist- builders. Not sure if that works, or if we even want to enable that.

@Mark-Simulacrum
Copy link
Member

Does it actually do that? AFAICT, the NO_DOWNLOAD_CI_LLVM there was just a no-op -- we don't ever read that outside of non-dist builds afaict (

rust/src/ci/run.sh

Lines 165 to 185 in 481b5fa

# We enable this for non-dist builders, since those aren't trying to produce
# fresh binaries. We currently don't entirely support distributing a fresh
# copy of the compiler (including llvm tools, etc.) if we haven't actually
# built LLVM, since not everything necessary is copied into the
# local-usage-only LLVM artifacts. If that changes, this could maybe be made
# true for all builds. In practice it's probably a good idea to keep building
# LLVM continuously on at least some builders to ensure it works, though.
# (And PGO is its own can of worms).
if [ "$NO_DOWNLOAD_CI_LLVM" = "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.download-ci-llvm=if-unchanged"
else
# CI rustc requires CI LLVM to be enabled (see https://github.com/rust-lang/rust/issues/123586).
NO_DOWNLOAD_CI_RUSTC=1
# When building for CI we want to use the static C++ Standard library
# included with LLVM, since a dynamic libstdcpp may not be available.
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.static-libstdcpp"
fi
if [ "$NO_DOWNLOAD_CI_RUSTC" = "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.download-rustc=if-unchanged"
fi
is all outside DEPLOY=1)

@bors r- until we settle this

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 24, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Nov 24, 2024

Sorry, you're right, I missed this, the bash scripts are a bit confusing. Then this should be fine.

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 24, 2024

📌 Commit 81f25bb 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-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 24, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 26, 2024
…=Mark-Simulacrum

ci: enble LLVM download for windows-gnu hosts

Continuation of rust-lang#132781

try-job: dist-i686-mingw
try-job: dist-x86_64-mingw
@bors
Copy link
Contributor

bors commented Nov 26, 2024

⌛ Testing commit 81f25bb with merge 4fde74c...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Nov 26, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 26, 2024
@Mark-Simulacrum
Copy link
Member

@rustbot author

Seems probably real?

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 28, 2024
@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 28, 2024
@mati865
Copy link
Contributor Author

mati865 commented Nov 28, 2024

Yeah, looks valid. I'll look into it on the weekend.

@bors
Copy link
Contributor

bors commented Nov 30, 2024

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

@mati865 mati865 force-pushed the windows-gnu-llvm-download branch from 81f25bb to 991ab24 Compare December 1, 2024 10:51
@mati865
Copy link
Contributor Author

mati865 commented Dec 1, 2024

The problem stems from the fact that dist builders have LLVM assertions disabled while test runners have assertions enabled.
On platforms like Linux this is solved by alt dist builders:

rust/src/ci/run.sh

Lines 127 to 128 in 6c76ed5

elif [ "$DEPLOY_ALT" != "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions"

Do we want to change it somehow, or shall I just update the comments to describe what really happens?

@bors
Copy link
Contributor

bors commented Dec 6, 2024

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

@alex-semenyuk
Copy link
Member

@mati865
Thanks for your contribution
From wg-triage. Do we have questions to proceed with this?

@mati865
Copy link
Contributor Author

mati865 commented Jan 20, 2025

@alex-semenyuk yes, the question I had asked in the previous comment remains unanswered.

@alex-semenyuk
Copy link
Member

@Mark-Simulacrum @Kobzol Could you please help with

The problem stems from the fact that dist builders have LLVM assertions disabled while test runners have assertions enabled. On platforms like Linux this is solved by alt dist builders:

rust/src/ci/run.sh

Lines 127 to 128 in 6c76ed5

elif [ "$DEPLOY_ALT" != "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions"

Do we want to change it somehow, or shall I just update the comments to describe what really happens?

@Mark-Simulacrum
Copy link
Member

My guess is that implies we should close this; I don't think it merits spinning up alt builders for having this enabled (the cost-benefit isn't really there I suspect).

@mati865
Copy link
Contributor Author

mati865 commented Jan 22, 2025

I will repurpose the PR to only change the comment layer today.

@mati865 mati865 force-pushed the windows-gnu-llvm-download branch from 991ab24 to 4691415 Compare January 24, 2025 17:40
@mati865
Copy link
Contributor Author

mati865 commented Jan 24, 2025

Some time has passed since I investigated this issue, but I think dist runners should work fine with downloaded LLVM.

Updated comments regarding test runners and enabled download on dist runners. I'm relatively confident it should pass now.

@Kobzol
Copy link
Contributor

Kobzol commented Jan 24, 2025

As Mark correctly said, the environment variable is simply ignored on dist builders, so this should be fine - dist builders will not download LLVM. But still, to be sure:

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 24, 2025
…=<try>

ci: enble LLVM download for windows-gnu hosts

Continuation of rust-lang#132781

try-job: dist-x86_64-mingw
try-job: dist-i686-mingw
@bors
Copy link
Contributor

bors commented Jan 24, 2025

⌛ Trying commit 4691415 with merge 17692a3...

@mati865
Copy link
Contributor Author

mati865 commented Jan 24, 2025

As Mark correctly said, the environment variable is simply ignored on non-dist builders, so this should be fine - dist builders will not download LLVM. But still, to be sure:

Ah, I forgot about that. Sorry for not going through the whole topic.
In that case I'll retitle PR and commit after try build confirms that. Still, removing it from dist builders is a net win for readability if it's a noop.
BTW I think you meant "ignored on dist builders" 😉

@bors
Copy link
Contributor

bors commented Jan 24, 2025

☀️ Try build successful - checks-actions
Build commit: 17692a3 (17692a36107aaf21135e0dbe1f46e8bcb940b359)

@Kobzol
Copy link
Contributor

Kobzol commented Jan 24, 2025

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 24, 2025

📌 Commit 4691415 has been approved by Kobzol

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-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 24, 2025
@Zalathar Zalathar changed the title ci: enble LLVM download for windows-gnu hosts ci: enable LLVM download for windows-gnu hosts Jan 25, 2025
@mati865 mati865 force-pushed the windows-gnu-llvm-download branch from 4691415 to b20bc53 Compare January 25, 2025 11:40
@mati865 mati865 changed the title ci: enable LLVM download for windows-gnu hosts ci: fix explanation why LLVM download is disabled for windows-gnu Jan 25, 2025
@mati865
Copy link
Contributor Author

mati865 commented Jan 25, 2025

Retitled PR and commit to make it reflect the true change. The previous title would give a false hope for CI time improvements.

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 S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

7 participants