-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[WIP] Re-enable Android tests in CIBW workflow #5914
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
base: master
Are you sure you want to change the base?
Conversation
|
EDIT: THIS WAS FIXED WITH PR #5915 I'm realizing only now that the tests are disabled in three jobs, not just the one that failed (Android wheel ubuntu-latest):
|
|
No, it's something lower-level to do with starting the emulator. We've started getting identical errors in the CPython CI within the last 24 hours. Meanwhile, in the Briefcase repository, we're getting a more obvious error message about running out of disk space, which I'm fixing in beeware/.github#271 based on something I previously put into cibuildwheel's own CI. You might want to try the same. If all of these failures are actually caused by disk space, then unfortunately they'll affect all cibuildwheel Android users, especially those whose CI jobs consume a lot of disk space before running the emulator. In that case, cibuildwheel (or the underlying test script from CPython) will need to at least do a pre-emptive disk space check to give a useful error message, and ideally free up some space automatically by itself. For example, it should be safe enough to remove all NDK versions except the one we're currently using. There are 4 versions pre-installed on the runner, and they're about 2.5 GB each. Like the emulator hardware acceleration config, we would only do this when running within CI. |
|
@rwgk Could you try it? This PR doesn't seem to be reenabling anything, but deleting stuff instead, or I would have tried it. |
|
Oh, no, it's deleting a skip of the test run, got it. So it's currently working? Maybe adding a clean command like above would make it more reliable, though? |
The last commit here has I'll merge master, then we'll see. |
|
Still failing.
I'm super busy today and will be even more busy tomorrow. Please go ahead and push commits here. (I was actually hoping someone else will take over.) |
|
I've confirmed in freakboy3742/pyspamsum#108 that this error is indeed caused by disk space. There are some ideas there which will eventually find their way into cibuildwheel. Meanwhile, I suggest you try this workaround from cibuildwheel's own CI, which is slightly different from the script above because it doesn't delete the version of the NDK which cibuildwheel is going to use. |


Problem description
We recently had to disable Android tests in the cibuildwheel CI workflow because of persistent Android emulator / managed-device failures on GitHub Actions runners:
This issue is to document the situation and track restoring full Android test coverage.
See also: PR #5911, where we tried to use an older Ubuntu image (commit de84648), to no avail.
Summary
CIBWworkflow includes an Android wheel job that builds and testspybind11_testswheels for Android usingpypa/cibuildwheel.Affected job and configuration
Workflow:
.github/workflows/tests-cibw.ymlJob: currently
Android wheel ubuntu-latestcibuildwheel: currently pinned to
pypa/cibuildwheel@v3.3Android tests are currently disabled by setting:
Previously, cibuildwheel was running our
pytest testssuite inside an Android Gradle testbed app on an emulator (via managed devices).Failure details
The relevant error from the failing runs looks like this (truncated for brevity):
This occurred both on
ubuntu-latestand after pinning toubuntu-22.04. In all cases, the failure happens before our tests actually start running; it is strictly in the emulator / managed-device setup step.Some example runs (URLs from the investigation):
(We can fill in the exact run/job URLs when creating the issue.)
Current temporary workaround
To avoid blocking CI while still building Android wheels, we:
CIBW_TEST_COMMAND: "", so no emulator/Gradle tests are executed.This means:
pybind11_teststest suite on Android in CI.What we’d like help with
If you’re familiar with Android emulator / Gradle Managed Devices on GitHub Actions, help would be very welcome to:
Acceptance criteria
pybind11_testssuite on at least one supported Ubuntu runner image, using an Android emulator.CIBW_TEST_COMMAND: ""from.github/workflows/tests-cibw.yml, andUntil then, we will keep the current degraded mode (build-only Android wheels) and treat this issue as the single source of truth for the status of Android testing in CI.