From 73681e3f7bc2343f4b933fd665d45b005f7c6a1d Mon Sep 17 00:00:00 2001 From: Kevin Sheppard Date: Fri, 6 Nov 2026 12:10:56 +0000 Subject: [PATCH 1/2] BLD: Build a single wheel in each job As in statsmodels-wheels (MacPython/statsmodels-wheels#225), every job now builds one wheel. The Linux job built three wheels for each Python: manylinux x86_64, musllinux x86_64 and manylinux aarch64, the last under QEMU emulation. - Linux x86_64 has two jobs for each Python, selected by a new variant axis: default builds the manylinux wheel and musllinux the musllinux wheel (CIBW_SKIP skips the other one). The variant is excluded on every other runner. - Linux aarch64 is built natively on ubuntu-24.04-arm, so the QEMU step is removed. Its wheels are still not tested (CIBW_TEST_SKIP is unchanged). - CIBW_ARCHS_LINUX is native, like CIBW_ARCHS_MACOS. - The musllinux jobs are named "..., musllinux". cibuildwheel 4.3.5 --print-build-identifiers on the expanded matrix gives 39 jobs and 39 wheels, one in each job, and the same 39 wheels as the old matrix (27 jobs): cp310 to cp315 for manylinux x86_64 and aarch64, musllinux x86_64, Windows AMD64, macOS arm64 and x86_64, and cp313 to cp315 for Windows ARM64. --- .github/workflows/build-wheels.yml | 37 +++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 5ca7384..8b6ab5a 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -8,7 +8,7 @@ on: jobs: build_wheels: - name: ${{ matrix.os }}, Python ${{ matrix.python }} + name: ${{ matrix.os }}, Python ${{ matrix.python }}${{ matrix.variant == 'musllinux' && ', musllinux' || '' }} runs-on: ${{ matrix.os }} defaults: run: @@ -16,8 +16,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, windows-11-arm, macos-latest, macos-15-intel] + # 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_ARCHS_LINUX and CIBW_SKIP below. + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-latest, macos-15-intel] python: [cp310, cp311, cp312, cp313, cp314, cp315] + variant: [default, musllinux] exclude: # statsmodels has win_arm64 wheels from Python 3.13, so the wheels for older # Pythons could not be tested @@ -27,15 +32,31 @@ 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: windows-11-arm + variant: musllinux + - os: macos-latest + variant: musllinux + - os: macos-15-intel + variant: musllinux env: BUILD_COMMIT: "v7.1" # main or a specific version, e.g., "v6.1" PYPI_UPLOAD: true # true or false TESTPYPI_UPLOAD: false CIBW_BUILD: ${{ matrix.python }}-* - 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 pypy, musl, Win32 for 3.10+ - CIBW_SKIP: "pp* *musllinux_aarch64* *-win32" + # No support for pypy or 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: "pp* *-win32 ${{ matrix.variant == 'musllinux' && '*manylinux*' || '*musllinux*' }}" CIBW_TEST_REQUIRES: pytest>=9,<10 pytest-xdist xarray CIBW_TEST_COMMAND: python -c "import linearmodels; linearmodels.test(['-n','auto','--skip-slow'])" # Avoid testing on emulated architectures @@ -48,12 +69,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 uses: pypa/cibuildwheel@v4.3.5 with: From 4856af9d15ba8e7a6e2edc5690a088bc3494e398 Mon Sep 17 00:00:00 2001 From: Kevin Sheppard Date: Fri, 6 Nov 2026 12:10:57 +0000 Subject: [PATCH 2/2] BLD: Build main without uploading The workflow built v7.1 with PYPI_UPLOAD true. PyPI accepts files for a release only for 14 days after its first upload, so every Windows ARM64 job failed in the upload step with "400 Uploading new files to releases older than 14 days is not allowed", after building and testing its wheel. Building main with PYPI_UPLOAD false makes the runs of this repository trial builds of the next release. For the release of 7.2, set BUILD_COMMIT to "v7.2" and PYPI_UPLOAD to true. --- .github/workflows/build-wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 8b6ab5a..064fcfc 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -45,8 +45,8 @@ jobs: - os: macos-15-intel variant: musllinux env: - BUILD_COMMIT: "v7.1" # main or a specific version, e.g., "v6.1" - PYPI_UPLOAD: true # true or false + BUILD_COMMIT: "main" # main or a specific version, e.g., "v6.1" + PYPI_UPLOAD: false # true or false TESTPYPI_UPLOAD: false CIBW_BUILD: ${{ matrix.python }}-* # Build only for the architecture of the runner, so each job builds a