Parcourir la source

Add Android wheel building support to cibuildwheel workflow

Extends existing cibuildwheel matrix to include Android platform
for building Python wheels that can be distributed on Android.
Jelmer Vernooij il y a 5 mois
Parent
commit
e76a0614ab
1 fichiers modifiés avec 23 ajouts et 0 suppressions
  1. 23 0
      .github/workflows/python-distributions.yml

+ 23 - 0
.github/workflows/python-distributions.yml

@@ -84,6 +84,28 @@ jobs:
           name: artifact-${{ matrix.build-identifier }}
           path: ./wheelhouse/*.whl
 
+  build-android-wheels:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-python@v5
+        with:
+          cache: pip
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install setuptools wheel cibuildwheel setuptools-rust
+      - name: Build Android wheels
+        run: python -m cibuildwheel --output-dir wheelhouse
+        env:
+          CIBW_PLATFORM: android
+          CIBW_ARCHS_ANDROID: arm64_v8a x86_64
+      - name: Upload Android wheels
+        uses: actions/upload-artifact@v4
+        with:
+          name: artifact-android
+          path: ./wheelhouse/*.whl
+
   build-pure-wheels:
     runs-on: ubuntu-latest
     steps:
@@ -146,6 +168,7 @@ jobs:
     runs-on: ubuntu-latest
     needs:
       - build-wheels
+      - build-android-wheels
       - build-sdist
       - build-pure-wheels
     if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/dulwich-')