Skip to content

Use GitHub Actions native arm64 runners #341

Closed
@llucax

Description

@llucax

What's needed?

Now native arm64 runners are available for public projects:

https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview

Proposed solution

Remove the nox-cross-arch jobs and just add this arch to the nox matrix.

Additional context

If we switch to the nox action, we can use something like this:

jobs:
  nox:
    name: Test with nox
    strategy:
      fail-fast: false
      matrix:
        arch:
          - amd64
          - arm
        os:
          - ubuntu-22.04
        python:
          - "3.11"
        nox-session:
          # To speed things up a bit we use the special ci_checks_max session
          # that uses the same venv to run multiple linting sessions
          - "ci_checks_max"
          - "pytest_min"
    runs-on: ${{ matrix.os }}${{ matrix.arch != 'amd64' && format('-{0}', matrix.arch) || '' }}

    steps:
      - name: Run nox
        uses: frequenz-floss/[email protected]
        with:
          python-version: ${{ matrix.python }}
          nox-session: ${{ matrix.nox-session }}

  # This job runs if all the `nox` matrix jobs ran and succeeded.
  # It is only used to have a single job that we can require in branch
  # protection rules, so we don't have to update the protection rules each time
  # we add or remove a job from the matrix.
  nox-all:
    # The job name should match the name of the `nox` job.
    name: Test with nox
    needs: ["nox"]
    # We skip this job only if nox was also skipped
    if: always() && needs.nox.result != 'skipped'
    runs-on: ubuntu-22.04
    env:
      DEPS_RESULT: ${{ needs.nox.result }}
    steps:
      - name: Check matrix job result
        run: test "$DEPS_RESULT" = "success"

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:ciAffects the GitHub workflow and other parts for running CIpart:templateAffects the cookiecutter template filestype:enhancementNew feature or enhancement visitble to users

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions