diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 334a4039b9..4c6b082057 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -63,6 +63,7 @@ jobs: platforms: all - name: Install cibuildwheel + # Note: the default manylinux is manylinux2014 run: python -m pip install "cibuildwheel>=2.4,<3" - name: Build MacOS Py37 Wheel @@ -75,7 +76,7 @@ jobs: CIBW_TEST_COMMAND: "python {project}/tools/fail_if_no_c.py" run: python -m cibuildwheel --output-dir wheelhouse - - name: Build wheels + - name: Build wheel if: ${{ matrix.python != 'cp37' || matrix.buildplat[0] != 'macos-11' }} env: CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} @@ -87,6 +88,52 @@ jobs: path: ./wheelhouse/*.whl if-no-files-found: error + build_manylinux1_wheels: + runs-on: ubuntu-latest + strategy: + # Ensure that a wheel builder finishes even if another fails + fail-fast: false + matrix: + python: ["cp37", "cp38", "cp39"] + steps: + - name: Checkout pymongo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up python version + run: | + export PYTHON_VERSION=$(sed 's/^cp3/3./' <<< ${{ matrix.python }} ) + echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV + + - uses: actions/setup-python@v4 + with: + python-version: ${{env.PYTHON_VERSION}} + cache: 'pip' + cache-dependency-path: 'pyproject.toml' + allow-prereleases: true + + - name: Install cibuildwheel + run: python -m pip install "cibuildwheel>=2.4,<3" + + - name: Build manylinux_x86_64 + env: + CIBW_BUILD: ${{ matrix.python }}-manylinux_x86_64 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 + run: python -m cibuildwheel --output-dir wheelhouse + + - name: Build manylinux_i686 + env: + CIBW_BUILD: ${{ matrix.python }}-manylinux_i686 + CIBW_MANYLINUX_I686_IMAGE: manylinux1 + run: python -m cibuildwheel --output-dir wheelhouse + + - uses: actions/upload-artifact@v3 + with: + name: wheel-${{ matrix.python }}-manylinux1 + path: ./wheelhouse/*.whl + if-no-files-found: error + make_sdist: name: Make SDist runs-on: macos-latest @@ -119,7 +166,7 @@ jobs: collect_dist: runs-on: ubuntu-latest - needs: [build_wheels, make_sdist] + needs: [build_wheels, build_manylinux1_wheels, make_sdist] name: Download Wheels steps: - name: Download all workflow run artifacts diff --git a/pyproject.toml b/pyproject.toml index 5f75f2733f..036158c973 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -232,7 +232,6 @@ test-command = "python {project}/tools/fail_if_no_c.py" [tool.cibuildwheel.linux] archs = "x86_64 aarch64 ppc64le s390x i686" -manylinux-x86_64-image = "manylinux_2_28" [tool.cibuildwheel.macos] archs = "universal2"