add multiarch #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} - ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
arch: [x86_64, aarch64] # Use 'aarch64' for Linux ARM builds, 'x86_64' for AMD/Intel | |
steps: | |
- uses: actions/checkout@v4 | |
# Set up Python environment | |
- uses: actions/setup-python@v5 | |
# Install librdkafka for the Confluent Kafka build | |
- name: Install librdkafka (for confluent_kafka) | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y librdkafka-dev | |
sudo whereis librdkafka | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.20.0 | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_ARCHS: ${{ matrix.arch }} # Use aarch64 for ARM on Linux | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl |