Skip to content

ci: add android test #5714

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

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions .github/workflows/tests-cibw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ jobs:
only: cp312-pyodide_wasm32

build-ios:
name: iOS wheel
runs-on: macos-latest
name: iOS wheel ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [macos-latest, macos-13]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -45,3 +49,26 @@ jobs:
CIBW_PLATFORM: ios
with:
package-dir: tests

build-android:
name: Android wheel ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [macos-latest, macos-13, ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- run: pipx install wheel patchelf

- uses: mhsmith/cibuildwheel@android
env:
CIBW_PLATFORM: android
# Needed to include C++ in the wheel
CIBW_ENVIRONMENT_ANDROID: ANDROID_API_LEVEL="24"
with:
package-dir: tests
1 change: 1 addition & 0 deletions tests/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import pytest

ANDROID = sys.platform.startswith("android")
LINUX = sys.platform.startswith("linux")
MACOS = sys.platform.startswith("darwin")
WIN = sys.platform.startswith("win32") or sys.platform.startswith("cygwin")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_cross_module_exceptions(msg):

# TODO: FIXME
@pytest.mark.xfail(
"env.MACOS and env.PYPY",
"(env.MACOS and env.PYPY) or env.ANDROID",
raises=RuntimeError,
reason="See Issue #2847, PR #2999, PR #4324",
strict=not env.PYPY, # PR 5569
Expand Down
Loading