Skip to content

github actions: splitting linux arm64 wheels into seperate jobs for e… #261

github actions: splitting linux arm64 wheels into seperate jobs for e…

github actions: splitting linux arm64 wheels into seperate jobs for e… #261

Workflow file for this run

name: Build wheels
on: [push, pull_request]
# Cannot use cibuildwheels because the current images used by cibuildwheels do not support C++17.
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.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: Check LongPathsEnabled
run: |
(Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled
- 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
pip install setuptools
pip install build
- name: build
run: python -m build
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: ./dist/*.whl
build_wheels_mac:
name: ${{ matrix.os }} ${{ matrix.python-version }} wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Trying to use cibuildwheels to build mac wheels fails because the version of XCode is not high enough.
# There is documentation here https://github.com/pypa/cibuildwheel/blob/main/docs/cpp_standards.md on how to
# set it but I could not get it to work while using the standard images provided by github actions does work.
os: [macos-latest, macos-13]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
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
pip install setuptools
pip install build
- name: build
run: python -m build
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: ./dist/*.whl
build_wheels_manylinux_x86_64:
name: Build manylinux wheels
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-*"
CIBW_ARCHS_LINUX: "x86_64"
run: |
cibuildwheel --output-dir wheelhouse
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
build_wheels_manylinux_arm64_python_3.8:

Check failure on line 113 in .github/workflows/build_wheels.yml

View workflow run for this annotation

GitHub Actions / Build wheels

Invalid workflow file

The workflow is not valid. .github/workflows/build_wheels.yml (Line: 113, Col: 3): The identifier 'build_wheels_manylinux_arm64_python_3.8' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters. .github/workflows/build_wheels.yml (Line: 144, Col: 3): The identifier 'build_wheels_manylinux_arm64_python_3.9' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
name: Build manylinux wheels python3.8 (arm64)
runs-on: ubuntu-24.04
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: arm64
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Build wheels with cibuildwheel
env:
CIBW_PLATFORM: "linux"
CIBW_BUILD: "cp38-*"
CIBW_ARCHS_LINUX: "aarch64"
run: |
cibuildwheel --output-dir wheelhouse
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
build_wheels_manylinux_arm64_python_3.9:
name: Build manylinux wheels python3.9 (arm64)
runs-on: ubuntu-24.04
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: arm64
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Build wheels with cibuildwheel
env:
CIBW_PLATFORM: "linux"
CIBW_BUILD: "cp39-*"
CIBW_ARCHS_LINUX: "aarch64"
run: |
cibuildwheel --output-dir wheelhouse
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
build_wheels_manylinux_arm64_python_3.10:
name: Build manylinux wheels python3.10 (arm64)
runs-on: ubuntu-24.04
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: arm64
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Build wheels with cibuildwheel
env:
CIBW_PLATFORM: "linux"
CIBW_BUILD: "cp310-*"
CIBW_ARCHS_LINUX: "aarch64"
run: |
cibuildwheel --output-dir wheelhouse
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
build_wheels_manylinux_arm64_python_3.11:
name: Build manylinux wheels python3.11 (arm64)
runs-on: ubuntu-24.04
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: arm64
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Build wheels with cibuildwheel
env:
CIBW_PLATFORM: "linux"
CIBW_BUILD: "cp311-*"
CIBW_ARCHS_LINUX: "aarch64"
run: |
cibuildwheel --output-dir wheelhouse
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
build_wheels_manylinux_arm64_python_3.12:
name: Build manylinux wheels python3.12 (arm64)
runs-on: ubuntu-24.04
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: arm64
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Build wheels with cibuildwheel
env:
CIBW_PLATFORM: "linux"
CIBW_BUILD: "cp312-*"
CIBW_ARCHS_LINUX: "aarch64"
run: |
cibuildwheel --output-dir wheelhouse
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl