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

Update Android in CI #120593

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Update Android in CI #120593

merged 1 commit into from
Jul 26, 2024

Conversation

maurer
Copy link
Contributor

@maurer maurer commented Feb 2, 2024

We are currently using a 10+ year old Android image, and it has caused trouble when working on #120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

  1. Bumps the API used by the emulator in CI to 21, as per NDK-26's release notes deprecating 19 and 20 as targets.
  2. Bumps the NDK to 26b

try-job: arm-android

@rustbot
Copy link
Collaborator

rustbot commented Feb 2, 2024

r? @Kobzol

(rustbot has picked a reviewer for you, use r? to override)

@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 Feb 2, 2024
@maurer
Copy link
Contributor Author

maurer commented Feb 2, 2024

r? @pietroalbini

Pietro, I've added you explicitly since you're the only one to ever touch this lockfile, which means you're likely to be the one who can run update-mirror, which I lack the credentials for.

@rustbot rustbot assigned pietroalbini and unassigned Kobzol Feb 2, 2024
@maurer
Copy link
Contributor Author

maurer commented Feb 2, 2024

cc @chriswailes

@Mark-Simulacrum
Copy link
Member

The new files should be uploaded to the mirror. However, I'd like to get a +1 from another android target maintainer on this PR before moving ahead.

cc @chriswailes @mgeisler (per platform support docs)

@Mark-Simulacrum Mark-Simulacrum 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 9, 2024
Copy link
Contributor

@chriswailes chriswailes left a comment

Choose a reason for hiding this comment

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

Lgtm!

@workingjubilee
Copy link
Member

Happy to see this land, as it looks like it will also allow simplifying away rust-lang/backtrace-rs#570 from backtrace-rs, too.

@maurer
Copy link
Contributor Author

maurer commented Mar 19, 2024

ping @Mark-Simulacrum - it looks like it still says "waiting on author", but Chris has LGTM'd.

@workingjubilee
Copy link
Member

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 19, 2024
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Mar 23, 2024

📌 Commit 7c39eee 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 Mar 23, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Activates aarch64 testing on the emulator, since the base image is now a 64-bit image.
3. Bumps the NDK to 26b
@bors
Copy link
Contributor

bors commented Mar 24, 2024

⌛ Testing commit 7c39eee with merge 23c8dec...

@bors
Copy link
Contributor

bors commented Mar 24, 2024

💔 Test failed - checks-actions

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 24, 2024
@bors
Copy link
Contributor

bors commented Jul 25, 2024

⌛ Trying commit a0c5959 with merge 47775ff...

@tgross35
Copy link
Contributor

Seems like it is stuck at the same point, which appears to be just before "pushing server" based on logs from https://github.com/rust-lang-ci/rust/actions/runs/10101022677/job/27933675737. @maurer any ideas here?

@maurer
Copy link
Contributor Author

maurer commented Jul 26, 2024

That would normally mean that the virtual device wasn't coming up, so it was hanging on connecting... but wasn't this working before?

@rust-log-analyzer

This comment has been minimized.

@tgross35
Copy link
Contributor

tgross35 commented Jul 26, 2024

It did pass at https://github.com/rust-lang-ci/rust/actions/runs/10049405628/job/27775374879. The dropped patch 005ab82 ("Add aarch64-android testing") included a change to the arm dockerfile ENTRYPOINT, as well as android-start-emulator.sh - any chance that could be it?

@maurer
Copy link
Contributor Author

maurer commented Jul 26, 2024

Ah, I dropped that because I didn't need to specify the arch anymore, but specifying the classic engine might have been load-bearing.

classic was hardcoded before, the problem is that the script still tries to start the @armeabi-v7a-18 emulator instead of the @armeabi-v7a-21, sorry, missed it in my rebase.

We were running testing on API 18, which was already out of support for
NDK 25, and some of the ancient behavior in that image was causing
trouble when developing `rustc` features (rust-lang#120326).

Update to the current LTS NDK 26, and to its minimum supported API 21.

Fixes: rust-lang#120567
@tgross35
Copy link
Contributor

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 26, 2024
Update Android in CI

We are currently using a 10+ year old Android image, and it has caused trouble when working on rust-lang#120326.

Our current NDK (25) only supports API 19+, so we were already out of spec. This PR:

1. Bumps the API used by the emulator in CI to 21, as per [NDK-26's release notes](https://github.com/android/ndk/wiki/Changelog-r26) deprecating 19 and 20 as targets.
2. Bumps the NDK to 26b

try-job: arm-android
@bors
Copy link
Contributor

bors commented Jul 26, 2024

⌛ Trying commit 8bf9aea with merge 591f78e...

@bors
Copy link
Contributor

bors commented Jul 26, 2024

☀️ Try build successful - checks-actions
Build commit: 591f78e (591f78ef5c8299ba49e2fe7e211b8850f6e57552)

@tgross35
Copy link
Contributor

Great, time for the real thing. Only change from the previous approval was to drop the patches that add aarch64.

@bors r=Mark-Simulacrum,workingjubilee

@bors
Copy link
Contributor

bors commented Jul 26, 2024

📌 Commit 8bf9aea has been approved by Mark-Simulacrum,workingjubilee

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 Jul 26, 2024
@rust-log-analyzer
Copy link
Collaborator

The job arm-android failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
file:.git/config submodule.library/stdarch.url=https://github.com/rust-lang/stdarch.git
file:.git/config submodule.src/doc/book.active=true
---
+ export SHELL=/bin/bash
+ exec /checkout/src/ci/run.sh
+ 
[CI_JOB_NAME=arm-android]
emulator: ERROR: Unknown AVD name [armeabi-v7a-18], use -list-avds to see valid list.
HOME is defined but there is no file armeabi-v7a-18.ini in $HOME/.android/avd
(Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd and $HOME/.android/avd)
[CI_JOB_NAME=arm-android]

@tgross35
Copy link
Contributor

The job arm-android failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)

(this is just the job that started 4 hours ago timing out)

@bors
Copy link
Contributor

bors commented Jul 26, 2024

⌛ Testing commit 8bf9aea with merge 6ef11b8...

@Kobzol
Copy link
Contributor

Kobzol commented Jul 26, 2024

Hmm doesn't seem to have picked up the cancel, but maybe the new job will override it?

Note that try builds cannot be cancelled using the current bors bot.

@bors
Copy link
Contributor

bors commented Jul 26, 2024

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum,workingjubilee
Pushing 6ef11b8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 26, 2024
@bors bors merged commit 6ef11b8 into rust-lang:master Jul 26, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Jul 26, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6ef11b8): 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: 772.066s -> 770.248s (-0.24%)
Artifact size: 328.93 MiB -> 329.00 MiB (0.02%)

@danakj
Copy link
Contributor

danakj commented Jul 26, 2024

Congratulations on getting this merged, it seems to have been incredibly difficult. Thanks for the persistence.

workingjubilee added a commit to rust-lang/backtrace-rs that referenced this pull request Aug 23, 2024
Since rust-lang/rust#120593
the minimum android API level is 21.

Related:
https://github.com/android/ndk/wiki/Changelog-r26
rust-lang/rust#129305

1. stop setting `dl_iterate_phdr` based on whether the android API level
    is greater than or equal to 21, but retain it for back compat.
2. remove `cc` build dependency.
3. upgrade ndk r25b to r26d in CI.
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. PG-exploit-mitigations Project group: Exploit mitigations 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.