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: Move dist-aarch64-linux to an aarch64 runner #133809

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

mrkajetanp
Copy link
Contributor

@mrkajetanp mrkajetanp commented Dec 3, 2024

Move the dist-aarch64-linux CI job to an aarch64 runner instead of cross-compiling it from an x86 one. This will make it possible to perform optimisations such as LTO, PGO and BOLT later on.

r? @Kobzol

try-job: dist-aarch64-linux
try-job: dist-x86_64-linux
try-job: dist-i686-linux

@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 Dec 3, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Dec 3, 2024

First let's see if it works, and what's the time impact :)

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 3, 2024
ci: Move dist-aarch64-linux to an aarch64 runner

Move the dist-aarch64-linux CI job to an aarch64 runner instead of cross-compiling it from an x86 one. This will make it possible to perform optimisations such as LTO, PGO and BOLT later on.

r? `@Kobzol`

try-job: dist-aarch64-linux
@bors
Copy link
Contributor

bors commented Dec 3, 2024

⌛ Trying commit 4122380 with merge 6b8022e...

@bors
Copy link
Contributor

bors commented Dec 3, 2024

☀️ Try build successful - checks-actions
Build commit: 6b8022e (6b8022ef4cbfc68ca42d9ec189f62d4c129e8685)

@Kobzol
Copy link
Contributor

Kobzol commented Dec 3, 2024

@bors try

@bors
Copy link
Contributor

bors commented Dec 3, 2024

⌛ Trying commit 4122380 with merge 3521911...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 3, 2024
ci: Move dist-aarch64-linux to an aarch64 runner

Move the dist-aarch64-linux CI job to an aarch64 runner instead of cross-compiling it from an x86 one. This will make it possible to perform optimisations such as LTO, PGO and BOLT later on.

r? `@Kobzol`

try-job: dist-aarch64-linux
@bors
Copy link
Contributor

bors commented Dec 3, 2024

☀️ Try build successful - checks-actions
Build commit: 3521911 (352191141fb3c2d284583d558f204d3299a4f7f6)

@Kobzol
Copy link
Contributor

Kobzol commented Dec 3, 2024

The cached duration now seems to be ~1h 20m. Before, it was approximately ~1h 50m, although on a free runner.

@mrkajetanp
Copy link
Contributor Author

Before meaning when it was running on the x86 runner? That would make sense given that it had to build the whole cross-compiling toolchain first I suppose.

@Kobzol
Copy link
Contributor

Kobzol commented Dec 3, 2024

Yeah, before meaning when it was cross-compiling, and also running on a 4-core machine (vs now running on a 8-core machine). The costs of the ARM machine is quite different to us than the previous machine though, so we'll need to discuss this in the infra team.

@mrkajetanp
Copy link
Contributor Author

Fair enough, best of luck! :)

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

Our documented glibc baseline for aarch64 is 2.17, while this is switching to ubuntu 22.04, which is glibc 2.35.

@Kobzol
Copy link
Contributor

Kobzol commented Dec 8, 2024

