mirror of
https://github.com/Z3Prover/z3
synced 2026-03-31 00:29:03 +00:00
Add riscv64 wheel builds to nightly and release PyPI publishing (#9153)
* Initial plan * Add riscv64 PyPI wheel builds to nightly, release, and validation workflows Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/c22657c9-a5a9-4dad-b5d7-002209b7afe1 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
d7f8fb5a1c
commit
8969921cab
3 changed files with 143 additions and 2 deletions
47
.github/workflows/release.yml
vendored
47
.github/workflows/release.yml
vendored
|
|
@ -374,6 +374,45 @@ jobs:
|
|||
path: src/api/python/wheelhouse/*.whl
|
||||
retention-days: 7
|
||||
|
||||
manylinux-python-riscv64:
|
||||
name: "Python bindings (manylinux RISC-V 64 cross)"
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
container: quay.io/pypa/manylinux_2_28_x86_64:latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6.0.2
|
||||
|
||||
- name: Download RISC-V toolchain
|
||||
run: curl -L -o /tmp/riscv-toolchain.tar.gz 'https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.09.03/riscv64-glibc-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz'
|
||||
|
||||
- name: Extract RISC-V toolchain
|
||||
run: |
|
||||
mkdir -p /tmp/riscv-toolchain/
|
||||
tar xf /tmp/riscv-toolchain.tar.gz -C /tmp/riscv-toolchain/ --strip-components=1
|
||||
|
||||
- name: Setup Python environment
|
||||
run: |
|
||||
/opt/python/cp38-cp38/bin/python -m venv $PWD/env
|
||||
echo "$PWD/env/bin" >> $GITHUB_PATH
|
||||
echo "/tmp/riscv-toolchain/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Install build tools
|
||||
run: |
|
||||
echo $PATH
|
||||
stat $(which riscv64-unknown-linux-gnu-gcc)
|
||||
pip install build git+https://github.com/rhelmot/auditwheel
|
||||
|
||||
- name: Build wheels
|
||||
run: cd src/api/python && CC=riscv64-unknown-linux-gnu-gcc CXX=riscv64-unknown-linux-gnu-g++ AR=riscv64-unknown-linux-gnu-ar LD=riscv64-unknown-linux-gnu-ld Z3_CROSS_COMPILING=riscv64 python -m build && AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl && cd ../../..
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ManyLinuxPythonBuildRiscv64
|
||||
path: src/api/python/wheelhouse/*.whl
|
||||
retention-days: 7
|
||||
|
||||
windows-build-x64:
|
||||
name: "Windows x64 build"
|
||||
runs-on: windows-latest
|
||||
|
|
@ -578,7 +617,7 @@ jobs:
|
|||
|
||||
python-package:
|
||||
name: "Python packaging"
|
||||
needs: [mac-build-x64, mac-build-arm64, windows-build-x64, windows-build-x86, windows-build-arm64, manylinux-python-amd64, manylinux-python-arm64]
|
||||
needs: [mac-build-x64, mac-build-arm64, windows-build-x64, windows-build-x86, windows-build-arm64, manylinux-python-amd64, manylinux-python-arm64, manylinux-python-riscv64]
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
|
@ -631,6 +670,12 @@ jobs:
|
|||
name: ManyLinuxPythonBuildArm64
|
||||
path: artifacts
|
||||
|
||||
- name: Download ManyLinux RISC-V 64 Build
|
||||
uses: actions/download-artifact@v8.0.1
|
||||
with:
|
||||
name: ManyLinuxPythonBuildRiscv64
|
||||
path: artifacts
|
||||
|
||||
- name: Extract builds
|
||||
run: |
|
||||
cd artifacts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue