Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running publish workflow on aarch64 runners #227

Closed
Cadair opened this issue Sep 15, 2024 · 5 comments · Fixed by #247
Closed

Support running publish workflow on aarch64 runners #227

Cadair opened this issue Sep 15, 2024 · 5 comments · Fixed by #247
Labels
enhancement New feature or request

Comments

@Cadair
Copy link
Member

Cadair commented Sep 15, 2024

GitHub now has support for paid for aarch64 runners, which means passing labels to runs-on:. I don't think there is a way we can do this at the moment, looks like we would need to customise the get_os function

@Cadair Cadair added the enhancement New feature or request label Sep 15, 2024
@Cadair
Copy link
Member Author

Cadair commented Sep 16, 2024

@ConorMacBride I don't suppose you have any quick input on this before I start fumbling around in the dark?

@ConorMacBride
Copy link
Member

We could support something like this to modify the default image? Should just be a matter of updating get_matrix_item to extract the options depending on whether it receives a string or a dict.

jobs:
  publish:
    uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1
    with:
      test_extras: test
      test_command: pytest --pyargs test_package
      targets: |
        - linux
        - build: cp3?-manylinux_aarch64
          runs-on: ubuntu-latest-aarch64
        - cp3?-macosx_x86_64
    secrets:
      pypi_token: ${{ secrets.pypi_token }}

def get_matrix_item(target):
return {
"target": target,
"os": get_os(target),
"CIBW_BUILD": get_cibw_build(target),
"CIBW_ARCHS": get_cibw_archs(target),
"artifact-name": get_artifact_name(target),
}

@pllim
Copy link
Contributor

pllim commented Sep 17, 2024

Astropy is very interested. Please keep us updated. Thanks!

@Cadair
Copy link
Member Author

Cadair commented Nov 11, 2024

@ConorMacBride What do you think the best solution for detecting when to use QEMU is?
i.e. what should we change this to:

if: ${{ matrix.CIBW_ARCHS == 'aarch64' }}

Should we make it check to see if CIBW_ARCH is not equal to the native arch? I have no idea how we would do that.

@ConorMacBride
Copy link
Member

Cibuildwheel docs say that it supports QEMU on Linux. The cibuildwheel and QEMU docs suggests that the QEMU action is needed for aarch64 ppc64le s390x. As you say, I think it might be sufficient to just check we are on Linux (uname -s) and CIBW_ARCHS contains one of those three or all, excluding the native architecture. uname -m might be sufficient. I just tested it on a RPi4 and it outputs aarch64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants