@@ -68,55 +68,55 @@ jobs:
6868 path : dist/*.whl
6969
7070 build-wheels-mypyc :
71- name : MyPyC ${{ matrix.os }} py${{ matrix.python-version }}
71+ name : Build MyPyC wheels
72+ runs-on : ubuntu-latest
7273 strategy :
73- fail-fast : false
7474 matrix :
75- os : ${{ github.event.inputs.test_matrix == 'full' && fromJSON('["ubuntu-latest", "windows-latest", "macos-latest", "macos-13"]') || fromJSON('["ubuntu-latest"]') }}
7675 python-version : ${{ github.event.inputs.test_matrix == 'full' && fromJSON('["3.9", "3.10", "3.11", "3.12", "3.13"]') || fromJSON('["3.12"]') }}
77- exclude :
78- - os : windows-latest
79- python-version : " 3.9"
80- - os : macos-13
81- python-version : " 3.13"
82-
83- runs-on : ${{ matrix.os }}
8476 steps :
8577 - name : Check out repository
8678 uses : actions/checkout@v4
8779
88- - name : Install uv
89- uses : astral-sh/setup-uv@v4
90-
91- - name : Set up Python ${{ matrix.python-version }}
92- run : uv python install ${{ matrix.python-version }}
80+ - name : Set up Python
81+ uses : actions/setup-python@v5
82+ with :
83+ python-version : ${{ matrix.python-version }}
9384
94- - name : Install dependencies with mypyc extras
95- run : uv sync --extra mypyc --group build
85+ - name : Install cibuildwheel
86+ run : python -m pip install cibuildwheel
9687
97- - name : Build MyPyC wheel
98- run : uv build --wheel
88+ - name : Build wheels with cibuildwheel
89+ run : python -m cibuildwheel --output-dir wheelhouse
9990 env :
91+ # Enable mypyc compilation
10092 HATCH_BUILD_HOOKS_ENABLE : " 1"
10193 MYPYC_OPT_LEVEL : " 3"
10294 MYPYC_DEBUG_LEVEL : " 0"
10395 MYPYC_MULTI_FILE : " 1"
104- shell : bash
10596
106- - name : Repair Linux wheels with auditwheel
107- if : runner.os == 'Linux'
108- run : |
109- for wheel in dist/*.whl; do
110- echo "Repairing $wheel"
111- uv tool run auditwheel repair "$wheel" -w dist/ --plat manylinux_2_17_x86_64
112- rm "$wheel"
113- done
97+ # Configure cibuildwheel
98+ CIBW_BUILD : " cp${{ matrix.python-version }}-*"
99+ CIBW_BUILD_VERBOSITY : 1
100+
101+ # Platform configuration - limited for testing
102+ CIBW_ARCHS_LINUX : ${{ github.event.inputs.test_matrix == 'full' && '"x86_64 aarch64"' || '"x86_64"' }}
103+ CIBW_ARCHS_MACOS : ${{ github.event.inputs.test_matrix == 'full' && '"x86_64 arm64"' || '"x86_64"' }}
104+ CIBW_ARCHS_WINDOWS : ${{ github.event.inputs.test_matrix == 'full' && '"AMD64"' || '"AMD64"' }}
105+
106+ # Skip problematic combinations
107+ CIBW_SKIP : " cp39-win_arm64 *-musllinux*"
114108
115- - name : Upload mypyc wheel artifacts
109+ # Use uv for faster dependency resolution
110+ CIBW_BEFORE_BUILD : " pip install uv && uv sync --extra mypyc --group build"
111+
112+ # Test the built wheels
113+ CIBW_TEST_COMMAND : " python -c \" import sqlspec; print('MyPyC wheel test passed')\" "
114+
115+ - name : Upload wheel artifacts
116116 uses : actions/upload-artifact@v4
117117 with :
118- name : wheels-mypyc-${{ matrix.os }}- py${{ matrix.python-version }}
119- path : dist /*.whl
118+ name : wheels-mypyc-py${{ matrix.python-version }}
119+ path : wheelhouse /*.whl
120120
121121 test-wheels :
122122 name : Test ${{ matrix.os }} py${{ matrix.python-version }}
@@ -147,7 +147,8 @@ jobs:
147147 - name : Download mypyc wheel artifacts
148148 uses : actions/download-artifact@v4
149149 with :
150- name : wheels-mypyc-${{ matrix.os }}-py${{ matrix.python-version }}
150+ pattern : wheels-mypyc-*
151+ merge-multiple : true
151152 path : dist-mypyc/
152153
153154 - name : Test standard wheel installation
0 commit comments