-
Notifications
You must be signed in to change notification settings - Fork 41
65 lines (52 loc) · 1.73 KB
/
cibw-cc.yaml
File metadata and controls
65 lines (52 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CIBW cross-compile
on:
workflow_dispatch:
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: android
os: ubuntu-latest
- platform: android
os: macos-latest
- platform: ios
os: macos-latest
archs: all
- platform: pyodide
os: ubuntu-latest
name: ${{ matrix.platform }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- if: matrix.platform == 'ios'
run: brew upgrade cmake
# GitHub Actions can't currently run the Android emulator on macOS.
- name: Skip Android tests on macOS
if: runner.os == '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: runner.os == 'Linux' && matrix.platform == 'android'
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
- if: matrix.platform == 'android'
run: pipx install patchelf
- uses: pypa/cibuildwheel@v3.4
env:
CIBW_PLATFORM: ${{ matrix.platform }}
CIBW_ARCHS: ${{ matrix.archs || 'auto' }}
- uses: actions/upload-artifact@v7
with:
name: wheels-${{ matrix.platform }}-${{ matrix.os }}
path: dist/*.whl