Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions .github/workflows/python_wheel_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,44 @@
matrix:
python: [cp310, cp311, cp312, cp313, cp314]
config:
# `label` is a unique artifact name for each build
- runner: macos-15
platform: macosx_arm64
label: macosx_arm64
deployment_target: "15.0"
- runner: macos-26
platform: macosx_arm64
label: macosx_arm64
deployment_target: "26.0"
- runner: ubuntu-latest
platform: manylinux_x86_64
deployment_target: ""
label: manylinux_2_28_x86_64
manylinux_image: manylinux_2_28
- runner: ubuntu-24.04-arm
platform: manylinux_aarch64
deployment_target: ""
name: ${{ matrix.python }}-${{ matrix.config.platform }}-${{ matrix.config.runner }}
label: manylinux_2_28_aarch64
manylinux_image: manylinux_2_28
- runner: ubuntu-latest
platform: manylinux_x86_64
label: manylinux_2_34_x86_64
manylinux_image: manylinux_2_34
- runner: ubuntu-24.04-arm
platform: manylinux_aarch64
label: manylinux_2_34_aarch64
manylinux_image: manylinux_2_34
name: ${{ matrix.python }}-${{ matrix.config.label }}-${{ matrix.config.runner }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.ref }}
- uses: ./.github/workflows/cibuildwheel-impl
env:
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.config.deployment_target }}
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.config.manylinux_image }}
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.config.manylinux_image }}
with:
build-tag: ${{ matrix.python }}-${{ matrix.config.platform }}
artifact-name: ${{ matrix.python }}-${{ matrix.config.platform }}-${{ matrix.config.runner }}
artifact-name: ${{ matrix.python }}-${{ matrix.config.label }}-${{ matrix.config.runner }}

test-wheels:
needs: build-wheels
Expand All @@ -64,14 +79,18 @@
test_config:
# each runner tests the wheel built on it
- runner: macos-15
wheel_name_pattern: "macosx_15"
build_label: macosx_arm64
- runner: macos-26
wheel_name_pattern: "macosx_26"
build_label: macosx_arm64
- runner: ubuntu-latest
build_label: manylinux_2_28_x86_64
- runner: ubuntu-24.04-arm
build_label: manylinux_2_28_aarch64
- runner: ubuntu-latest
wheel_name_pattern: "x86_64"
build_label: manylinux_2_34_x86_64
- runner: ubuntu-24.04-arm
wheel_name_pattern: "aarch64"
name: test-cp${{ matrix.python }}-${{ matrix.test_config.wheel_name_pattern }}
build_label: manylinux_2_34_aarch64
name: test-cp${{ matrix.python }}-${{ matrix.test_config.build_label }}-${{ matrix.test_config.runner }}
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -80,6 +99,7 @@
uses: actions/download-artifact@v4
with:
path: wheels
pattern: cp*-${{ matrix.test_config.build_label }}-${{ matrix.test_config.runner }}
merge-multiple: true

- name: Setup Python
Expand All @@ -88,10 +108,10 @@
python-version: ${{ matrix.python }}

- name: Install produced wheel
run: |

Check failure on line 111 in .github/workflows/python_wheel_build.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

shellcheck reported issue in this script: SC2012:info:3:9: Use find instead of ls to better handle non-alphanumeric filenames

Check failure on line 111 in .github/workflows/python_wheel_build.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

shellcheck reported issue in this script: SC2012:info:3:9: Use find instead of ls to better handle non-alphanumeric filenames
ls -R wheels
PY_VER=$(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')")
WHEEL=$(ls wheels/*${PY_VER}*${{ matrix.test_config.wheel_name_pattern }}*.whl | head -n 1)
WHEEL=$(ls wheels/*${PY_VER}*.whl | head -n 1)
echo "Python version: ${PY_VER}, installing wheel: ${WHEEL}"
pip install "$WHEEL"

Expand Down Expand Up @@ -123,7 +143,7 @@
uses: actions/setup-python@v5

- name: Create PEP503-compliant wheel registry
run: |

Check failure on line 146 in .github/workflows/python_wheel_build.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

shellcheck reported issue in this script: SC2035:info:2:4: Use ./*glob* or -- *glob* so names with dashes won't become options

Check failure on line 146 in .github/workflows/python_wheel_build.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

shellcheck reported issue in this script: SC2035:info:2:4: Use ./*glob* or -- *glob* so names with dashes won't become options
mkdir -p wheelhouse
mv *.whl wheelhouse
python -m pip install --upgrade pip
Expand Down
Loading