3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-05 23:06:12 +00:00

Fix ARM64 build: improve Docker command structure

- Combine QEMU setup steps with better error handling
- Set HOME=/tmp to avoid permission issues
- Use /tmp for venv to avoid workspace conflicts
- Fix path references in test commands to be relative
- Add set -e for fail-fast behavior

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-12-21 21:30:34 +00:00
parent d771032fed
commit cfcd2553fd
2 changed files with 34 additions and 26 deletions

View file

@ -174,24 +174,28 @@ stages:
vmImage: "ubuntu-latest" vmImage: "ubuntu-latest"
steps: steps:
- script: | - script: |
set -e
sudo apt-get update sudo apt-get update
sudo apt-get install -y qemu-user-static sudo apt-get install -y qemu-user-static
displayName: "Install QEMU for ARM64 emulation" docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- script: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes displayName: "Setup QEMU for ARM64 emulation"
displayName: "Register QEMU"
- script: | - script: |
set -e
docker run --rm -v $(pwd):/workspace -w /workspace \ docker run --rm -v $(pwd):/workspace -w /workspace \
-e HOME=/tmp \
quay.io/pypa/manylinux2014_aarch64:latest \ quay.io/pypa/manylinux2014_aarch64:latest \
bash -c "/opt/python/cp38-cp38/bin/python -m venv /workspace/env && \ bash -c "
source /workspace/env/bin/activate && \ set -e
pip install build git+https://github.com/rhelmot/auditwheel && \ /opt/python/cp38-cp38/bin/python -m venv /tmp/env
cd src/api/python && \ source /tmp/env/bin/activate
python -m build && \ pip install build git+https://github.com/rhelmot/auditwheel
AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl && \ cd /workspace/src/api/python
cd ../../.. && \ python -m build
pip install ./src/api/python/wheelhouse/*.whl && \ AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl
python - <src/api/python/z3test.py z3 && \ pip install wheelhouse/*.whl
python - <src/api/python/z3test.py z3num" python - <z3test.py z3
python - <z3test.py z3num
"
displayName: "Build and test ARM64 wheel" displayName: "Build and test ARM64 wheel"
- task: CopyFiles@2 - task: CopyFiles@2
inputs: inputs:

View file

@ -178,24 +178,28 @@ stages:
vmImage: "ubuntu-latest" vmImage: "ubuntu-latest"
steps: steps:
- script: | - script: |
set -e
sudo apt-get update sudo apt-get update
sudo apt-get install -y qemu-user-static sudo apt-get install -y qemu-user-static
displayName: "Install QEMU for ARM64 emulation" docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- script: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes displayName: "Setup QEMU for ARM64 emulation"
displayName: "Register QEMU"
- script: | - script: |
set -e
docker run --rm -v $(pwd):/workspace -w /workspace \ docker run --rm -v $(pwd):/workspace -w /workspace \
-e HOME=/tmp \
quay.io/pypa/manylinux2014_aarch64:latest \ quay.io/pypa/manylinux2014_aarch64:latest \
bash -c "/opt/python/cp38-cp38/bin/python -m venv /workspace/env && \ bash -c "
source /workspace/env/bin/activate && \ set -e
pip install build git+https://github.com/rhelmot/auditwheel && \ /opt/python/cp38-cp38/bin/python -m venv /tmp/env
cd src/api/python && \ source /tmp/env/bin/activate
python -m build && \ pip install build git+https://github.com/rhelmot/auditwheel
AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl && \ cd /workspace/src/api/python
cd ../../.. && \ python -m build
pip install ./src/api/python/wheelhouse/*.whl && \ AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl
python - <src/api/python/z3test.py z3 && \ pip install wheelhouse/*.whl
python - <src/api/python/z3test.py z3num" python - <z3test.py z3
python - <z3test.py z3num
"
displayName: "Build and test ARM64 wheel" displayName: "Build and test ARM64 wheel"
- task: CopyFiles@2 - task: CopyFiles@2
inputs: inputs: