|
4 | 4 | workflow_dispatch:
|
5 | 5 | pull_request:
|
6 | 6 | branches:
|
7 |
| - - master |
| 7 | + - master |
8 | 8 |
|
9 | 9 | concurrency:
|
10 | 10 | group: ${{ github.workflow }}-${{ github.ref }}
|
11 | 11 | cancel-in-progress: true
|
12 | 12 |
|
| 13 | + |
13 | 14 | jobs:
|
14 |
| - build-pyodide: |
15 |
| - name: Pyodide |
16 |
| - runs-on: ubuntu-latest |
| 15 | + build: |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + include: |
| 20 | + - platform: android |
| 21 | + os: macos-13 |
| 22 | + - platform: android |
| 23 | + os: macos-latest |
| 24 | + - platform: ios |
| 25 | + os: macos-latest |
| 26 | + archs: all |
| 27 | + - platform: pyodide |
| 28 | + os: ubuntu-latest |
| 29 | + |
| 30 | + name: ${{ matrix.platform }} on ${{ matrix.os }} |
| 31 | + runs-on: ${{ matrix.os }} |
| 32 | + |
17 | 33 | steps:
|
18 | 34 | - uses: actions/checkout@v4
|
19 | 35 |
|
20 | 36 | - uses: actions/setup-python@v5
|
21 | 37 |
|
22 |
| - |
23 |
| - env: |
24 |
| - CIBW_PLATFORM: pyodide |
| 38 | + - if: matrix.platform == 'ios' |
| 39 | + run: brew upgrade cmake |
25 | 40 |
|
26 |
| - - uses: actions/upload-artifact@v4 |
27 |
| - with: |
28 |
| - name: wheels-pyodide |
29 |
| - path: dist/*.whl |
| 41 | + # GitHub Actions can't currently run the Android emulator on macOS. |
| 42 | + - name: Skip Android tests on macOS |
| 43 | + if: runner.os == 'macOS' |
| 44 | + run: echo "CIBW_TEST_COMMAND=" >> "$GITHUB_ENV" |
30 | 45 |
|
31 |
| - build-ios: |
32 |
| - name: iOS |
33 |
| - runs-on: macos-latest |
34 |
| - steps: |
35 |
| - - uses: actions/checkout@v4 |
36 |
| - |
37 |
| - - uses: actions/setup-python@v5 |
| 46 | + # https://github.blog/changelog/2024-04-02-github-actions-hardware-accelerated-android-virtualization-now-available/ |
| 47 | + - name: Enable KVM for Android emulator |
| 48 | + if: runner.os == 'Linux' && matrix.platform == 'android' |
| 49 | + run: | |
| 50 | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules |
| 51 | + sudo udevadm control --reload-rules |
| 52 | + sudo udevadm trigger --name-match=kvm |
38 | 53 |
|
39 |
| - - run: brew upgrade cmake |
| 54 | + - if: matrix.platform == 'android' |
| 55 | + run: pipx install patchelf |
40 | 56 |
|
41 |
| - - uses: pypa/cibuildwheel@v3.1 |
| 57 | + - uses: pypa/cibuildwheel@63bdd4f043a77f1bd23b2ba9376972b6dc7b4779 |
42 | 58 | env:
|
43 |
| - CIBW_PLATFORM: ios |
44 |
| - CIBW_ARCHS: all |
| 59 | + CIBW_PLATFORM: ${{ matrix.platform }} |
| 60 | + CIBW_ARCHS: ${{ matrix.archs || 'auto' }} |
45 | 61 |
|
46 | 62 | - uses: actions/upload-artifact@v4
|
47 | 63 | with:
|
48 |
| - name: wheels-ios |
| 64 | + name: wheels-${{ matrix.platform }}-${{ matrix.os }} |
49 | 65 | path: dist/*.whl
|
0 commit comments