-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
android: add CI jobs, buildinfo, cmake docs, disable CURL_USE_PKGCONFIG
by default
#16014
Conversation
@@ -224,6 +224,80 @@ jobs: | |||
time gmake -j3 examples | |||
echo '::endgroup::' | |||
android: | |||
name: "Android ${{ matrix.platform }} (${{ matrix.build == 'cmake' && 'CM' || 'AM' }}, arm64)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we use vcpkg as well on android? we can bring easily 3rd libs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can try that. I can't see other options besides building things manually.
What about BoringSSL + libpsl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it possible to do all the libs that we do on windows msvc with vcpkg, do it also on android with vcpkg.
Do you want me to create a similar ci that compile curl in android with vcpkg?
I can start with cmake only, and then you can extended it to autoconf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need all of those as in Windows. Here we can't run tests, just testing builds and those are quite similar to Linux. We also want to keep CI turnaround fast.
I suggest laying down the framework for it and do a single, useful combination, as suggested above. We can take it from there if there may be more deps that make sense for many Android uses.
Possibly those deps can be interesting, that do not work or missing on Windows, and which we don't have coverage in GHA/linux. (BoringSSL e.g)
CURL_USE_PKGCONFIG
by defaultCURL_USE_PKGCONFIG
by default
d49c806
to
ae96276
Compare
platform defaults to 21 if not set (cmake)
NDK toolchain builds: ``` -DANDROID_NDK=. \ -DANDROID_ABI=arm64-v8a \ -DANDROID_PLATFORM=android-21 \ -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake" ``` results in `CMakeLists.txt`: ANDROID_NATIVE_API_LEVEL 21 ANDROID_PLATFORM_LEVEL 21 CMAKE_SYSTEM_VERSION 1 built-in builds: ``` -DCMAKE_SYSTEM_NAME=Android \ -DCMAKE_SYSTEM_VERSION=21 \ -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \ -DCMAKE_ANDROID_NDK="${ANDROID_NDK_HOME}" ``` results in `CMakeLists.txt`: ANDROID_NATIVE_API_LEVEL (undefined/empty) ANDROID_PLATFORM_LEVEL (undefined/empty) CMAKE_SYSTEM_VERSION 21
If supplied via `--host=aarch64-linux-android<level>`
GHA/non-native: add Android builds, both cmake and autotools,
both NDK 21 (oldest available) and 35 (newest available)
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
It comes with a maintenance burden to bump the oldest/latest values
with CI runner updates.
cmake: disable
CURL_USE_PKGCONFIG
by default for Android.To avoid picking up system package by default.
build: add
ANDROID-<NDK-LEVEL>
flag tobuildinfo.txt
.Also detect NDK level with the CMake built-in build method:
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-android
INSTALL.md: add CMake build instructions for Android.
INSTALL.md: make NDK levels consistent in
./configure
example.