Skip to content

Support running publish workflow on aarch64 runners #227

Closed

Description

@Cadair

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

Activity

  1. Cadair commented on Sep 16, 2024

    @Cadair
    MemberAuthor

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

  2. ConorMacBride commented on Sep 16, 2024

    @ConorMacBride
    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),
    }

  3. pllim commented on Sep 17, 2024

    @pllim
    Contributor

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

  4. Cadair commented on Nov 11, 2024

    @Cadair
    MemberAuthor

    @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.

  5. ConorMacBride commented on Nov 12, 2024

    @ConorMacBride
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions