Skip to content

chore: add aarch64 linux runner #15077

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
Apr 2, 2025
Merged

chore: add aarch64 linux runner #15077

merged 1 commit into from
Apr 2, 2025

Conversation

weihanglo
Copy link
Member

@weihanglo weihanglo commented Jan 17, 2025

What does this PR try to resolve?

Linux arm64 hosted runners is in public preview.
Enable and see if is is something we can have now.

https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

How should we test and review this PR?

aarch64-unknown-linux-gnu is a tier-1 target platform.
It is better to have this in Cargo's CI.

Cross-compilation tests are disabled temporarily on this platform.

Additional information

https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Free.20Linux.20ARM64.20runners.20on.20GHA.20now.20in.20beta

@rustbot
Copy link
Collaborator

rustbot commented Jan 17, 2025

r? @epage

rustbot has assigned @epage.
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-infrastructure Area: infrastructure around the cargo repo, ci, releases, etc. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 17, 2025
@weihanglo weihanglo changed the title chore: add aarch64 linux runner [WIP] chore: add aarch64 linux runner Jan 17, 2025
@@ -155,6 +163,9 @@ jobs:
- uses: actions/checkout@v4
- name: Dump Environment
run: ci/dump-environment.sh
# workaround for https://github.com/actions/partner-runner-images/issues/26
Copy link
Contributor

@arlosi arlosi Jan 21, 2025

Choose a reason for hiding this comment

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

Based on the linked issue, it's available/fixed now.

Copy link
Contributor

Choose a reason for hiding this comment

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

I re-ran the tests and everything passed except cross compile.

Copy link
Member Author

Choose a reason for hiding this comment

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

The current arm machine sometimes throws a random free() allocation error. I lost the exact build failure, but feel like it is not really stable yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Investigation into compilation problems are currently being investigated in rust-lang/rust#135867.

Copy link
Member Author

Choose a reason for hiding this comment

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

Found it https://github.com/weihanglo/cargo/actions/runs/12939625507/job/36092284988#step:13:48.

  free(): invalid next size (fast)

It doesn't seem to be a compilation error though.

Copy link
Member Author

Choose a reason for hiding this comment

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

CI passed. Should we make it into our CI pipeline?

@rustbot rustbot added the A-testing-cargo-itself Area: cargo's tests label Jan 24, 2025
@weihanglo weihanglo changed the title [WIP] chore: add aarch64 linux runner chore: add aarch64 linux runner Feb 23, 2025
@weihanglo weihanglo marked this pull request as ready for review February 23, 2025 01:00
@weihanglo weihanglo force-pushed the arm branch 2 times, most recently from 2e3cbde to 2d4b474 Compare April 1, 2025 17:39
Linux arm64 hosted runners is in public preview.
Enable and see if is is something we can have now.

setting `target.linker` is required for cross-compilation
on ARM64, so disable cross compilation tests for it.

https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/
Comment on lines +136 to +140
other: TODO # cross-compile tests are disabled, this shouldn't matter.
- name: Linux aarch64 nightly
os: ubuntu-24.04-arm
rust: nightly
other: TODO # cross-compile tests are disabled, this shouldn't matter.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we say UNREACHABLE? ;)

Copy link
Contributor

@epage epage left a comment

Choose a reason for hiding this comment

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

I assume you are ready for this to be merged? If so, feel free to add it to the queue

@weihanglo weihanglo added this pull request to the merge queue Apr 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 2, 2025
@weihanglo
Copy link
Member Author

On Windows x86_64 gnu nightly:

---- test::test_panic_abort_with_dep stdout ----
running `D:\a\cargo\cargo\target\debug\cargo.exe test -v`

thread 'test::test_panic_abort_with_dep' panicked at tests\testsuite\test.rs:3123:24:

test failed running `D:\a\cargo\cargo\target\debug\cargo.exe test -v`
error: process exited with code 101 (expected 0)
--- stdout

