@@ -17,10 +17,32 @@ jobs:
1717
1818 build-native :
1919 runs-on : ${{ matrix.os }}
20- continue-on-error : true
20+ # continue-on-error: true
2121 strategy :
2222 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
2446 steps :
2547 - uses : actions/checkout@v4
2648 with :
@@ -40,11 +62,11 @@ jobs:
4062 - name : Pull LFS
4163 run : git lfs pull
4264
43- - name : Setup QEMU (Linux only )
44- if : runner.os == 'Linux' && runner.arch == 'X64'
65+ - name : Setup QEMU (Linux)
66+ if : runner.os == 'Linux' && runner.arch == 'X64' && matrix.arch != 'x86_64'
4567 uses : docker/setup-qemu-action@v3
4668 with :
47- platforms : all
69+ platforms : ${{ matrix.arch == 'ppc64le' && 'linux/ppc64le' || matrix.arch == 's390x' && 'linux/s390x' || '' }}
4870
4971 - name : Setup Rust
5072 if : ${{ matrix.os != 'windows-11-arm' }}
@@ -70,19 +92,29 @@ jobs:
7092 - name : Build wheels
7193 run : python -m cibuildwheel --output-dir dist
7294 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
7597 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' || '' }}
77100 # Manually install setuptools-rust to enable building native wheels
78101 CIBW_BEFORE_BUILD : >
79- python -m pip install -U setuptools>=77.0.0 setuptools_scm[toml]>=6.4.0 setuptools-rust
102+ python -m pip install -U tomli setuptools-rust &&
103+ python -m pip install -U `python -c 'import tomli; print(" ".join(tomli.load(open("pyproject.toml", "rb"))["build-system"]["requires"]))'`
104+ CIBW_BEFORE_BUILD_WINDOWS : >
105+ python -m pip install -U tomli setuptools-rust &&
106+ python -m pip install -I @($(python -c "import tomli; print(*tomli.load(open('pyproject.toml', 'rb'))['build-system']['requires'])") -split " ")
107+ # Disable build isolation so we utilize setuptools-rust
80108 CIBW_BUILD_FRONTEND : " build; args: --no-isolation"
109+ # Set the limited API to CPython 3.9
81110 CIBW_CONFIG_SETTINGS : --build-option=--py-limited-api=cp39
111+ # Enable PyPy builds
82112 CIBW_ENABLE : pypy
113+ # Specific environment variables for each OS
83114 CIBW_ENVIRONMENT_LINUX : PATH="$HOME/.cargo/bin:$PATH"
84115 CIBW_ENVIRONMENT_MACOS : MACOSX_DEPLOYMENT_TARGET=10.12
85- CIBW_SKIP : ' *-musllinux_i686'
116+ # There are no Rust releases for these architectures
117+ CIBW_SKIP : ' *-musllinux_i686 *-musllinux_ppc64le *-musllinux_s390x *-musllinux_armv7l'
86118 # Run tests
87119 CIBW_TEST_REQUIRES : tox
88120 CIBW_TEST_COMMAND : tox -e native -c {package}/tox.ini --installpkg {wheel}
92124
93125 - uses : actions/upload-artifact@v4
94126 with :
95- name : packages-native-${{ matrix.os }}
127+ name : packages-native-${{ matrix.os }}-${{ matrix.arch }}
96128 path : dist/*
97129 retention-days : 1
98130
0 commit comments