Skip to content

Commit

Permalink
feat(build): add cross-compilation support for Linux ARM64
Browse files Browse the repository at this point in the history
This commit adds proper cross-compilation support for Linux ARM64:

- Add QEMU emulation for ARM64 builds
- Configure Rust cross-compilation toolchains
- Add architecture-specific Rust targets
- Keep x86_64 builds unchanged for compatibility

These changes enable proper cross-compilation of wheels for both x86_64
and aarch64 architectures on Linux using QEMU emulation where needed.
The build process now properly handles architecture-specific toolchains
and containers while maintaining manylinux2014 compatibility.
  • Loading branch information
dirvine committed Nov 28, 2024
1 parent 0b5ef39 commit eba0a77
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,22 @@ jobs:
- target: x86_64
container: quay.io/pypa/manylinux2014_x86_64
platform-tag: manylinux2014_x86_64
rust-target: x86_64-unknown-linux-gnu
- target: aarch64
container: quay.io/pypa/manylinux2014_aarch64
platform-tag: manylinux2014_aarch64
rust-target: aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: matrix.target == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rust-target }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand Down

0 comments on commit eba0a77

Please sign in to comment.