pybind11
pybind11 copied to clipboard
ci: add android test
Description
Testing https://github.com/pypa/cibuildwheel/pull/2349.
Suggested changelog entry:
- Add CI testing Android
📚 Documentation preview 📚: https://pybind11--5714.org.readthedocs.build/
@mhsmith Had to install wheel and patchelf, and now it's failing at the test step on all three systems.
The current failures are because KVM hasn't been enabled on Linux, and GitHub Actions isn't able to run the Android emulator on macOS. Both of these are discussed in https://github.com/pypa/cibuildwheel/pull/2349.
~~It also looks like somehow the merge of https://github.com/henryiii/pybind11/pull/23 has missed a couple of the files.~~ Correction: they've already been merged in https://github.com/pybind/pybind11/pull/5733.
But this PR-against-PR workflow is confusing, so would it be simpler if I created my own PR to replace this one? Since you're a member of the pybind11 project, we would both be able to push to it.
I'm fine if you make a PR, but I'm fine to give you access to my fork.
Thanks, that works too.
OK, I've updated the GitHub Actions configuration as discussed in my previous comment, and the Android jobs are passing now.
To enable local testing, I also moved the ANDROID_API_LEVEL environment variable from tests-cibw.yml to pyproject.toml. But this breaks the iOS and Pyodide jobs, because the stable cibuildwheel version doesn't recognize the android namespace. I guess you aren't planning to merge this PR until after the next cibuildwheel release anyway, so I've put a TODO comment in tests-cibw.yml to indicate that.
Android: can't find wheel in path?
The iOS 3.14 failure is expected (https://github.com/pypa/cibuildwheel/issues/2494).
I've added wheel back to this PR so it can work with cibuildwheel 3.1, and fixed it properly for the next cibuildwheel version in https://github.com/pypa/cibuildwheel/pull/2515.
I think this PR is now ready to merge.