-
-
Notifications
You must be signed in to change notification settings - Fork 34k
Description
Bug report
Bug description:
The Android testbed uses an emulator with 2 GB of RAM. This is barely enough to run the Python test suite, so on the buildbot machines I've had to manually edit the emulator configuration files after creation, as described in Android/README.md.
This approach wouldn't work on GitHub Actions, because they use a fresh VM for every job. Fortunately this issue hasn't affected GitHub Actions yet for Python itself, but it will affect other packages which use the testbed via cibuildwheel. For example, I encountered it when trying to build Pandas for Android.
Unfortunately the tools don't make it easy to configure the RAM programmatically. This is supposed to be controlled by the hardware device profile, but avdmanager ignores this and limits it to 2 GB.
So the simplest solution I can think of is to add a Gradle task as a dependency of each of the built-in emulator creation tasks (e.g. maxVersionSetup), which does the following:
- Based on the managed device settings, and the ANDROID_USER_HOME environment variable if set, determine the location where Gradle would create the AVD.
- If the AVD doesn't already exist, then download its system image with
sdkmanagerif necessary, then create it withavdmanager. - Edit the config files to set the RAM to 4 GB.
Notes:
- Unlike the rest of the Android build process, we do support running the tesbed on Windows, where the locations of the AVD and the manager tools will be different.
- The paragraph about RAM in the README should be removed.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other