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
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.
@briansmith
Copy link
Contributor

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

This implies that API level 21 is the new minimum supported (at least minimum tested) API level, which should be documented...somewhere, especially somewhere in (or linked from) the platform support documentation.

Bumps the NDK to 26b

Ditto. This seems to imply the minimum NDK version is 26b now, which should be similarly documented.

@workingjubilee
Copy link
Member

I think the actually germane element here is the API level. If you compile Rust with the oldest NDK that supports our minimum API level, it should work, in theory?

Not that we're testing it, so we should be clear that that's the NDK we support, but I draw the distinction because the API level is the hard limit.

@maurer
Copy link
Contributor Author

maurer commented Oct 1, 2024

In a blog post for 1.68, we noted that we were moving to a policy of targeting the most recent LTS NDK. This is further documented in the NDK/API Update Policy under Platform Support.

I'd agree with you that it would be worth an extra notification if we were bumping the API beyond that, but we're bumping the min API exactly the way we messaged we would - we currently support all API levels supported by the supported NDK, which is the LTS NDK, and results in a minimum of 21.

@briansmith
Copy link
Contributor

Do we still intend to support API level 19 even though we're not testing it? Or are we now allowing the use of API level 20/21 features in future commits? This is the kind of clarification that I would like to see.

In my experience with MSRV, soon after I stop testing with the MSRV toolchain, the build with that toolchain breaks. More generally, "supported but not tested" minimum supported toolchain versions tend not to be "supported" very well.

@workingjubilee
Copy link
Member

@briansmith No? And I'm not sure how you apprehended that conclusion.

I was only commenting about the API/NDK distinction because older NDKs can theoretically compile for that API level. The API level still represents the hard minimum. The API level is what defines the actual implementation of the standard library.

bherrera pushed a commit to misttech/integration that referenced this pull request Oct 16, 2024
Here are all the changes. I went through them one-by-one and confirmed
that they should not be affecting us. In paritcular, we explicitly set
rust.lld = false (because we want to use the lld that ships with clang),
so the change in default does not affect us.

There have been changes to x.py since you last updated:
  [INFO] New option `build.lldb` that will override the default lldb binary path used in debuginfo tests
    - PR Link rust-lang/rust#124501
  [INFO] The compiler profile now defaults to rust.debuginfo-level = "line-tables-only"
    - PR Link rust-lang/rust#123337
  [WARNING] `rust.lld` has a new default value of `true` on `x86_64-unknown-linux-gnu`. Starting at stage1, `rust-lld` will thus be this target's default linker. No config changes should be necessary.
    - PR Link rust-lang/rust#124129
  [WARNING] Removed `dist.missing-tools` configuration as it was deprecated long time ago.
    - PR Link rust-lang/rust#125535
  [WARNING] `llvm.lld` is enabled by default for the dist profile. If set to false, `lld` will not be included in the dist build.
    - PR Link rust-lang/rust#126701
  [WARNING] `debug-logging` option has been removed from the default `tools` profile.
    - PR Link rust-lang/rust#127913
  [INFO] the `wasm-component-ld` tool is now built as part of `build.extended` and can be a member of `build.tools`
    - PR Link rust-lang/rust#127866
  [INFO] Removed android-ndk r25b support in favor of android-ndk r26d.
    - PR Link rust-lang/rust#120593
  [WARNING] For tarball sources, default value for `rust.channel` will be taken from `src/ci/channel` file.
    - PR Link rust-lang/rust#125181
  [INFO] New option `llvm.libzstd` to control whether llvm is built with zstd support.
    - PR Link rust-lang/rust#125642
  [WARNING] ./x test --rustc-args was renamed to --compiletest-rustc-args as it only applies there. ./x miri --rustc-args was also removed.
    - PR Link rust-lang/rust#128841
  [INFO] The `build.profiler` option now tries to use source code from `download-ci-llvm` if possible, instead of checking out the `src/llvm-project` submodule.
    - PR Link rust-lang/rust#129295

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/recipes/+/1120078
Original-Revision: 27df37a30e50b14b9ffefc872b6997790f03d4ea
GitOrigin-RevId: 341e222f002e36886b9960645b21faeaed633f90
Change-Id: Id1eb54a677a6f538bf7666d65b85d5fdba17ea42
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.