RalfG / python-wheels-manylinux-build

GitHub Action to build Python manylinux wheels
https://github.com/marketplace/actions/python-wheels-manylinux-build
Apache License 2.0
92 stars 44 forks source link

How do you build packages for things such as i686 and aarch64? #60

Closed kesmit13 closed 1 year ago

kesmit13 commented 1 year ago

I'm using your action to build x86 packages, but I'm not sure how to build them for alternate architectures. Your documentation mentions using alternate docker images, but I'm not sure how to create that architecture in Github actions. Do you have any examples of that?

mrmundt commented 1 year ago

@kesmit13 - I have an example here for which we used the docker/QEMU action to simulate the architecture.

RalfG commented 1 year ago

Indeed, first add an action to setup Docker emulation:

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

Then use this action with the specific container for the architecture you require, e.g.:

    - name: Build manylinux Python wheels
      uses: RalfG/python-wheels-manylinux-build@v0.4.0-manylinux2014_aarch64
      with:
        python-versions: ${{ matrix. Wheel-version }}

For more complex setups, you can also use the official PyPA/cibuildwheel action.