From c541a91c85f29528ea5f5b34ee4c9141e26f26e0 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 18 Mar 2026 18:59:47 -0500 Subject: [PATCH] Add a test case for armv7 uv on aarch64 (#18532) Reproduces https://github.com/astral-sh/uv/issues/18509 Related https://github.com/astral-sh/uv/pull/18517 Requires #18530 --- .github/workflows/build-dev-binaries.yml | 36 ++++++++++++++++++++ .github/workflows/test-integration.yml | 42 ++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/.github/workflows/build-dev-binaries.yml b/.github/workflows/build-dev-binaries.yml index 48fe5f84e..747a07411 100644 --- a/.github/workflows/build-dev-binaries.yml +++ b/.github/workflows/build-dev-binaries.yml @@ -71,6 +71,42 @@ jobs: ./target/no-debug/uvx retention-days: 1 + build-binary-linux-armv7-gnueabihf: + name: "linux armv7 gnueabihf" + timeout-minutes: 15 + runs-on: github-ubuntu-24.04-x86_64-8 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: "Install mold" + run: ./scripts/install-mold.sh + + - name: "Setup armv7" + run: | + sudo apt-get update + sudo apt-get install gcc-arm-linux-gnueabihf + rustup target add armv7-unknown-linux-gnueabihf + + - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 + with: + save-if: ${{ inputs.save-rust-cache == 'true' }} + + - name: "Build" + env: + CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc + run: cargo build --profile no-debug --target armv7-unknown-linux-gnueabihf --bin uv --bin uvx + + - name: "Upload binary" + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: uv-linux-armv7-gnueabihf-${{ github.sha }} + path: | + ./target/armv7-unknown-linux-gnueabihf/no-debug/uv + ./target/armv7-unknown-linux-gnueabihf/no-debug/uvx + retention-days: 1 + build-binary-linux-musl: name: "linux musl" timeout-minutes: 10 diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index c9653d7c6..7933c8d2a 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -179,6 +179,48 @@ jobs: run: | ./uv pip install -v anyio + integration-test-linux-armv7-on-aarch64: + name: "armv7 on aarch64 linux" + timeout-minutes: 20 + runs-on: github-ubuntu-24.04-aarch64-4 + env: + UV_PYTHON_INSTALL_DIR: ${{ github.workspace }}/.python + + steps: + - name: "Download binary" + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + name: uv-linux-armv7-gnueabihf-${{ inputs.sha }} + + - name: "Install armhf runtime" + run: | + sudo dpkg --add-architecture armhf + sudo apt-get update + sudo apt-get install -y libc6:armhf libgcc-s1:armhf + + - name: "Prepare binary" + run: | + chmod +x ./uv + chmod +x ./uvx + + - name: "Install Python via uv" + run: | + ./uv python install -v 3.13.12 + + - name: "Verify hard-float variant selected" + run: | + python_path=$(./uv python find 3.13) + expected="$GITHUB_WORKSPACE/.python/cpython-3.13-linux-armv7-gnueabihf/bin/python3.13" + if [[ "$python_path" != "$expected" ]]; then + echo "Expected: $expected" + echo "Found: $python_path" + exit 1 + fi + + - name: "Create a virtual environment" + run: | + ./uv venv -c -p 3.13.12 --managed-python --no-python-downloads + integration-test-free-threaded-windows-x86_64: name: "free-threaded on windows" timeout-minutes: 10