Skip to content

Commit

Permalink
build: fix aarch64 kits #1927
Browse files Browse the repository at this point in the history
Using advice from pypa/cibuildwheel#2257
  • Loading branch information
nedbat committed Feb 11, 2025
1 parent a1f3192 commit ce4efdc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ defaults:

env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
# PYVERSIONS: changing the list of versions will change the number of
# expected distributions.
EXPECTED: 63

permissions:
contents: read
Expand Down Expand Up @@ -99,6 +102,9 @@ jobs:
# }
# if the_os == "macos":
# them["os-version"] = "13"
# if the_arch == "aarch64":
# # https://github.com/pypa/cibuildwheel/issues/2257
# them["os-version"] = "22.04-arm"
# print(f"- {json.dumps(them)}")
# ]]]
- {"os": "ubuntu", "py": "cp39", "arch": "x86_64"}
Expand All @@ -111,11 +117,11 @@ jobs:
- {"os": "ubuntu", "py": "cp311", "arch": "i686"}
- {"os": "ubuntu", "py": "cp312", "arch": "i686"}
- {"os": "ubuntu", "py": "cp313", "arch": "i686"}
- {"os": "ubuntu", "py": "cp39", "arch": "aarch64"}
- {"os": "ubuntu", "py": "cp310", "arch": "aarch64"}
- {"os": "ubuntu", "py": "cp311", "arch": "aarch64"}
- {"os": "ubuntu", "py": "cp312", "arch": "aarch64"}
- {"os": "ubuntu", "py": "cp313", "arch": "aarch64"}
- {"os": "ubuntu", "py": "cp39", "arch": "aarch64", "os-version": "22.04-arm"}
- {"os": "ubuntu", "py": "cp310", "arch": "aarch64", "os-version": "22.04-arm"}
- {"os": "ubuntu", "py": "cp311", "arch": "aarch64", "os-version": "22.04-arm"}
- {"os": "ubuntu", "py": "cp312", "arch": "aarch64", "os-version": "22.04-arm"}
- {"os": "ubuntu", "py": "cp313", "arch": "aarch64", "os-version": "22.04-arm"}
- {"os": "macos", "py": "cp39", "arch": "arm64", "os-version": "13"}
- {"os": "macos", "py": "cp310", "arch": "arm64", "os-version": "13"}
- {"os": "macos", "py": "cp311", "arch": "arm64", "os-version": "13"}
Expand All @@ -136,16 +142,10 @@ jobs:
- {"os": "windows", "py": "cp311", "arch": "AMD64"}
- {"os": "windows", "py": "cp312", "arch": "AMD64"}
- {"os": "windows", "py": "cp313", "arch": "AMD64"}
# [[[end]]] (checksum: 38b83d67f00c838e5e7f69f803b7536c)
# [[[end]]] (checksum: 7c3758a4ca41df53d7ebcad68f12d0d0)
fail-fast: false

steps:
- name: "Setup QEMU"
if: matrix.os == 'ubuntu'
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v3.4.0
with:
platforms: arm64

- name: "Check out the repo"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand Down Expand Up @@ -292,10 +292,6 @@ jobs:
merge-multiple: true

- name: "List distributions"
env:
# PYVERSIONS: changing the list of versions will change the number of
# expected distributions.
EXPECTED: 63
run: |
ls -alR
echo "Number of dists, there should be $EXPECTED:"
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ defaults:
run:
shell: bash

env:
# PYVERSIONS: changing the list of versions will change the number of
# expected distributions.
EXPECTED: 63

permissions:
contents: read

Expand Down Expand Up @@ -71,8 +76,9 @@ jobs:
- name: "What did we get?"
run: |
ls -alR
echo "Number of dists, should be 72:"
echo "Number of dists, should be $EXPECTED:"
ls -1 dist | wc -l
files=$(ls dist 2>/dev/null | wc -l) && [ "$files" -eq $EXPECTED ] || exit 1
- name: "Generate attestations"
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
Expand Down Expand Up @@ -110,8 +116,9 @@ jobs:
- name: "What did we get?"
run: |
ls -alR
echo "Number of dists, should be 72:"
echo "Number of dists, should be $EXPECTED:"
ls -1 dist | wc -l
files=$(ls dist 2>/dev/null | wc -l) && [ "$files" -eq $EXPECTED ] || exit 1
- name: "Generate attestations"
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
Expand Down
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ upgrading your version of coverage.py.
Unreleased
----------

Nothing yet.
- Fix: some aarch64 distributions were missing (`issue 1927`_). These are now
building reliably.

.. _issue 1927: https://github.com/nedbat/coveragepy/issues/1927

.. start-releases
Expand Down

0 comments on commit ce4efdc

Please sign in to comment.