mirror of https://github.com/astral-sh/uv
Use 64-bit host for 32-bit releases to work around OOM (#12466)
The i686 linux gnu release job started failing since the last release (#12430) due to an OOM with llvm breaking the 4GB limit for 32-bit processes. We work around this by using a 64-bit host targeting 32-bit.
This commit is contained in:
parent
c2eb32164d
commit
99e2324dcf
|
|
@ -287,9 +287,9 @@ jobs:
|
||||||
runs-on: depot-ubuntu-latest-4
|
runs-on: depot-ubuntu-latest-4
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target:
|
include:
|
||||||
- x86_64-unknown-linux-gnu
|
- { target: "i686-unknown-linux-gnu", cc: "gcc -m32" }
|
||||||
- i686-unknown-linux-gnu
|
- { target: "x86_64-unknown-linux-gnu", cc: "gcc" }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||||
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
|
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
|
||||||
|
|
@ -304,10 +304,16 @@ jobs:
|
||||||
uses: PyO3/maturin-action@22fe573c6ed0c03ab9b84e631cbfa49bddf6e20e # v1.47.3
|
uses: PyO3/maturin-action@22fe573c6ed0c03ab9b84e631cbfa49bddf6e20e # v1.47.3
|
||||||
with:
|
with:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
|
# Generally, we try to build in a target docker container. In this case however, a
|
||||||
|
# 32-bit compiler runs out of memory (4GB memory limit for 32-bit), so we cross compile
|
||||||
|
# from 64-bit version of the container, breaking the pattern from other builds.
|
||||||
|
container: quay.io/pypa/manylinux2014
|
||||||
manylinux: auto
|
manylinux: auto
|
||||||
args: --release --locked --out dist --features self-update
|
args: --release --locked --out dist --features self-update
|
||||||
# See: https://github.com/sfackler/rust-openssl/issues/2036#issuecomment-1724324145
|
# See: https://github.com/sfackler/rust-openssl/issues/2036#issuecomment-1724324145
|
||||||
before-script-linux: |
|
before-script-linux: |
|
||||||
|
# Install the 32-bit cross target on 64-bit (noop if we're already on 64-bit)
|
||||||
|
rustup target add ${{ matrix.target }}
|
||||||
# If we're running on rhel centos, install needed packages.
|
# If we're running on rhel centos, install needed packages.
|
||||||
if command -v yum &> /dev/null; then
|
if command -v yum &> /dev/null; then
|
||||||
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
|
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
|
||||||
|
|
@ -316,11 +322,16 @@ jobs:
|
||||||
# in order to build openssl with -latomic flag.
|
# in order to build openssl with -latomic flag.
|
||||||
if [[ ! -d "/usr/lib64" ]]; then
|
if [[ ! -d "/usr/lib64" ]]; then
|
||||||
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
|
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
|
||||||
|
else
|
||||||
|
# Support cross-compiling from 64-bit to 32-bit
|
||||||
|
yum install -y glibc-devel.i686 libstdc++-devel.i686
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# If we're running on debian-based system.
|
# If we're running on debian-based system.
|
||||||
apt update -y && apt-get install -y libssl-dev openssl pkg-config
|
apt update -y && apt-get install -y libssl-dev openssl pkg-config
|
||||||
fi
|
fi
|
||||||
|
env:
|
||||||
|
CC: ${{ matrix.cc }}
|
||||||
- name: "Test wheel"
|
- name: "Test wheel"
|
||||||
if: ${{ startsWith(matrix.target, 'x86_64') }}
|
if: ${{ startsWith(matrix.target, 'x86_64') }}
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue