Fixes typo in uname-a → uname -a. Ensures QEMU is fully initialized. #282
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build wheels | |
on: [push, pull_request] | |
jobs: | |
build_wheels_windows: | |
name: ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.arch }} wheels | |
runs-on: ${{ matrix.os }} | |
env: | |
TEMP: C:\Temp | |
TMP: C:\Temp | |
strategy: | |
matrix: | |
os: [windows-2022] | |
arch: [x86, x64] | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- name: Support longpaths | |
run: git config --system core.longpaths true | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.arch }} | |
- name: Install packages | |
run: | | |
pip install wheel setuptools build | |
- name: build | |
run: python -m build | |
- name: upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-windows-${{ matrix.python-version }}-${{ matrix.arch }}-${{ github.run_id }} | |
path: ./dist/*.whl | |
build_wheels_mac: | |
name: ${{ matrix.os }} ${{ matrix.python-version }} wheels | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, macos-13] | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
env: | |
SYSTEM_VERSION_COMPAT: 0 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages | |
run: | | |
pip install wheel setuptools build | |
- name: build | |
run: python -m build | |
- name: upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-macos-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_id }} | |
path: ./dist/*.whl | |
build_wheels_manylinux_x86_64: | |
name: Build manylinux wheels (x86_64) | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install --upgrade pip | |
pip install cibuildwheel | |
- name: Build wheels with cibuildwheel | |
env: | |
CIBW_PLATFORM: "linux" | |
CIBW_SKIP: "cp36-* cp37-* cp38-*" | |
CIBW_ARCHS_LINUX: "x86_64" | |
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux_2_28_x86_64" | |
CIBW_BUILD_VERBOSITY: 3 # Enable detailed logging | |
run: | | |
cibuildwheel --output-dir wheelhouse | |
- name: upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux-x86_64-${{ github.run_id }} | |
path: wheelhouse/*.whl | |
build_wheels_manylinux_arm64: | |
name: Build manylinux wheels (ARM64) | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
python-version: ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Register QEMU for cross-architecture emulation | |
- name: Set up QEMU for cross-compilation | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all # Ensures ARM64 is fully supported | |
- name: Debug - Show QEMU status | |
run: | | |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
docker run --rm --platform linux/aarch64 quay.io/pypa/manylinux_2_28_aarch64 un-a | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install --upgrade pip | |
pip install cibuildwheel | |
- name: Debug - Test Python in Container | |
run: | | |
docker run --rm --platform linux/aarch64 quay.io/pypa/manylinux_2_28_aarcpython3 --version | |
- name: Build wheels with cibuildwheel | |
env: | |
CIBW_PLATFORM: "linux" | |
CIBW_BUILD: ${{ matrix.python-version }} | |
CIBW_ARCHS_LINUX: "aarch64" | |
CIBW_MANYLINUX_AARCH64_IMAGE: "quay.io/pypa/manylinux_2_28_aarch64" | |
CIBW_ENVIRONMENT: "CXXFLAGS='-g -O2 -fno-omit-frame-pointer'" | |
CIBW_BUILD_VERBOSITY: 3 | |
run: | | |
cibuildwheel --output-dir wheelhouse | |
- name: upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux-arm64-${{ matrix.python-version }}-${{ github.run_id }} | |
path: wheelhouse/*.whl |