Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion .github/workflows/cibuildwheel-impl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
build-tag:
description: 'The tag for this build'
required: true
artifact-name:
description: 'The name of the artifact to upload'
required: true

runs:
using: "composite"
Expand All @@ -16,6 +19,6 @@ runs:
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
name: ${{ inputs.build-tag }}
name: ${{ inputs.artifact-name }}
path: wheelhouse/*
retention-days: 1
39 changes: 30 additions & 9 deletions .github/workflows/python_wheel_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,49 @@
(github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch')) ||
contains(github.event.pull_request.labels.*.name, 'build-python-wheels')
runs-on: ubuntu-latest
runs-on: ${{ matrix.config.runner }}
strategy:
fail-fast: false
matrix:
target: [cp310-manylinux_x86_64, cp311-manylinux_x86_64, cp312-manylinux_x86_64, cp313-manylinux_x86_64, cp314-manylinux_x86_64]
name: ${{ matrix.target }}
python: [cp310, cp311, cp312, cp313, cp314]
config:
- runner: macos-15
platform: macosx_arm64
deployment_target: "15.0"
- runner: macos-26
platform: macosx_arm64
deployment_target: "26.0"
- runner: ubuntu-latest
platform: manylinux_x86_64
deployment_target: ""
name: ${{ matrix.python }}-${{ matrix.config.platform }}-${{ 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 }}
with:
build-tag: ${{ matrix.target }}
build-tag: ${{ matrix.python }}-${{ matrix.config.platform }}
artifact-name: ${{ matrix.python }}-${{ matrix.config.platform }}-${{ matrix.config.runner }}

test-wheels:
needs: build-wheels
runs-on: ubuntu-latest
runs-on: ${{ matrix.test_config.runner }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
name: test-wheel-cp${{ matrix.python-version }}
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
test_config:
# each runner tests the wheel built on it
- runner: macos-15
wheel_name_pattern: "macosx_15"
- runner: macos-26
wheel_name_pattern: "macosx_26"
- runner: ubuntu-latest
wheel_name_pattern: "manylinux"
name: test-cp${{ matrix.python }}-${{ matrix.test_config.wheel_name_pattern }}
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -59,13 +80,13 @@
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}

- name: Install produced wheel
run: |

Check failure on line 86 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}*.whl | head -n 1)
WHEEL=$(ls wheels/*${PY_VER}*${{ matrix.test_config.wheel_name_pattern }}*.whl | head -n 1)
echo "Python version: ${PY_VER}, installing wheel: ${WHEEL}"
pip install "$WHEEL"

Expand Down Expand Up @@ -97,7 +118,7 @@
uses: actions/setup-python@v5

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

Check failure on line 121 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
3 changes: 3 additions & 0 deletions test/wheels/test_tutorials.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def test_tutorial(tutorial):
env = dict(**os.environ)
# force matplotlib to use a non-GUI backend
env["MPLBACKEND"] = "Agg"
# Tell tutorials that block on GUI input (e.g. Draw(block=True))
# not to wait for interactive input
env["ROOT_BATCH"] = "1"
print("Test env:", env)
try:
result = subprocess.run(
Expand Down
Loading