diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index bd250ea..1a89ac1 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -10,7 +10,7 @@ on: jobs: build_wheels: - name: ${{ matrix.os }}, ${{matrix.python_impl }} ${{ matrix.python }} + name: ${{ matrix.os }}, ${{matrix.python_impl }} ${{ matrix.python }}${{ matrix.variant == 'musllinux' && ', musllinux' || '' }} runs-on: ${{ matrix.os }} defaults: run: @@ -18,9 +18,14 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel, windows-11-arm] + # Every job builds a single wheel. Linux x86_64 has two wheels for each + # Python (manylinux and musllinux), so it has two jobs; the musllinux + # job is the one with variant musllinux. Linux aarch64 is built natively + # on an ARM runner. See CIBW_SKIP and CIBW_ARCHS_LINUX below. + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest, macos-15-intel, windows-11-arm] python: [cp310, cp311, cp312, cp313, cp314, cp314t, cp315, cp315t] python_impl: [Python] + variant: [default, musllinux] include: - python: cp313 os: ubuntu-latest @@ -32,15 +37,30 @@ jobs: python: cp311 - os: windows-11-arm python: cp312 + # No musllinux wheels for aarch64 and no separate musllinux job + # outside of Linux x86_64 + - os: ubuntu-24.04-arm + variant: musllinux + - os: windows-latest + variant: musllinux + - os: macos-latest + variant: musllinux + - os: macos-15-intel + variant: musllinux + - os: windows-11-arm + variant: musllinux env: BUILD_COMMIT: "main" # or a specific version, e.g., v0.13.1 CIBW_BUILD: ${{ matrix.python }}-* CIBW_ENABLE: cpython-prerelease - CIBW_ARCHS_LINUX: "x86_64 aarch64" + # Build only for the architecture of the runner, so each job builds a + # single wheel and nothing runs under emulation + CIBW_ARCHS_LINUX: native CIBW_ARCHS_MACOS: native - # No support for musl or Win32 for 3.10+ - # Skip musl for 3.8 and 3.9 since no upstream wheels - CIBW_SKIP: "*-win32 *musllinux_aarch64*" + # No support for Win32 for 3.10+ + # The musllinux variant builds only musllinux wheels, all other jobs + # build no musllinux wheel (so there is no musllinux aarch64 wheel) + CIBW_SKIP: "*-win32 ${{ matrix.variant == 'musllinux' && '*manylinux*' || '*musllinux*' }}" CIBW_TEST_REQUIRES: pytest pytest-xdist pytest-randomly threadpoolctl pytest-run-parallel pandas<3.1 CIBW_TEST_COMMAND: python -c "import numpy; numpy.show_runtime(); import statsmodels; statsmodels.test(['-m','(not slow and not example)','-n','2','--randomly-dont-reset-seed'], exit=True)" # Avoid testing on emulated architectures and Pyodide @@ -59,12 +79,6 @@ jobs: submodules: recursive fetch-depth: 0 - - name: Set up QEMU - if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v4 - with: - platforms: all - - name: Build wheels (Default) uses: pypa/cibuildwheel@v4.3 if: (matrix.python_impl != 'Pyodide')