Skip to content

Commit 7d59cb1

Browse files
committed
Build Android wheels
1 parent 5d698c5 commit 7d59cb1

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ jobs:
3030
include:
3131
- archs: auto
3232
platform: auto
33+
- os: android-intel
34+
runs-on: ubuntu-latest
35+
platform: android
36+
- os: android-arm
37+
runs-on: macos-latest
38+
platform: android
3339
- os: ios
3440
runs-on: macos-latest
3541
platform: ios
@@ -58,12 +64,25 @@ jobs:
5864
submodules: true
5965
persist-credentials: false
6066

67+
# GitHub Actions can't currently run the Android emulator on macOS.
68+
- name: Skip Android tests on macOS
69+
if: matrix.os == 'android-arm'
70+
run: echo "CIBW_TEST_COMMAND=" >> "$GITHUB_ENV"
71+
72+
# https://github.blog/changelog/2024-04-02-github-actions-hardware-accelerated-android-virtualization-now-available/
73+
- name: Enable KVM for Android emulator
74+
if: matrix.os == 'android-intel'
75+
run: |
76+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
77+
sudo udevadm control --reload-rules
78+
sudo udevadm trigger --name-match=kvm
79+
6180
- name: Build wheels
6281
uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # 3.1.0
6382
env:
6483
CIBW_ENABLE: pypy pypy-eol
6584
CIBW_PLATFORM: ${{ matrix.platform }}
66-
CIBW_ARCHS: ${{ matrix.archs }}
85+
CIBW_ARCHS: ${{ matrix.archs || 'auto' }}
6786
MAXMINDDB_REQUIRE_EXTENSION: 1
6887

6988
- uses: actions/upload-artifact@v4

HISTORY.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ History
88

99
* Python 3.14 is now officially supported, including binary wheels.
1010
* We have updated the platforms that we build binary wheels for. In particular,
11-
we now build wheels for iOS, Windows Arm, and Pyodide, and we have dropped
12-
686 (32 bit), ppc64le, and s390x builds on Linux.
11+
we now build wheels for Android, iOS, Windows Arm, and Pyodide, and we have
12+
dropped 686 (32 bit), ppc64le, and s390x builds on Linux.
1313

1414
2.7.0 (2025-05-05)
1515
++++++++++++++++++

0 commit comments

Comments
 (0)