Skip to content

Commit e09b0bd

Browse files
committed
ci: add Android
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 3ddd9fd commit e09b0bd

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

.github/workflows/wheels.yml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595

9696
- uses: astral-sh/setup-uv@v6
9797

98-
- uses: pypa/cibuildwheel@v3.0.0b5
98+
- uses: mhsmith/cibuildwheel@android
9999
env:
100100
CIBW_BUILD: ${{ matrix.build }}
101101
CIBW_ARCHS: ${{ matrix.arch }}
@@ -111,20 +111,22 @@ jobs:
111111
name: wheels-${{ strategy.job-index }}
112112

113113
build_ios_wheels:
114-
name: iOS
115-
runs-on: macos-latest
114+
name: iOS ${{ matrix.runs-on }}
115+
runs-on: ${{ matrix.runs-on }}
116+
strategy:
117+
fail-fast: false
118+
matrix:
119+
runs-on: [macos-latest, macos-13]
116120

117121
steps:
118122
- uses: actions/checkout@v4
119123
with:
120124
fetch-depth: 0
121125
submodules: true
122126

123-
- uses: astral-sh/setup-uv@v6
124-
125127
- run: brew upgrade cmake
126128

127-
- uses: pypa/cibuildwheel@v3.0.0b5
129+
- uses: mhsmith/cibuildwheel@android
128130
env:
129131
CIBW_PLATFORM: ios
130132

@@ -136,11 +138,38 @@ jobs:
136138
uses: actions/upload-artifact@v4
137139
with:
138140
path: wheelhouse/*.whl
139-
name: wheels-iOS
141+
name: wheels-ios-${{ matrix.runs-on }}
142+
143+
build_android_wheels:
144+
name: Android ${{ matrix.runs-on }}
145+
runs-on: ${{ matrix.runs-on }}
146+
strategy:
147+
fail-fast: false
148+
matrix:
149+
runs-on: [ubuntu-latest, macos-latest]
150+
steps:
151+
- uses: actions/checkout@v4
152+
with:
153+
fetch-depth: 0
154+
submodules: true
155+
156+
- uses: mhsmith/cibuildwheel@android
157+
env:
158+
CIBW_PLATFORM: android
159+
160+
- name: Verify clean directory
161+
run: git diff --exit-code
162+
shell: bash
163+
164+
- name: Upload wheels
165+
uses: actions/upload-artifact@v4
166+
with:
167+
path: wheelhouse/*.whl
168+
name: wheels-android-${{ matrix.runs-on }}
140169

141170
upload_all:
142171
name: Upload if release
143-
needs: [build_wheels, build_ios_wheels, build_sdist]
172+
needs: [build_wheels, build_ios_wheels, build_android_wheels, build_sdist]
144173
runs-on: ubuntu-latest
145174
if: github.event_name == 'release' && github.event.action == 'published'
146175
environment:

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ examples = [
8989
]
9090
test = [
9191
"cloudpickle",
92-
"hypothesis>=6.0",
92+
"hypothesis>=6.0; sys_platform != 'ios'", # slow on iOS, can fail health check
9393
"pytest-benchmark",
9494
"pytest>=6.0",
95-
"pytest-xdist",
95+
"pytest-xdist; sys_platform != 'ios'", # No processes on iOS
9696
"numpy",
9797
]
9898
github = [
@@ -183,6 +183,7 @@ test-skip = [
183183
"pp310-macosx_arm64",
184184
"gp311_242-macosx_x86_64",
185185
"gp311_242-manylinux_aarch64",
186+
"gp311_242-win*", # pytest crashes with module 'io' has no attribute '_WindowsConsoleIO'
186187
"cp31*-musllinux_*", # Threading test crashes
187188
]
188189
enable = ["cpython-freethreading", "pypy", "cpython-prerelease", "graalpy"]

0 commit comments

Comments
 (0)