--- stderr
     Locking 1 package to latest compatible version
   Compiling bar v0.0.1 (D:\a\cargo\cargo\target\tmp\cit\t3394\foo\bar)
     Running `rustc --crate-name bar --edition=2015 bar\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg "cfg(feature, values())" -C metadata=90e48499b2b6bf09 -C extra-filename=-e9fe289c88a02da6 --out-dir D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps -L dependency=D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps`
   Compiling foo v0.0.1 (D:\a\cargo\cargo\target\tmp\cit\t3394\foo)
     Running `rustc --crate-name foo --edition=2015 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg "cfg(feature, values())" -C metadata=7f6df1b8094c1a17 -C extra-filename=-65dcb3f7f6366c0d --out-dir D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps -L dependency=D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps --extern bar=D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps\libbar-e9fe289c88a02da6.rmeta`
     Running `rustc --crate-name foo --edition=2015 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test --check-cfg cfg(docsrs,test) --check-cfg "cfg(feature, values())" -C metadata=05b6ffbb1675c310 -C extra-filename=-ae79235dff26e298 --out-dir D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps -L dependency=D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps --extern bar=D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps\libbar-e9fe289c88a02da6.rlib`
error: couldn't create a temp dir: Access is denied. (os error 5) at path "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcrcPlLA"

error: could not compile `foo` (lib) due to 1 previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name foo --edition=2015 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --check-cfg cfg(docsrs,test) --check-cfg "cfg(feature, values())" -C metadata=7f6df1b8094c1a17 -C extra-filename=-65dcb3f7f6366c0d --out-dir D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps -L dependency=D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps --extern bar=D:\a\cargo\cargo\target\tmp\cit\t3394\foo\target\debug\deps\libbar-e9fe289c88a02da6.rmeta` (exit code: 1)
warning: build failed, waiting for other jobs to finish...

Retry

@weihanglo weihanglo added this pull request to the merge queue Apr 2, 2025
Merged via the queue into rust-lang:master with commit f1e4470 Apr 2, 2025
25 checks passed
@weihanglo weihanglo deleted the arm branch April 2, 2025 16:33
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 6, 2025
Update cargo

17 commits in a6c604d1b8a2f2a8ff1f3ba6092f9fda42f4b7e9..0e93c5bf6a1d5ee7bc2af63d1afb16cd28793601
2025-03-26 18:11:00 +0000 to 2025-04-05 00:00:24 +0000
- chore(deps): bump openssl from 0.10.71 to 0.10.72 (rust-lang/cargo#15394)
- chore(ci): restore cargo-util semver check (rust-lang/cargo#15389)
- docs(changelog): polish changelog items (rust-lang/cargo#15379)
- chore(deps): update msrv (1 version) to v1.86 (rust-lang/cargo#15381)
- chore: add aarch64 linux runner (rust-lang/cargo#15077)
- Added `build_directory` field to cargo metadata output (rust-lang/cargo#15377)
- chore(deps): update rust crate rusqlite to 0.34.0 (rust-lang/cargo#15373)
- Prevent undeclared public network access (rust-lang/cargo#15368)
- rename the `author` field to be `authors` in book.toml (rust-lang/cargo#15362)
- move modules from kebab-case to snake_case (rust-lang/cargo#14439)
- chore: bump to 0.89.0; update changelog (rust-lang/cargo#15372)
- docs(unstable): update `-Zrustdoc-depinfo` tracking issue link (rust-lang/cargo#15371)
- fix(tree): Make output more deterministic (rust-lang/cargo#15369)
- feat: rustdoc depinfo rebuild detection via -Zrustdoc-depinfo (rust-lang/cargo#15359)
- Rename the gc config table (rust-lang/cargo#15367)
- Revert "Temporarily ignore cargo_test_doctest_xcompile_ignores" (rust-lang/cargo#15357)
- Don't canonicalize executable path in `cargo_exe` (rust-lang/cargo#15355)

r? ghost
@rustbot rustbot added this to the 1.88.0 milestone Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-infrastructure Area: infrastructure around the cargo repo, ci, releases, etc. A-testing-cargo-itself Area: cargo's tests S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants