|
20 | 20 | continue-on-error: true |
21 | 21 | strategy: |
22 | 22 | matrix: |
23 | | - os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-14] |
| 23 | + include: |
| 24 | + - os: ubuntu-latest |
| 25 | + arch: x86_64 |
| 26 | + - os: ubuntu-latest |
| 27 | + arch: i686 |
| 28 | + - os: ubuntu-latest |
| 29 | + arch: ppc64le |
| 30 | + - os: ubuntu-latest |
| 31 | + arch: s390x |
| 32 | + - os: ubuntu-24.04-arm |
| 33 | + arch: aarch64 |
| 34 | + - os: ubuntu-24.04-arm |
| 35 | + arch: armv7l |
| 36 | + - os: windows-latest |
| 37 | + arch: AMD64 |
| 38 | + - os: windows-latest |
| 39 | + arch: x86 |
| 40 | + - os: windows-11-arm |
| 41 | + arch: ARM64 |
| 42 | + - os: macos-13 |
| 43 | + arch: x86_64 |
| 44 | + - os: macos-14 |
| 45 | + arch: arm64 |
24 | 46 | steps: |
25 | 47 | - uses: actions/checkout@v4 |
26 | 48 | with: |
@@ -70,19 +92,25 @@ jobs: |
70 | 92 | - name: Build wheels |
71 | 93 | run: python -m cibuildwheel --output-dir dist |
72 | 94 | env: |
73 | | - CIBW_ARCHS_LINUX: ${{ runner.arch == 'X64' && 'auto ppc64le s390x' || 'auto armv7l' }} |
74 | | - CIBW_ARCHS_WINDOWS: ${{ runner.arch == 'X64' && 'AMD64 x86' || 'ARM64' }} |
| 95 | + CIBW_ARCHS: ${{ matrix.arch }} |
| 96 | + # Rust needs to be installed in every Linux container |
75 | 97 | CIBW_BEFORE_ALL_LINUX: curl -sSf https://sh.rustup.rs | sh -s -- -y |
76 | | - CIBW_BEFORE_ALL_WINDOWS: ${{ runner.arch == 'X64' && 'rustup target add i686-pc-windows-msvc' || '' }} |
| 98 | + # Add i686 target for Windows only when building for x86 |
| 99 | + CIBW_BEFORE_ALL_WINDOWS: ${{ matrix.arch == 'x86' && 'rustup target add i686-pc-windows-msvc' || '' }} |
77 | 100 | # Manually install setuptools-rust to enable building native wheels |
78 | 101 | CIBW_BEFORE_BUILD: > |
79 | 102 | python -m pip install -U setuptools>=77.0.0 setuptools_scm[toml]>=6.4.0 setuptools-rust |
| 103 | + # Disable build isolation so we utilize setuptools-rust |
80 | 104 | CIBW_BUILD_FRONTEND: "build; args: --no-isolation" |
| 105 | + # Set the limited API to CPython 3.9 |
81 | 106 | CIBW_CONFIG_SETTINGS: --build-option=--py-limited-api=cp39 |
| 107 | + # Enable PyPy builds |
82 | 108 | CIBW_ENABLE: pypy |
| 109 | + # Specific environment variables for each OS |
83 | 110 | CIBW_ENVIRONMENT_LINUX: PATH="$HOME/.cargo/bin:$PATH" |
84 | 111 | CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.12 |
85 | | - CIBW_SKIP: '*-musllinux_i686' |
| 112 | + # There are no Rust releases for these architectures |
| 113 | + CIBW_SKIP: '*-musllinux_i686 *-musllinux_armv7l *-musllinux_ppc64le *-musllinux_s390x' |
86 | 114 | # Run tests |
87 | 115 | CIBW_TEST_REQUIRES: tox |
88 | 116 | CIBW_TEST_COMMAND: tox -e native -c {package}/tox.ini --installpkg {wheel} |
|
0 commit comments