cross
cross copied to clipboard
Allow different Android versions for Docker images.
Allow different Android NDK, SDK, and Android versions to be used. Also simplifies the build process and future-proofs it slightly, since it removes the Python dependency for the Android NDK build script, and plans for the deprecation of the Makefile build process for the Android system build script.
Currently only tested on 9.0.0_r1, needs testing on a few more versions:
- [x] 5.0.0_r1
- [x] 5.1.1_r38
- [x] 6.0.1_r81
- [x] 7.0.0_r36
- [x] 8.0.0_r51
- [x] 8.1.0_r81
- [x] 9.0.0_r1
- [x] 10.0.0_r47
- [x] 11.0.0_r48
- [ ] 12.1.0_r27
- [ ] 13.0.0_r6
This should also simplify migrating to newer Android NDK and SDK versions in the future. This will also need a wiki entry, I believe.
I've also tested the Android NDK versions:
- [x] r10e (version
5.0.0_r1only) - [x] r13b (version
5.0.0_r1only) - [x] r21d
- [x] r25b
Also, the ANDROID_SYSTEM_COMPLETE isn't tested, nor will it, since the entire build requires ~100GB of memory and the build process is glacial. Note that we cannot use Android 7.1 builds, since they require API level 25, which does not seem to be supported by most (any?) NDK versions.
We also have added ANDROID_SYSTEM_NONE, for a very lightweight image without any runners.
bors try --target aarch64-linux-android
bors try --target aarch64-linux-android
I've restored using Python for the Android NDK install steps, since it's a bit more resilient than making all the symlinks outself manually. We could probably speed it up slightly making manual symlinks, but considering the major bottleneck is the Android build itself, and this adds no size to the resulting image, I don't see any reason to remove it. I've added python3 since newer Android NDK versions use it by default and it also has effectively no change in the build times or performance.
bors try --target aarch64-linux-android
bors try -android
bors try- bors try --target -android
bors try-
bors try --target -android
There might be other things I'm missing: I've tried to run through this numerous times, but at 4k lines of code, there may be something I've overlooked. I've re-run the tests for the entire suite of Android versions on aarch64-linux-android on the latest version of the build scripts, so it should work for the tested versions for all targets, but there could be subtle logic errors.
since these scripts are very android specific and most of it would not be used in CI, would it make sense to move this to cross-toolchain?
since these scripts are very android specific and most of it would not be used in CI, would it make sense to move this to cross-toolchain?
Sure, that could work. We can then also cherry pick pieces if we say, want to upgrade to Android 11.
If we do migrate this to cross-toolchains, it would be nice if we could have some basic CI to test the additions, however: https://github.com/cross-rs/cross-toolchains/pull/24
I've updated the NDK to r25b.
bors try --target -android
bors r=Emilgardis
Currently waiting on the fix for -ar and -gcc-ar in #1105, and also we had a spurious network issue in the merge.
bors r+ p=1
bors retry
bors r=Emilgardis
Already running a review