From 4bc0c4f179d0228ab56c8aed300487b08fbaf0b1 Mon Sep 17 00:00:00 2001 From: Dylan Frankland Date: Mon, 13 Apr 2026 11:31:58 -0700 Subject: [PATCH] Upgrade manylinux container from 2_17 to 2_28 Update from manylinux2014 (glibc 2.17) to manylinux_2_28 (glibc 2.28). This fixes glibc mismatch issues when building on ubuntu-latest which has a newer glibc than the old manylinux2014 container. Note: This drops support for older systems that require manylinux2014 (e.g., AWS Glue). If Glue support is needed, see PR #1067 for an alternative fix that preserves manylinux2014 compatibility. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/pyo3.yml | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pyo3.yml b/.github/workflows/pyo3.yml index 98fda5c7..98caa5f1 100644 --- a/.github/workflows/pyo3.yml +++ b/.github/workflows/pyo3.yml @@ -53,13 +53,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.13 - # aarch64 builds use cross-compilation, so stub_gen must run on host (x86_64) - # x86_64 builds run stub_gen inside container to avoid glibc mismatch - name: Setup Rust & Cargo - if: matrix.platform.target == 'aarch64' uses: ./.github/actions/setup_rust_cargo - name: Generate Python stubs - if: matrix.platform.target == 'aarch64' run: cargo run --bin stub_gen --manifest-path context-py/Cargo.toml --no-default-features - name: Build wheels uses: PyO3/maturin-action@v1 @@ -67,23 +63,18 @@ jobs: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter --manifest-path ./context-py/Cargo.toml manylinux: auto - # Required version in order to support Glue - container: "2_17" + # manylinux_2_28 provides glibc 2.28 which is compatible with ubuntu-latest + container: "2_28" before-script-linux: | # Needed for `openssl-sys`: # https://docs.rs/openssl/latest/openssl/ - if [ -f /usr/bin/yum ]; then - # quay.io/pypa/manylinux2014_x86_64:latest - /usr/bin/yum -y upgrade - /usr/bin/yum -y install perl-IPC-Cmd perl-List-MoreUtils openssl-devel python3-pip unzip - /usr/bin/ln -s /usr/bin/pip3 /usr/bin/pip - # Generate Python stubs inside x86_64 container to avoid glibc mismatch - cargo run --bin stub_gen --manifest-path context-py/Cargo.toml --no-default-features - elif [ -f /usr/bin/apt ]; then - # ghcr.io/rust-cross/manylinux2014-cross:aarch64 - # Note: stub_gen already ran on host for aarch64 (can't run aarch64 binary here) - /usr/bin/apt update - /usr/bin/apt install -y pkg-config libssl-dev unzip + if command -v yum &> /dev/null; then + # manylinux_2_28 x86_64 (AlmaLinux 8) + yum -y install perl-IPC-Cmd openssl-devel python3-pip unzip + elif command -v apt &> /dev/null; then + # manylinux_2_28 cross-compile (aarch64) + apt update + apt install -y pkg-config libssl-dev unzip fi - name: Upload wheels uses: actions/upload-artifact@v4