mirror of
https://github.com/Z3Prover/z3
synced 2026-05-16 07:05:35 +00:00
Make manylinux Python selection dynamic in CI and release workflows (#9502)
* Fix manylinux Python selection in CI and release workflows Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/6f228b53-88a3-4a5f-89b6-7a6daaf066a6 Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Harden manylinux Python discovery in workflows Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/6f228b53-88a3-4a5f-89b6-7a6daaf066a6 Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Improve manylinux Python selection diagnostics in workflows Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/6f228b53-88a3-4a5f-89b6-7a6daaf066a6 Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
d02e9fcfab
commit
a101c098ae
2 changed files with 45 additions and 5 deletions
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
|
|
@ -83,8 +83,16 @@ 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 virtual environment
|
||||
run: "/opt/python/cp38-cp38/bin/python -m venv $PWD/env"
|
||||
run: "$PYTHON -m venv $PWD/env"
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
|
|
@ -123,8 +131,16 @@ 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 virtual environment
|
||||
run: "/opt/python/cp38-cp38/bin/python -m venv $PWD/env"
|
||||
run: "$PYTHON -m venv $PWD/env"
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
|
|
|
|||
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
|
|
@ -313,9 +313,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
|
||||
|
|
@ -351,9 +359,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
|
||||
|
|
@ -399,9 +415,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue