Skip to content
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
65 changes: 39 additions & 26 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,32 +145,45 @@ jobs:
path: wheelhouse/*.whl
name: wheels-ios-${{ matrix.runs-on }}

# build_android_wheels:
# name: Android ${{ matrix.runs-on }}
# runs-on: ${{ matrix.runs-on }}
# strategy:
# fail-fast: false
# matrix:
# runs-on: [ubuntu-latest, macos-latest]
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# submodules: true
#
# - uses: mhsmith/cibuildwheel@android
# env:
# CIBW_PLATFORM: android
#
# - name: Verify clean directory
# run: git diff --exit-code
# shell: bash
#
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# path: wheelhouse/*.whl
# name: wheels-android-${{ matrix.runs-on }}
build_android_wheels:
name: Android ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

# GitHub Actions can't currently run the Android emulator on macOS.
- name: Skip Android tests on macOS
if: contains(matrix.runs-on, 'macos')
run: echo "CIBW_TEST_COMMAND=" >> "$GITHUB_ENV"

# https://github.blog/changelog/2024-04-02-github-actions-hardware-accelerated-android-virtualization-now-available/
- name: Enable KVM for Android emulator
if: contains(matrix.runs-on, 'ubuntu')
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- uses: pypa/[email protected]
env:
CIBW_PLATFORM: android

- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
path: wheelhouse/*.whl
name: wheels-android-${{ matrix.runs-on }}

upload_all:
name: Upload if release
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ xbuild-tools = ["cmake", "ninja"]
test-command = "python -m pytest --benchmark-disable tests"
environment.PIP_EXTRA_INDEX_URL = "https://pypi.anaconda.org/beeware/simple/"

# [tool.cibuildwheel.android]
# build-frontend = "build"
# xbuild-tools = ["cmake", "ninja"]
# test-command = "pytest --benchmark-disable tests"
# environment.PIP_EXTRA_INDEX_URL = "https://chaquo.com/pypi-13.1"
[tool.cibuildwheel.android]
build-frontend = "build"
test-command = "python -m pytest --benchmark-disable tests"
environment.ANDROID_API_LEVEL = "24"
environment.PIP_EXTRA_INDEX_URL = "https://chaquo.com/pypi-13.1"

[[tool.cibuildwheel.overrides]]
select = "pp310-macosx_arm64"
Expand Down
Loading