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: Upgrade Android SDK/NDK and refactor to use sdkmanager/avdmanager. #45580

Merged
merged 1 commit into from
Oct 29, 2017

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented Oct 27, 2017

  • SDK tools is upgraded to 27.0.0.

  • Stopped using the deprecated android tool, instead use the recommended sdkmanager and avdmanager.

  • NDK is upgrade to r15c.

    The r15 series dropped support for android-9 (2.3 / Gingerbread), the minimal supported version is now android-14 (4.0 / Ice Cream Sandwich).

r? @alexcrichton

(WIP, haven't confirmed if the change really works yet)

@kennytm kennytm added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 27, 2017
@alexcrichton
Copy link
Member

Looks great to me, thanks! r=me with a passing set of CI

@malbarbo
Copy link
Contributor

@kennytm I'm working on libc android ci, see rust-lang/libc#825. It's is necessary to pass --no_https.

@kennytm
Copy link
Member Author

kennytm commented Oct 28, 2017

@malbarbo Thanks. This was #45193. I'll see if we could avoid passing --no_https...

Update: The certificate thing passed if we use openjdk-8-jre-headless instead of openjdk-9-jre-headless 😕

@kennytm kennytm force-pushed the sdkmanager branch 13 times, most recently from 3f3b2f8 to 29bdc33 Compare October 28, 2017 18:22
@kennytm
Copy link
Member Author

kennytm commented Oct 28, 2017

So this is the final list of changes and rationale:

1. Updated Android SDK tools to 27.0.0
We saw Android CI failing in liblibc (fixed in rust-lang/libc#825)
2. Updated NDK to r15c
Because why not
3. Replaced android by sdkmanager and avdmanager
android was deprecated, which we thought may be another cause of liblibc failing.
4. Raised minimum API level of 32-bit targets from 9 (2.3) to 14 (4.0)
NDK r15c dropped support for android-9. (The minimum API level for 64-bit targets remains at 21 (5.0))
5. Downgraded the Java version used for Android SDK to openjdk-8-jre-headless
To use HTTPS again (i.e. revert #45193).
6. Switched the default compiler for Android from GCC to clang
GCC is deprecated on r15c. There is linker error if we don't use clang.
7. Switched the C++ standard library from gnustl to libc++
To match the compiler (but I guess we didn't really use the C++ part of the NDK). jemalloc will fail to compile on i686-android-linux for this 😓

(The last 3 2 changes are new compared with the first revision)

@alexcrichton
Copy link
Member

All looks and sounds great to me, thanks so much for investigating all this @kennytm!

* SDK tools is upgraded to 27.0.0.
   - Refactored to use `sdkmanager`/`avdmanager` instead of the deprecated
     `android` tool.

* The Java version used by Android SDK is downgraded to OpenJDK-8, in order
  to download the SDK through HTTPS.

* NDK is upgrade to r15c.
   - Dropped support for android-9 (2.3 / Gingerbread), the minimal
     supported version is now android-14 (4.0 / Ice Cream Sandwich).
   - Changed the default Android compiler from GCC to clang.
   - For details of change introduced by NDK r15, see
     https://github.com/android-ndk/ndk/wiki/Changelog-r15.
@kennytm kennytm changed the title [WIP] ci: Upgrade Android SDK/NDK and refactor to use sdkmanager/avdmanager. ci: Upgrade Android SDK/NDK and refactor to use sdkmanager/avdmanager. Oct 28, 2017
@kennytm
Copy link
Member Author

kennytm commented Oct 28, 2017

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Oct 28, 2017

📌 Commit c46b04c has been approved by alexcrichton

@kennytm kennytm added relnotes Marks issues that should be documented in the release notes of the next release. 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 Oct 28, 2017
@bors
Copy link
Contributor

bors commented Oct 28, 2017

⌛ Testing commit c46b04c with merge 49edcbd...

bors added a commit that referenced this pull request Oct 28, 2017
ci: Upgrade Android SDK/NDK and refactor to use sdkmanager/avdmanager.

* SDK tools is upgraded to 27.0.0.

* Stopped using the deprecated `android` tool, instead use the recommended `sdkmanager` and `avdmanager`.

* NDK is upgrade to r15c.

    The r15 series [dropped support for android-9](https://github.com/android-ndk/ndk/wiki/Changelog-r15) (2.3 / Gingerbread), the minimal supported version is now android-14 (4.0 / Ice Cream Sandwich).

r? @alexcrichton

(WIP, haven't confirmed if the change really works yet)
@bors
Copy link
Contributor

bors commented Oct 29, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 49edcbd to master...

@bors bors merged commit c46b04c into rust-lang:master Oct 29, 2017
@kennytm kennytm deleted the sdkmanager branch October 29, 2017 04:41
bors added a commit that referenced this pull request Oct 31, 2017
[beta] ci: Upgrade Android SDK/NDK and refactor to use sdkmanager/avdmanager.

This is a backport of #45580

r? @alexcrichton
malbarbo added a commit to malbarbo/cross that referenced this pull request Dec 10, 2017
After the ndk update used to build libstd
rust-lang/rust#45580, i686-linux-android
binaries stopped working cross-rs#143.
It's seem that the new toolchain is emitting instructions that the
default qemu-i386 cpu does not support. Using -cpu n270 (common in
android i686 phones), fix the problem.

Fixes cross-rs#143.
japaric pushed a commit to cross-rs/cross that referenced this pull request Dec 11, 2017
Use -cpu n270 to run i686-linux-android binaries

After the ndk update used to build libstd rust-lang/rust#45580, i686-linux-android binaries stopped working #143. It's seem that the new toolchain is emitting instructions that the default qemu-i386 cpu does not support. Using -cpu n270 (common in android i686 phones), fix the problem.

Fixes #143.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants