pybind11 icon indicating copy to clipboard operation
pybind11 copied to clipboard

ci: add android test

Open henryiii opened this issue 6 months ago • 1 comments

Description

Testing https://github.com/pypa/cibuildwheel/pull/2349.

Suggested changelog entry:

  • Add CI testing Android

📚 Documentation preview 📚: https://pybind11--5714.org.readthedocs.build/

henryiii avatar Jun 04 '25 03:06 henryiii

@mhsmith Had to install wheel and patchelf, and now it's failing at the test step on all three systems.

henryiii avatar Jun 12 '25 05:06 henryiii

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.

mhsmith avatar Jul 11 '25 19:07 mhsmith

I'm fine if you make a PR, but I'm fine to give you access to my fork.

henryiii avatar Jul 11 '25 20:07 henryiii

Thanks, that works too.

mhsmith avatar Jul 12 '25 09:07 mhsmith

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.

mhsmith avatar Jul 16 '25 12:07 mhsmith

Android: can't find wheel in path?

The iOS 3.14 failure is expected (https://github.com/pypa/cibuildwheel/issues/2494).

henryiii avatar Jul 24 '25 16:07 henryiii

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.

mhsmith avatar Jul 24 '25 19:07 mhsmith