From c7f8e52eb0b52c313d76ce325fcb518fa262f825 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 23:06:21 +0000 Subject: [PATCH] Fix nightly build: use dynamic manylinux Python selection instead of hardcoded cp38-cp38 Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/903fa04b-f9d7-41ee-9fa2-dfabac91ff58 Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --- .github/workflows/nightly.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 277ee8f12..e7a294d4a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -303,9 +303,17 @@ jobs: - name: Checkout code uses: actions/checkout@v6.0.2 + - name: Select Python + run: | + # Use the first available manylinux interpreter for deterministic selection. + PYTHON=$(printf '%s\n' /opt/python/*/bin/python | sort -V | head -n1) + test -x "$PYTHON" || { echo "Error: no interpreter found under /opt/python/*/bin/python"; exit 1; } + echo "PYTHON=$PYTHON" >> "$GITHUB_ENV" + "$PYTHON" --version + - name: Setup Python environment run: | - /opt/python/cp38-cp38/bin/python -m venv $PWD/env + "$PYTHON" -m venv $PWD/env echo "$PWD/env/bin" >> $GITHUB_PATH - name: Install build tools @@ -341,9 +349,17 @@ jobs: mkdir -p /tmp/arm-toolchain/ tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1 + - name: Select Python + run: | + # Use the first available manylinux interpreter for deterministic selection. + PYTHON=$(printf '%s\n' /opt/python/*/bin/python | sort -V | head -n1) + test -x "$PYTHON" || { echo "Error: no interpreter found under /opt/python/*/bin/python"; exit 1; } + echo "PYTHON=$PYTHON" >> "$GITHUB_ENV" + "$PYTHON" --version + - name: Setup Python environment run: | - /opt/python/cp38-cp38/bin/python -m venv $PWD/env + "$PYTHON" -m venv $PWD/env echo "$PWD/env/bin" >> $GITHUB_PATH echo "/tmp/arm-toolchain/bin" >> $GITHUB_PATH echo "/tmp/arm-toolchain/aarch64-none-linux-gnu/libc/usr/bin" >> $GITHUB_PATH @@ -389,9 +405,17 @@ jobs: cd /tmp/mpfr-4.2.1 && ./configure --prefix=/usr/local --disable-static && make -j$(nproc) && make install ldconfig + - name: Select Python + run: | + # Use the first available manylinux interpreter for deterministic selection. + PYTHON=$(printf '%s\n' /opt/python/*/bin/python | sort -V | head -n1) + test -x "$PYTHON" || { echo "Error: no interpreter found under /opt/python/*/bin/python"; exit 1; } + echo "PYTHON=$PYTHON" >> "$GITHUB_ENV" + "$PYTHON" --version + - name: Setup Python environment run: | - /opt/python/cp38-cp38/bin/python -m venv $PWD/env + "$PYTHON" -m venv $PWD/env echo "$PWD/env/bin" >> $GITHUB_PATH echo "/tmp/riscv-toolchain/bin" >> $GITHUB_PATH