mirror of
https://github.com/Z3Prover/z3
synced 2025-12-25 05:26:51 +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:
parent
d771032fed
commit
cfcd2553fd
2 changed files with 34 additions and 26 deletions
|
|
@ -174,24 +174,28 @@ stages:
|
|||
vmImage: "ubuntu-latest"
|
||||
steps:
|
||||
- script: |
|
||||
set -e
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y qemu-user-static
|
||||
displayName: "Install QEMU for ARM64 emulation"
|
||||
- script: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
displayName: "Register QEMU"
|
||||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
displayName: "Setup QEMU for ARM64 emulation"
|
||||
- script: |
|
||||
set -e
|
||||
docker run --rm -v $(pwd):/workspace -w /workspace \
|
||||
-e HOME=/tmp \
|
||||
quay.io/pypa/manylinux2014_aarch64:latest \
|
||||
bash -c "/opt/python/cp38-cp38/bin/python -m venv /workspace/env && \
|
||||
source /workspace/env/bin/activate && \
|
||||
pip install build git+https://github.com/rhelmot/auditwheel && \
|
||||
cd src/api/python && \
|
||||
python -m build && \
|
||||
AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl && \
|
||||
cd ../../.. && \
|
||||
pip install ./src/api/python/wheelhouse/*.whl && \
|
||||
python - <src/api/python/z3test.py z3 && \
|
||||
python - <src/api/python/z3test.py z3num"
|
||||
bash -c "
|
||||
set -e
|
||||
/opt/python/cp38-cp38/bin/python -m venv /tmp/env
|
||||
source /tmp/env/bin/activate
|
||||
pip install build git+https://github.com/rhelmot/auditwheel
|
||||
cd /workspace/src/api/python
|
||||
python -m build
|
||||
AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl
|
||||
pip install wheelhouse/*.whl
|
||||
python - <z3test.py z3
|
||||
python - <z3test.py z3num
|
||||
"
|
||||
displayName: "Build and test ARM64 wheel"
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
|
|
|
|||
|
|
@ -178,24 +178,28 @@ stages:
|
|||
vmImage: "ubuntu-latest"
|
||||
steps:
|
||||
- script: |
|
||||
set -e
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y qemu-user-static
|
||||
displayName: "Install QEMU for ARM64 emulation"
|
||||
- script: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
displayName: "Register QEMU"
|
||||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
displayName: "Setup QEMU for ARM64 emulation"
|
||||
- script: |
|
||||
set -e
|
||||
docker run --rm -v $(pwd):/workspace -w /workspace \
|
||||
-e HOME=/tmp \
|
||||
quay.io/pypa/manylinux2014_aarch64:latest \
|
||||
bash -c "/opt/python/cp38-cp38/bin/python -m venv /workspace/env && \
|
||||
source /workspace/env/bin/activate && \
|
||||
pip install build git+https://github.com/rhelmot/auditwheel && \
|
||||
cd src/api/python && \
|
||||
python -m build && \
|
||||
AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl && \
|
||||
cd ../../.. && \
|
||||
pip install ./src/api/python/wheelhouse/*.whl && \
|
||||
python - <src/api/python/z3test.py z3 && \
|
||||
python - <src/api/python/z3test.py z3num"
|
||||
bash -c "
|
||||
set -e
|
||||
/opt/python/cp38-cp38/bin/python -m venv /tmp/env
|
||||
source /tmp/env/bin/activate
|
||||
pip install build git+https://github.com/rhelmot/auditwheel
|
||||
cd /workspace/src/api/python
|
||||
python -m build
|
||||
AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl
|
||||
pip install wheelhouse/*.whl
|
||||
python - <z3test.py z3
|
||||
python - <z3test.py z3num
|
||||
"
|
||||
displayName: "Build and test ARM64 wheel"
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue