Skip to content

Remove QEMU in build_pypi workflow #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/build_pypi_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ WHEEL_NAME=$(ls $WHEEL_OUTPUT_FOLDER)
echo "Temporary wheel: $(ls $WHEEL_OUTPUT_FOLDER)"
auditwheel show $WHEEL_OUTPUT_FOLDER/$WHEEL_NAME

echo "Auditing wheel to platform $PLAT..."
echo "Auditing wheel to platform $DOCKER_IMG..."
auditwheel repair $WHEEL_OUTPUT_FOLDER/$WHEEL_NAME -w $WHEEL_OUTPUT_FOLDER
rm $WHEEL_OUTPUT_FOLDER/$WHEEL_NAME

Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/build_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,38 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
build_platform: ["manylinux2014_x86_64", "manylinux2014_aarch64"]
platform: [ubuntu-22.04, ubuntu-22.04-arm]
include:
- image: "manylinux2014_x86_64"
platform: ubuntu-22.04
- image: "manylinux2014_aarch64"
platform: ubuntu-22.04-arm

runs-on: ubuntu-20.04
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all

- name: Build Wheel
env:
DOCKER_IMG: quay.io/pypa/${{ matrix.build_platform }}
DOCKER_IMG: quay.io/pypa/${{ matrix.image }}
DOCKER_MNT: pypi_build
WHEEL_DIR: wheel # wheel location
run: |
echo "Build wheel for PECOS using Python version ${{ matrix.python-version }}..."
docker run --rm -v $(pwd):/$DOCKER_MNT \
--env PLAT=${{ matrix.build_platform }} --env PIP_VER=${{ matrix.python-version }} \
--env DOCKER_IMG=$DOCKER_IMG --env PIP_VER=${{ matrix.python-version }} \
--env DOCKER_MNT=$DOCKER_MNT --env WHEEL_DIR=$WHEEL_DIR \
$DOCKER_IMG /bin/bash /$DOCKER_MNT/.github/build_pypi_wheel.sh

- name: Test Wheel
if: matrix.build_platform == 'manylinux2014_x86_64' # Only test for x86, aarch64 simulation too slow
env:
WHEEL_DIR: wheel # wheel location
run: |
Expand Down