Ah, good point! To clarify, before crosstool was used to explicitly configure glibc 2.17 (https://github.com/rust-lang/rust/pull/133809/files#diff-08277b07e8cb8ff6abaa4638229d2a8eb8d14a58590e3ebaafa6d13b3da07081L9), while now we just use a native build on Ubuntu 22.04 (where configuring glibc 2.17 is very painful, at least as far as I'm aware). So we might need to switch e.g. to CentOS, same as we do for the x64 Linux dist build.

@mrkajetanp
Copy link
Contributor Author

e.g. to CentOS, same as we do for the x64 Linux dist build.

I can switch the build to CentOS, though are we sure that's a good idea given that it's now past its end of life? EOL for the CentOS 7 used in the x86 dist build was June 2024. Afaict all distros' versions that ship 2.17 are now past their EOL.

@Kobzol
Copy link
Contributor

Kobzol commented Dec 9, 2024

That is indeed an issue, although orthogonal to ARM, I suppose.

@nikic CentOS 7 is indeed EOL since June 2024 (https://www.redhat.com/en/topics/linux/centos-linux-eol). Should we do https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html again? Our HPC center has updated to glibc 2.28 last year, which I personally use as a litmus test to see where the current baseline is =D

@mrkajetanp
Copy link
Contributor Author

mrkajetanp commented Dec 9, 2024

Debian Buster has glibc 2.28 and Extended LTS until 2029, how does trying that one sound?
There is also Debian Stretch with 2.24 until 2027 and Debian Jessie with 2.19, though that one is only alive until June.

@Kobzol
Copy link
Contributor

Kobzol commented Dec 9, 2024

The extended LTS is a commercial offering, if I understand correctly, we don't currently make use of any such extended variants.

Created https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Increasing.20glibc.20baseline/near/486974115 to discuss this bump.

@nikic
Copy link
Contributor

nikic commented Dec 9, 2024

I don't think we really care whether the base image we use for building is EOL. Lack of security updates shouldn't have a material effect on our artifacts -- I don't think we're linking anything statically from the host that we aren't building ourselves? Like, stuff like openssl in cargo comes from a vendored build, and we even build our own zstd on these.

The last time we bumped the glibc requirement it was because it was not possible to both target old glibc and build new LLVM with crosstool-ng. I expect we're still a bit off from hitting that problem again (maybe next time LLVM bumps requirements...)

cc @cuviper who probably has opinions on both glibc baseline and our use of centos:7 base images :)

@mrkajetanp
Copy link
Contributor Author

The extended LTS is a commercial offering

From what I understand it's commercial in that a 3rd party gets paid to backport security fixes and such, it's still free to use. Besides it's effectively an opt-in repo so we just use an older official Debian docker image, then if a security fix is needed it's just a matter of adding in the repo and running an update.
https://www.freexian.com/lts/extended/docs/how-to-use-extended-lts/

Whether this is relevant or not is a different question - I imagine not - but it's slightly better than just using a completely dead version I suppose. Especially compared to CentOS where relying on an archive of old builds of a dead distro seems pretty dodgy if we can avoid it.

@mrkajetanp
Copy link
Contributor Author

To clarify, the only concern I have here is that CentOS has been discontinued so I'm wondering whether it's still okay to rely on the repos being up. It's probably good to have at least a migration plan in case they get taken down. If we're confident that they'll stay available for the foreseeable future then there's no problem at all imo.

@Kobzol
Copy link
Contributor

Kobzol commented Dec 9, 2024

Based on https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Increasing.20glibc.20baseline, we're currently OK with using the EOL runner on CI, as we're not really using anything from it statically, we just use it to build the compiler and the stdlib.

@mrkajetanp
Copy link
Contributor Author

Fine by me, let's try the CentOS variant then :)

@Kobzol
Copy link
Contributor

Kobzol commented Dec 9, 2024

@bors try

@Kobzol
Copy link
Contributor

Kobzol commented Dec 17, 2024

The job had uncached Docker image, and apparently that times out now :/ I'll probably have to increase the timeout again.

@bors try

@bors
Copy link
Contributor

bors commented Dec 17, 2024

⌛ Trying commit f1ed637 with merge 2935440...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 17, 2024
ci: Move dist-aarch64-linux to an aarch64 runner

Move the dist-aarch64-linux CI job to an aarch64 runner instead of cross-compiling it from an x86 one. This will make it possible to perform optimisations such as LTO, PGO and BOLT later on.

r? `@Kobzol`

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

bors commented Dec 17, 2024

☀️ Try build successful - checks-actions
Build commit: 2935440 (29354404c35bae84a0559c1b1c1b4d917cd6ec87)

Move the dist-aarch64-linux CI job to an aarch64 runner instead of
cross-compiling it from an x86 one. This will make it possible to
perform optimisations such as LTO, PGO and BOLT later on.
@davidtwco
Copy link
Member

@mrkajetanp is away for the holidays so I've rebased and fixed the conflict

Move shared helper scripts used by Docker builds under docker/scripts.
@Kobzol
Copy link
Contributor

Kobzol commented Dec 18, 2024

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 18, 2024
ci: Move dist-aarch64-linux to an aarch64 runner

Move the dist-aarch64-linux CI job to an aarch64 runner instead of cross-compiling it from an x86 one. This will make it possible to perform optimisations such as LTO, PGO and BOLT later on.

r? `@Kobzol`

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

bors commented Dec 18, 2024

⌛ Trying commit 3afda7e with merge f868ea3...

@bors
Copy link
Contributor

bors commented Dec 18, 2024

💥 Test timed out

@Kobzol
Copy link
Contributor

Kobzol commented Dec 18, 2024

@bors try

@bors
Copy link
Contributor

bors commented Dec 18, 2024

⌛ Trying commit 3afda7e with merge 9c3de39...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 18, 2024
ci: Move dist-aarch64-linux to an aarch64 runner

Move the dist-aarch64-linux CI job to an aarch64 runner instead of cross-compiling it from an x86 one. This will make it possible to perform optimisations such as LTO, PGO and BOLT later on.

r? `@Kobzol`

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

bors commented Dec 18, 2024

☀️ Try build successful - checks-actions
Build commit: 9c3de39 (9c3de39e85ac30def4927018e30074c0331f8252)

@Kobzol
Copy link
Contributor

Kobzol commented Dec 18, 2024

The duplication is not ideal, but at least it was balanced a bit by the small CI script cleanup :)

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Dec 18, 2024

📌 Commit 3afda7e 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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 18, 2024
@bors
Copy link
Contributor

bors commented Dec 19, 2024

⌛ Testing commit 3afda7e with merge 023521e...

@bors
Copy link
Contributor

bors commented Dec 19, 2024

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing 023521e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 19, 2024
@bors bors merged commit 023521e into rust-lang:master Dec 19, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 19, 2024
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-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.

8 participants