From 28b438574de97cd70a4686857a1d45f8a339fd51 Mon Sep 17 00:00:00 2001 From: Ali Ramlaoui Date: Sun, 10 May 2026 15:49:46 +0200 Subject: [PATCH] fix: pin manylinux2014 image for cp38 wheels --- .github/workflows/release.yml | 18 ++++++++++++++++-- .github/workflows/wheels.yml | 30 +++++++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ac3159..b128447 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + # Pinned because manylinux2014_x86_64:latest no longer ships cp38. + MANYLINUX2014_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64@sha256:66d0049056d8744efef8f7e973d07acd548a28cda5cf5f6e4040847e34e3bbcc + jobs: validate-version: name: Validate tag version @@ -142,14 +146,24 @@ jobs: else echo "PYBIN=python" >> "$GITHUB_ENV" fi - - name: Build wheels + - name: Build wheels (Linux) + if: matrix.os == 'ubuntu-latest' + uses: PyO3/maturin-action@v1 + with: + command: build + args: --release --out dist --interpreter ${{ env.PYBIN }} + working-directory: atompack-py + target: ${{ env.TARGET }} + manylinux: 2_17 + container: ${{ env.MANYLINUX2014_X86_64_IMAGE }} + - name: Build wheels (non-Linux) + if: matrix.os != 'ubuntu-latest' uses: PyO3/maturin-action@v1 with: command: build args: --release --out dist --interpreter ${{ env.PYBIN }} working-directory: atompack-py target: ${{ env.TARGET }} - manylinux: auto - uses: actions/upload-artifact@v4 with: name: wheels-${{ env.TARGET }}-py${{ matrix.python-version }} diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f1fa5c7..302f8aa 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -7,6 +7,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + # Pinned because manylinux2014_x86_64:latest no longer ships cp38. + MANYLINUX2014_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64@sha256:66d0049056d8744efef8f7e973d07acd548a28cda5cf5f6e4040847e34e3bbcc + jobs: build-wheels: name: Build wheels (${{ matrix.os }}, py${{ matrix.python-version }}) @@ -54,14 +58,34 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Build wheels + - name: Set Python interpreter + shell: bash + run: | + if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then + PYTAG="${{ matrix.python-version }}" + PYTAG="${PYTAG/.}" + echo "PYBIN=/opt/python/cp${PYTAG}-cp${PYTAG}/bin/python" >> "$GITHUB_ENV" + else + echo "PYBIN=python" >> "$GITHUB_ENV" + fi + - name: Build wheels (Linux) + if: matrix.os == 'ubuntu-latest' + uses: PyO3/maturin-action@v1 + with: + command: build + args: --release --out dist --interpreter ${{ env.PYBIN }} + working-directory: atompack-py + target: ${{ env.TARGET }} + manylinux: 2_17 + container: ${{ env.MANYLINUX2014_X86_64_IMAGE }} + - name: Build wheels (non-Linux) + if: matrix.os != 'ubuntu-latest' uses: PyO3/maturin-action@v1 with: command: build - args: --release --out dist --interpreter python + args: --release --out dist --interpreter ${{ env.PYBIN }} working-directory: atompack-py target: ${{ env.TARGET }} - manylinux: auto - uses: actions/upload-artifact@v4 with: name: wheels-${{ env.TARGET }}-py${{ matrix.python-version }}