From f90a8428e9201649172b65ea9eda9d20eb39a4d1 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Tue, 14 Apr 2026 18:26:44 +0800 Subject: [PATCH 1/6] Use manylinux_2_39 backend wheel tags --- Justfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Justfile b/Justfile index dbfcfe4..8fb82d9 100644 --- a/Justfile +++ b/Justfile @@ -5,6 +5,7 @@ uv_project := "uv run --project '" + root + "' --no-sync" cmake_cmd := uv_project + " python -c 'import shutil; print(shutil.which(\"cmake\") or \"\")'" rapids_env := "export CMAKE=\"$(" + cmake_cmd + ")\"; eval \"$(" + uv_project + " python tools/rapids_env.py --format shell)\"" dist_dir := root + "/dist" +backend_wheel_compatibility := "manylinux_2_39" default: @just --list @@ -21,7 +22,7 @@ loader-test: sync-dev backend-wheel: sync-dev rm -rf dist mkdir -p dist - {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility linux --auditwheel skip --out ../../dist + {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility {{backend_wheel_compatibility}} --auditwheel skip --out ../../dist backend-develop: sync-dev {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin develop --release --locked @@ -34,7 +35,7 @@ build-wheels: sync-dev python/lance_cuvs/_loader.py \ backends/cuvs_26_02/python/lance_cuvs_backend_cu12/__init__.py uv build --wheel --out-dir dist - {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility linux --auditwheel skip --out ../../dist + {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility {{backend_wheel_compatibility}} --auditwheel skip --out ../../dist python-build: build-wheels test-loader-wheel @: From ce41af007611f11ec96523d3fc0a52369710da37 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Tue, 14 Apr 2026 18:46:51 +0800 Subject: [PATCH 2/6] Build wheels in manylinux_2_28 containers --- .github/workflows/python-build.yml | 21 ++----- .github/workflows/python-release.yml | 21 ++----- .github/workflows/rust-build.yml | 20 ++----- Justfile | 2 +- tools/bootstrap_build_env.sh | 86 ++++++++++++++++++++++++++++ tools/run_in_container.sh | 29 +--------- 6 files changed, 102 insertions(+), 77 deletions(-) create mode 100755 tools/bootstrap_build_env.sh diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index d95fccf..04d362f 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -18,26 +18,13 @@ jobs: build-wheels: runs-on: ubuntu-24.04 container: - image: nvidia/cuda:12.9.1-devel-ubuntu24.04 + image: quay.io/pypa/manylinux_2_28_x86_64 steps: - uses: actions/checkout@v4 - name: Install system dependencies - run: | - apt-get update - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - build-essential \ - clang \ - cmake \ - curl \ - git \ - just \ - libprotobuf-dev \ - libssl-dev \ - patchelf \ - pkg-config \ - protobuf-compiler + run: ./tools/bootstrap_build_env.sh - uses: dtolnay/rust-toolchain@stable @@ -45,8 +32,8 @@ jobs: with: enable-cache: true - - name: Install Python 3.12 - run: uv python install 3.12 + - name: Use bundled Python 3.12 + run: echo "/opt/python/cp312-cp312/bin" >> "$GITHUB_PATH" - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index 78b4f7e..d97c008 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -17,26 +17,13 @@ jobs: build-wheels: runs-on: ubuntu-24.04 container: - image: nvidia/cuda:12.9.1-devel-ubuntu24.04 + image: quay.io/pypa/manylinux_2_28_x86_64 steps: - uses: actions/checkout@v4 - name: Install system dependencies - run: | - apt-get update - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - build-essential \ - clang \ - cmake \ - curl \ - git \ - just \ - libprotobuf-dev \ - libssl-dev \ - patchelf \ - pkg-config \ - protobuf-compiler + run: ./tools/bootstrap_build_env.sh - uses: dtolnay/rust-toolchain@stable @@ -44,8 +31,8 @@ jobs: with: enable-cache: true - - name: Install Python 3.12 - run: uv python install 3.12 + - name: Use bundled Python 3.12 + run: echo "/opt/python/cp312-cp312/bin" >> "$GITHUB_PATH" - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/rust-build.yml b/.github/workflows/rust-build.yml index bc44310..b58f068 100644 --- a/.github/workflows/rust-build.yml +++ b/.github/workflows/rust-build.yml @@ -17,25 +17,13 @@ jobs: rust-quality: runs-on: ubuntu-24.04 container: - image: nvidia/cuda:12.9.1-devel-ubuntu24.04 + image: quay.io/pypa/manylinux_2_28_x86_64 steps: - uses: actions/checkout@v4 - name: Install system dependencies - run: | - apt-get update - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - build-essential \ - clang \ - cmake \ - curl \ - git \ - just \ - libprotobuf-dev \ - libssl-dev \ - pkg-config \ - protobuf-compiler + run: ./tools/bootstrap_build_env.sh - uses: dtolnay/rust-toolchain@stable with: @@ -45,8 +33,8 @@ jobs: with: enable-cache: true - - name: Install Python 3.12 - run: uv python install 3.12 + - name: Use bundled Python 3.12 + run: echo "/opt/python/cp312-cp312/bin" >> "$GITHUB_PATH" - uses: Swatinem/rust-cache@v2 with: diff --git a/Justfile b/Justfile index 8fb82d9..8615d79 100644 --- a/Justfile +++ b/Justfile @@ -5,7 +5,7 @@ uv_project := "uv run --project '" + root + "' --no-sync" cmake_cmd := uv_project + " python -c 'import shutil; print(shutil.which(\"cmake\") or \"\")'" rapids_env := "export CMAKE=\"$(" + cmake_cmd + ")\"; eval \"$(" + uv_project + " python tools/rapids_env.py --format shell)\"" dist_dir := root + "/dist" -backend_wheel_compatibility := "manylinux_2_39" +backend_wheel_compatibility := "manylinux_2_28" default: @just --list diff --git a/tools/bootstrap_build_env.sh b/tools/bootstrap_build_env.sh new file mode 100755 index 0000000..6fa4892 --- /dev/null +++ b/tools/bootstrap_build_env.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if command -v apt-get >/dev/null 2>&1; then + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install -y --no-install-recommends \ + bash \ + build-essential \ + ca-certificates \ + clang \ + cmake \ + curl \ + git \ + libprotobuf-dev \ + libssl-dev \ + patchelf \ + pkg-config \ + protobuf-compiler +elif command -v dnf >/dev/null 2>&1; then + dnf install -y \ + bash \ + ca-certificates \ + clang \ + cmake \ + curl \ + gcc \ + gcc-c++ \ + git \ + openssl-devel \ + patchelf \ + pkgconf-pkg-config \ + protobuf-compiler \ + protobuf-devel +elif command -v yum >/dev/null 2>&1; then + yum install -y \ + bash \ + ca-certificates \ + clang \ + cmake \ + curl \ + gcc \ + gcc-c++ \ + git \ + openssl-devel \ + patchelf \ + pkgconfig \ + protobuf-compiler \ + protobuf-devel +else + echo "Unsupported package manager" >&2 + exit 1 +fi + +if ! command -v cargo >/dev/null 2>&1; then + curl -LsSf https://sh.rustup.rs | sh -s -- -y --profile minimal + export PATH="${HOME}/.cargo/bin:${PATH}" + rustup toolchain install stable +fi + +if ! command -v uv >/dev/null 2>&1; then + curl -LsSf https://astral.sh/uv/install.sh | sh + export PATH="${HOME}/.local/bin:${PATH}" +fi + +if ! command -v just >/dev/null 2>&1; then + cargo install just --locked +fi + +if command -v dnf >/dev/null 2>&1 || command -v yum >/dev/null 2>&1; then + if [[ ! -x /usr/local/cuda/bin/nvcc && ! -x /usr/local/cuda-12.9/bin/nvcc ]]; then + curl -fsSL -o /etc/yum.repos.d/cuda-rhel8.repo \ + https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo + rpm --import https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/D42D0685.pub + if command -v dnf >/dev/null 2>&1; then + dnf install -y cuda-toolkit-12-9 + else + yum install -y cuda-toolkit-12-9 + fi + fi +fi + +if [[ -d /opt/python/cp312-cp312/bin ]]; then + export PATH="/opt/python/cp312-cp312/bin:${PATH}" +fi diff --git a/tools/run_in_container.sh b/tools/run_in_container.sh index d5f56f0..c24518d 100755 --- a/tools/run_in_container.sh +++ b/tools/run_in_container.sh @@ -3,7 +3,7 @@ set -euo pipefail ROOT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)" -IMAGE_TAG="${LANCE_CUVS_CONTAINER_IMAGE:-nvidia/cuda:12.9.1-devel-ubuntu24.04}" +IMAGE_TAG="${LANCE_CUVS_CONTAINER_IMAGE:-quay.io/pypa/manylinux_2_28_x86_64}" PLATFORM="${LANCE_CUVS_CONTAINER_PLATFORM:-}" GPU_ARGS=() TTY_ARGS=() @@ -68,30 +68,7 @@ docker "${DOCKER_ARGS[@]}" \ "$IMAGE_TAG" \ bash -lc ' set -euo pipefail - export PATH=/root/.cargo/bin:/root/.local/bin:$PATH - export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get install -y --no-install-recommends \ - bash \ - build-essential \ - ca-certificates \ - clang \ - cmake \ - curl \ - git \ - just \ - libprotobuf-dev \ - libssl-dev \ - patchelf \ - pkg-config \ - protobuf-compiler - if ! command -v cargo >/dev/null 2>&1; then - curl -LsSf https://sh.rustup.rs | sh -s -- -y --profile minimal - rustup toolchain install stable - fi - if ! command -v uv >/dev/null 2>&1; then - curl -LsSf https://astral.sh/uv/install.sh | sh - fi - uv python install 3.12 + export PATH=/root/.cargo/bin:/root/.local/bin:/opt/python/cp312-cp312/bin:$PATH + /work/tools/bootstrap_build_env.sh exec "$@" ' bash "$@" From c755fe61bf1b9ce675a422217681843083c31391 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Tue, 14 Apr 2026 18:57:48 +0800 Subject: [PATCH 3/6] Isolate manylinux build artifacts --- .github/workflows/python-build.yml | 6 +----- .github/workflows/python-release.yml | 6 +----- .github/workflows/rust-build.yml | 6 +----- Justfile | 12 +++++++----- tools/run_in_container.sh | 1 + 5 files changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index 04d362f..8381a50 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -13,6 +13,7 @@ concurrency: env: UV_EXTRA_INDEX_URL: https://pypi.nvidia.com + CARGO_TARGET_DIR: /__w/lance-cuvs/lance-cuvs/backends/cuvs_26_02/target-manylinux_2_28 jobs: build-wheels: @@ -35,11 +36,6 @@ jobs: - name: Use bundled Python 3.12 run: echo "/opt/python/cp312-cp312/bin" >> "$GITHUB_PATH" - - uses: Swatinem/rust-cache@v2 - with: - workspaces: | - backends/cuvs_26_02 -> target - - name: Build release wheels run: just build-wheels diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index d97c008..1f29ab9 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -12,6 +12,7 @@ concurrency: env: UV_EXTRA_INDEX_URL: https://pypi.nvidia.com + CARGO_TARGET_DIR: /__w/lance-cuvs/lance-cuvs/backends/cuvs_26_02/target-manylinux_2_28 jobs: build-wheels: @@ -34,11 +35,6 @@ jobs: - name: Use bundled Python 3.12 run: echo "/opt/python/cp312-cp312/bin" >> "$GITHUB_PATH" - - uses: Swatinem/rust-cache@v2 - with: - workspaces: | - backends/cuvs_26_02 -> target - - name: Build release wheels run: just build-wheels diff --git a/.github/workflows/rust-build.yml b/.github/workflows/rust-build.yml index b58f068..acf6144 100644 --- a/.github/workflows/rust-build.yml +++ b/.github/workflows/rust-build.yml @@ -12,6 +12,7 @@ concurrency: env: UV_EXTRA_INDEX_URL: https://pypi.nvidia.com + CARGO_TARGET_DIR: /__w/lance-cuvs/lance-cuvs/backends/cuvs_26_02/target-manylinux_2_28 jobs: rust-quality: @@ -36,11 +37,6 @@ jobs: - name: Use bundled Python 3.12 run: echo "/opt/python/cp312-cp312/bin" >> "$GITHUB_PATH" - - uses: Swatinem/rust-cache@v2 - with: - workspaces: | - backends/cuvs_26_02 -> target - - name: Check Rust formatting run: just rust-fmt-check diff --git a/Justfile b/Justfile index 8615d79..8cc3a6c 100644 --- a/Justfile +++ b/Justfile @@ -6,6 +6,8 @@ cmake_cmd := uv_project + " python -c 'import shutil; print(shutil.which(\"cmake rapids_env := "export CMAKE=\"$(" + cmake_cmd + ")\"; eval \"$(" + uv_project + " python tools/rapids_env.py --format shell)\"" dist_dir := root + "/dist" backend_wheel_compatibility := "manylinux_2_28" +backend_target_dir := root + "/backends/cuvs_26_02/target-manylinux_2_28" +backend_cargo_env := "export CARGO_TARGET_DIR=\"${CARGO_TARGET_DIR:-" + backend_target_dir + "}\"" default: @just --list @@ -22,10 +24,10 @@ loader-test: sync-dev backend-wheel: sync-dev rm -rf dist mkdir -p dist - {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility {{backend_wheel_compatibility}} --auditwheel skip --out ../../dist + {{backend_cargo_env}}; {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility {{backend_wheel_compatibility}} --auditwheel skip --out ../../dist backend-develop: sync-dev - {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin develop --release --locked + {{backend_cargo_env}}; {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin develop --release --locked build-wheels: sync-dev rm -rf dist @@ -35,7 +37,7 @@ build-wheels: sync-dev python/lance_cuvs/_loader.py \ backends/cuvs_26_02/python/lance_cuvs_backend_cu12/__init__.py uv build --wheel --out-dir dist - {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility {{backend_wheel_compatibility}} --auditwheel skip --out ../../dist + {{backend_cargo_env}}; {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility {{backend_wheel_compatibility}} --auditwheel skip --out ../../dist python-build: build-wheels test-loader-wheel @: @@ -47,10 +49,10 @@ rust-fmt-check: cargo fmt --manifest-path backends/cuvs_26_02/Cargo.toml --all --check rust-clippy: sync-dev-no-project - {{rapids_env}} && cargo clippy --manifest-path backends/cuvs_26_02/Cargo.toml --locked --all-targets --features python -- -D warnings + {{backend_cargo_env}}; {{rapids_env}} && cargo clippy --manifest-path backends/cuvs_26_02/Cargo.toml --locked --all-targets --features python -- -D warnings rust-check: sync-dev-no-project - {{rapids_env}} && cargo check --manifest-path backends/cuvs_26_02/Cargo.toml --locked --all-targets --features python + {{backend_cargo_env}}; {{rapids_env}} && cargo check --manifest-path backends/cuvs_26_02/Cargo.toml --locked --all-targets --features python rust-build: rust-fmt-check rust-clippy rust-check @: diff --git a/tools/run_in_container.sh b/tools/run_in_container.sh index c24518d..272d0e4 100755 --- a/tools/run_in_container.sh +++ b/tools/run_in_container.sh @@ -69,6 +69,7 @@ docker "${DOCKER_ARGS[@]}" \ bash -lc ' set -euo pipefail export PATH=/root/.cargo/bin:/root/.local/bin:/opt/python/cp312-cp312/bin:$PATH + export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-/work/backends/cuvs_26_02/target-manylinux_2_28}" /work/tools/bootstrap_build_env.sh exec "$@" ' bash "$@" From 4d24dbff38488abf99f93f630eca1c7a22ffd2d6 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Tue, 14 Apr 2026 19:00:26 +0800 Subject: [PATCH 4/6] Revert "Isolate manylinux build artifacts" This reverts commit c755fe61bf1b9ce675a422217681843083c31391. --- .github/workflows/python-build.yml | 6 +++++- .github/workflows/python-release.yml | 6 +++++- .github/workflows/rust-build.yml | 6 +++++- Justfile | 12 +++++------- tools/run_in_container.sh | 1 - 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index 8381a50..04d362f 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -13,7 +13,6 @@ concurrency: env: UV_EXTRA_INDEX_URL: https://pypi.nvidia.com - CARGO_TARGET_DIR: /__w/lance-cuvs/lance-cuvs/backends/cuvs_26_02/target-manylinux_2_28 jobs: build-wheels: @@ -36,6 +35,11 @@ jobs: - name: Use bundled Python 3.12 run: echo "/opt/python/cp312-cp312/bin" >> "$GITHUB_PATH" + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + backends/cuvs_26_02 -> target + - name: Build release wheels run: just build-wheels diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index 1f29ab9..d97c008 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -12,7 +12,6 @@ concurrency: env: UV_EXTRA_INDEX_URL: https://pypi.nvidia.com - CARGO_TARGET_DIR: /__w/lance-cuvs/lance-cuvs/backends/cuvs_26_02/target-manylinux_2_28 jobs: build-wheels: @@ -35,6 +34,11 @@ jobs: - name: Use bundled Python 3.12 run: echo "/opt/python/cp312-cp312/bin" >> "$GITHUB_PATH" + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + backends/cuvs_26_02 -> target + - name: Build release wheels run: just build-wheels diff --git a/.github/workflows/rust-build.yml b/.github/workflows/rust-build.yml index acf6144..b58f068 100644 --- a/.github/workflows/rust-build.yml +++ b/.github/workflows/rust-build.yml @@ -12,7 +12,6 @@ concurrency: env: UV_EXTRA_INDEX_URL: https://pypi.nvidia.com - CARGO_TARGET_DIR: /__w/lance-cuvs/lance-cuvs/backends/cuvs_26_02/target-manylinux_2_28 jobs: rust-quality: @@ -37,6 +36,11 @@ jobs: - name: Use bundled Python 3.12 run: echo "/opt/python/cp312-cp312/bin" >> "$GITHUB_PATH" + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + backends/cuvs_26_02 -> target + - name: Check Rust formatting run: just rust-fmt-check diff --git a/Justfile b/Justfile index 8cc3a6c..8615d79 100644 --- a/Justfile +++ b/Justfile @@ -6,8 +6,6 @@ cmake_cmd := uv_project + " python -c 'import shutil; print(shutil.which(\"cmake rapids_env := "export CMAKE=\"$(" + cmake_cmd + ")\"; eval \"$(" + uv_project + " python tools/rapids_env.py --format shell)\"" dist_dir := root + "/dist" backend_wheel_compatibility := "manylinux_2_28" -backend_target_dir := root + "/backends/cuvs_26_02/target-manylinux_2_28" -backend_cargo_env := "export CARGO_TARGET_DIR=\"${CARGO_TARGET_DIR:-" + backend_target_dir + "}\"" default: @just --list @@ -24,10 +22,10 @@ loader-test: sync-dev backend-wheel: sync-dev rm -rf dist mkdir -p dist - {{backend_cargo_env}}; {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility {{backend_wheel_compatibility}} --auditwheel skip --out ../../dist + {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility {{backend_wheel_compatibility}} --auditwheel skip --out ../../dist backend-develop: sync-dev - {{backend_cargo_env}}; {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin develop --release --locked + {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin develop --release --locked build-wheels: sync-dev rm -rf dist @@ -37,7 +35,7 @@ build-wheels: sync-dev python/lance_cuvs/_loader.py \ backends/cuvs_26_02/python/lance_cuvs_backend_cu12/__init__.py uv build --wheel --out-dir dist - {{backend_cargo_env}}; {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility {{backend_wheel_compatibility}} --auditwheel skip --out ../../dist + {{rapids_env}} && cd backends/cuvs_26_02 && {{uv_project}} maturin build --release --locked --compatibility {{backend_wheel_compatibility}} --auditwheel skip --out ../../dist python-build: build-wheels test-loader-wheel @: @@ -49,10 +47,10 @@ rust-fmt-check: cargo fmt --manifest-path backends/cuvs_26_02/Cargo.toml --all --check rust-clippy: sync-dev-no-project - {{backend_cargo_env}}; {{rapids_env}} && cargo clippy --manifest-path backends/cuvs_26_02/Cargo.toml --locked --all-targets --features python -- -D warnings + {{rapids_env}} && cargo clippy --manifest-path backends/cuvs_26_02/Cargo.toml --locked --all-targets --features python -- -D warnings rust-check: sync-dev-no-project - {{backend_cargo_env}}; {{rapids_env}} && cargo check --manifest-path backends/cuvs_26_02/Cargo.toml --locked --all-targets --features python + {{rapids_env}} && cargo check --manifest-path backends/cuvs_26_02/Cargo.toml --locked --all-targets --features python rust-build: rust-fmt-check rust-clippy rust-check @: diff --git a/tools/run_in_container.sh b/tools/run_in_container.sh index 272d0e4..c24518d 100755 --- a/tools/run_in_container.sh +++ b/tools/run_in_container.sh @@ -69,7 +69,6 @@ docker "${DOCKER_ARGS[@]}" \ bash -lc ' set -euo pipefail export PATH=/root/.cargo/bin:/root/.local/bin:/opt/python/cp312-cp312/bin:$PATH - export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-/work/backends/cuvs_26_02/target-manylinux_2_28}" /work/tools/bootstrap_build_env.sh exec "$@" ' bash "$@" From 826d804ab977cacebc407783030aec187590bfe4 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Tue, 14 Apr 2026 19:01:10 +0800 Subject: [PATCH 5/6] Refresh manylinux rust cache keys --- .github/workflows/python-build.yml | 1 + .github/workflows/python-release.yml | 1 + .github/workflows/rust-build.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index 04d362f..a6be46c 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -37,6 +37,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: + prefix-key: manylinux-2.28-v1 workspaces: | backends/cuvs_26_02 -> target diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index d97c008..7b901d7 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -36,6 +36,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: + prefix-key: manylinux-2.28-v1 workspaces: | backends/cuvs_26_02 -> target diff --git a/.github/workflows/rust-build.yml b/.github/workflows/rust-build.yml index b58f068..1739002 100644 --- a/.github/workflows/rust-build.yml +++ b/.github/workflows/rust-build.yml @@ -38,6 +38,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: + prefix-key: manylinux-2.28-v1 workspaces: | backends/cuvs_26_02 -> target From 713fba8c6bf0f9947d0fc68acc3e6ff440d88a7e Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Tue, 14 Apr 2026 19:13:10 +0800 Subject: [PATCH 6/6] Install a newer protoc for manylinux builds --- tools/bootstrap_build_env.sh | 39 +++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/tools/bootstrap_build_env.sh b/tools/bootstrap_build_env.sh index 6fa4892..e7c5d57 100755 --- a/tools/bootstrap_build_env.sh +++ b/tools/bootstrap_build_env.sh @@ -2,6 +2,34 @@ set -euo pipefail +PROTOC_MIN_VERSION=3.15.0 +PROTOC_FALLBACK_VERSION=31.1 + +version_ge() { + [ "$(printf '%s\n%s\n' "$2" "$1" | sort -V | head -n1)" = "$2" ] +} + +ensure_modern_protoc() { + local current_version="" + + if command -v protoc >/dev/null 2>&1; then + current_version="$(protoc --version | awk '{print $2}')" + fi + + if [ -n "$current_version" ] && version_ge "$current_version" "$PROTOC_MIN_VERSION"; then + return + fi + + local archive="protoc-${PROTOC_FALLBACK_VERSION}-linux-x86_64.zip" + local download_url="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_FALLBACK_VERSION}/${archive}" + local tmpdir + tmpdir="$(mktemp -d)" + trap 'rm -rf "$tmpdir"' RETURN + + curl -LsSf "$download_url" -o "$tmpdir/$archive" + unzip -q "$tmpdir/$archive" -d /usr/local +} + if command -v apt-get >/dev/null 2>&1; then export DEBIAN_FRONTEND=noninteractive apt-get update @@ -17,7 +45,8 @@ if command -v apt-get >/dev/null 2>&1; then libssl-dev \ patchelf \ pkg-config \ - protobuf-compiler + protobuf-compiler \ + unzip elif command -v dnf >/dev/null 2>&1; then dnf install -y \ bash \ @@ -32,7 +61,8 @@ elif command -v dnf >/dev/null 2>&1; then patchelf \ pkgconf-pkg-config \ protobuf-compiler \ - protobuf-devel + protobuf-devel \ + unzip elif command -v yum >/dev/null 2>&1; then yum install -y \ bash \ @@ -47,7 +77,8 @@ elif command -v yum >/dev/null 2>&1; then patchelf \ pkgconfig \ protobuf-compiler \ - protobuf-devel + protobuf-devel \ + unzip else echo "Unsupported package manager" >&2 exit 1 @@ -68,6 +99,8 @@ if ! command -v just >/dev/null 2>&1; then cargo install just --locked fi +ensure_modern_protoc + if command -v dnf >/dev/null 2>&1 || command -v yum >/dev/null 2>&1; then if [[ ! -x /usr/local/cuda/bin/nvcc && ! -x /usr/local/cuda-12.9/bin/nvcc ]]; then curl -fsSL -o /etc/yum.repos.d/cuda-rhel8.repo \