diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 4c6b082057..907b0d22af 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -8,6 +8,7 @@ on: - "[0-9]+.[0-9]+.[0-9]+[a-b][0-9]+" - "[0-9]+.[0-9]+.[0-9]+rc[0-9]+" workflow_dispatch: + pull_request: concurrency: group: wheels-${{ github.ref }} @@ -33,10 +34,22 @@ jobs: - [ubuntu-20.04, manylinux_ppc64le] - [ubuntu-20.04, manylinux_s390x] - [ubuntu-20.04, manylinux_i686] - - [macos-11, macosx_*] - [windows-2019, win_amd64] - [windows-2019, win32] python: ["cp37", "cp38", "cp39", "cp310", "cp311", "cp312"] + include: + - buildplat: [macos-11, macosx_x86_64] + python: "cp37" + - buildplat: [macos-11, macosx_*] + python: "cp38" + - buildplat: [macos-11, macosx_*] + python: "cp39" + - buildplat: [macos-14, macosx_*] + python: "cp310" + - buildplat: [macos-14, macosx_*] + python: "cp311" + - buildplat: [macos-14, macosx_*] + python: "cp312" steps: - name: Checkout pymongo @@ -66,18 +79,15 @@ jobs: # Note: the default manylinux is manylinux2014 run: python -m pip install "cibuildwheel>=2.4,<3" - - name: Build MacOS Py37 Wheel - # Universal wheels are not supported with Python 3.7, so we explicitly - # produce an x86_64 wheel for Python 3.7 on MacOS. - if: ${{ matrix.python == 'cp37' && matrix.buildplat[0] == 'macos-11' }} + - name: Build wheel + if: ${{ matrix.buildplat[0] != 'macos-14' }} env: - CIBW_BUILD: cp37-macosx_x86_64 - CIBW_ARCHS: x86_64 - CIBW_TEST_COMMAND: "python {project}/tools/fail_if_no_c.py" + CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + MACOS_TEST_SKIP: "*arm64" run: python -m cibuildwheel --output-dir wheelhouse - - name: Build wheel - if: ${{ matrix.python != 'cp37' || matrix.buildplat[0] != 'macos-11' }} + - name: Build wheel on M1 + if: ${{ matrix.buildplat[0] == 'macos-14' }} env: CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} run: python -m cibuildwheel --output-dir wheelhouse diff --git a/pyproject.toml b/pyproject.toml index b182a16f7c..481c651e40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -235,8 +235,3 @@ test-command = "python {project}/tools/fail_if_no_c.py" [tool.cibuildwheel.linux] archs = "x86_64 aarch64 ppc64le s390x i686" - -[tool.cibuildwheel.macos] -archs = "universal2" -test-command = "ENSURE_UNIVERSAL2=1 python {project}/tools/fail_if_no_c.py" -test-skip = "*-macosx_universal2:arm64"