Skip to content

Commit cc4a02e

Browse files
committed
Build Android wheels
1 parent adf3053 commit cc4a02e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
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,6 +64,19 @@ 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:

0 commit comments

Comments
 (0)