Skip to content
Merged
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
54 changes: 36 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
needs: [release]
if: needs.release.outputs.released == 'true'

name: Build wheels on ${{ matrix.os }} (${{ matrix.musl }})
name: Build wheels on ${{ matrix.os }} (${{ matrix.musl }}) [${{ matrix.qemu }}]
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -173,27 +173,47 @@ jobs:
macos-13,
macos-latest,
]
musl: ["", "musllinux"]
exclude:
- os: windows-2019
musl: "musllinux"
- os: macos-13
musl: "musllinux"
- os: macos-latest
musl: "musllinux"

qemu: ['']
musl: [""]
include:
- os: ubuntu-latest
qemu: armv7l
musl: ""
Comment on lines +179 to +181

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if these images work but we can always remove it and try again in a followup if needed

- os: ubuntu-latest
qemu: armv7l
musl: musllinux
- os: ubuntu-latest
musl: musllinux
- os: ubuntu-24.04-arm
musl: musllinux
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "master"

# Used to host cibuildwheel
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

python-version: "3.12"
- name: Set up QEMU
if: ${{ matrix.qemu }}
uses: docker/setup-qemu-action@v3
with:
platforms: all
# This should be temporary
# xref https://github.com/docker/setup-qemu-action/issues/188
# xref https://github.com/tonistiigi/binfmt/issues/215
image: tonistiigi/binfmt:qemu-v8.1.5
id: qemu
- name: Prepare emulation
run: |
if [[ -n "${{ matrix.qemu }}" ]]; then
# Build emulated architectures only if QEMU is set,
# use default "auto" otherwise
echo "CIBW_ARCHS_LINUX=${{ matrix.qemu }}" >> $GITHUB_ENV
fi
- name: Install python-semantic-release
run: pipx install python-semantic-release==7.34.6

Expand All @@ -208,20 +228,18 @@ jobs:
ref: "${{ steps.release_tag.outputs.newest_release_tag }}"
fetch-depth: 0

- name: Build wheels ${{ matrix.musl }}
- name: Build wheels ${{ matrix.musl }} (${{ matrix.qemu }})
uses: pypa/cibuildwheel@v2.22.0
# to supply options, put them in 'env', like:
env:
CIBW_SKIP: cp36-* cp37-* pp36-* pp37-* pp38-* cp38-* *p39-*_aarch64 *p310-*_aarch64 pp*_aarch64 ${{ matrix.musl == 'musllinux' && '*manylinux*' || '*musllinux*' }}
CIBW_BEFORE_ALL_LINUX: apt install -y gcc || yum install -y gcc || apk add gcc
CIBW_ARCHS_LINUX: ${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64' || 'auto' }}
CIBW_BUILD_VERBOSITY: 3
REQUIRE_CYTHON: 1

- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: wheels-${{ matrix.os }}-${{ matrix.musl }}
name: wheels-${{ matrix.os }}-${{ matrix.musl }}-${{ matrix.qemu }}

upload_pypi:
needs: [build_wheels]
Expand Down