Skip to content

Commit

Permalink
Move aarch64 build to separate job since no progress on bug pypa/cibu…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Dedden committed Mar 8, 2024
1 parent 5dd2706 commit 05d0ea4
Showing 1 changed file with 49 additions and 11 deletions.
60 changes: 49 additions & 11 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ jobs:
env:
CIBW_SKIP: "*-musllinux*"
CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/chatnoir-eu/resiliparse-manylinux_2_28_x86_64:latest
CIBW_MANYLINUX_AARCH64_IMAGE: ghcr.io/chatnoir-eu/resiliparse-manylinux_2_28_aarch64:latest
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_LINUX: "x86_64 aarch64"
CIBW_TEST_SKIP: "*-macosx_arm64 *-manylinux_aarch64" # Apple Silicon wheels cannot be tested
CIBW_ARCHS_LINUX: "x86_64"
CIBW_TEST_SKIP: "*-macosx_arm64" # Apple Silicon wheels cannot be tested
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >-
DYLD_LIBRARY_PATH=$LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
CIBW_BEFORE_BUILD_WINDOWS: "python -m pip install delvewheel"
Expand Down Expand Up @@ -77,21 +76,60 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Build FastWARC
uses: pypa/[email protected]
with:
package-dir: fastwarc
output-dir: wheelhouse
env:
CIBW_TEST_COMMAND: python -m pytest --capture=sys --verbose {project}/tests/fastwarc

- name: Build Resiliparse
uses: pypa/[email protected]
with:
package-dir: resiliparse
output-dir: wheelhouse
env:
CIBW_BEFORE_TEST: >-
python -c "import glob, platform; open('fastwarc.txt', 'w').write(glob.glob('wheelhouse/FastWARC-*cp' + ''.join(map(str, platform.python_version_tuple()[:2])) + '-*_' + platform.machine().lower() + '.whl')[0])" &&
python -m pip install -r fastwarc.txt
CIBW_TEST_COMMAND: python -m pytest --capture=sys --verbose {project}/tests/resiliparse

- name: Upload Wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl

build-wheels-qemu:
runs-on: ubuntu-latest
env:
CIBW_SKIP: "*-musllinux*"
CIBW_MANYLINUX_AARCH64_IMAGE: ghcr.io/chatnoir-eu/resiliparse-manylinux_2_28_aarch64:latest
CIBW_ARCHS_LINUX: "aarch64"
CIBW_TEST_SKIP: "*-manylinux_aarch64"
# https://github.com/pypa/cibuildwheel/issues/1771#issuecomment-1973003145
CIBW_CONTAINER_ENGINE: "docker; create_args: --platform linux/arm64/v8"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

# - name: Install cibuildwheel
# run: python -m pip install cibuildwheel

- name: Build FastWARC
uses: pypa/[email protected]
with:
package-dir: fastwarc
output-dir: wheelhouse
# run: python -m cibuildwheel --output-dir wheelhouse fastwarc
env:
CIBW_TEST_COMMAND: python -m pytest --capture=sys --verbose {project}/tests/fastwarc

Expand All @@ -100,7 +138,6 @@ jobs:
with:
package-dir: resiliparse
output-dir: wheelhouse
# run: python -m cibuildwheel --output-dir wheelhouse resiliparse
env:
CIBW_BEFORE_TEST: >-
python -c "import glob, platform; open('fastwarc.txt', 'w').write(glob.glob('wheelhouse/FastWARC-*cp' + ''.join(map(str, platform.python_version_tuple()[:2])) + '-*_' + platform.machine().lower() + '.whl')[0])" &&
Expand Down Expand Up @@ -142,7 +179,8 @@ jobs:
build-asan:
runs-on: ubuntu-latest
container:
image: ghcr.io/chatnoir-eu/resiliparse-manylinux_2_28_x86_64:latest
# still old image here since wrong gcc asan toolset was installed in new Dockerfile
image: ghcr.io/chatnoir-eu/resiliparse-manylinux2014_x86_64:latest
env:
DEBUG: "1"
ASAN: "1"
Expand Down Expand Up @@ -244,7 +282,7 @@ jobs:
publish-wheels:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [ build-wheels, build-sdist, build-documentation ]
needs: [ build-wheels, build-wheels-qemu, build-sdist, build-documentation ]
steps:
- name: Download Wheels
uses: actions/download-artifact@v3
Expand Down

0 comments on commit 05d0ea4

Please sign in to comment.