Skip to content

Commit 4d92335

Browse files
Add manylinux_aarch64 platform (#76)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Shantanu Jain <hauntsaninja@gmail.com>
1 parent ac664a0 commit 4d92335

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
)
4040
echo "include=$MATRIX" | tee -a $GITHUB_OUTPUT
4141
env:
42-
CIBW_ARCHS_LINUX: x86_64
42+
CIBW_ARCHS_LINUX: x86_64 aarch64
4343
CIBW_ARCHS_MACOS: x86_64 arm64
4444
CIBW_ARCHS_WINDOWS: AMD64
4545

@@ -53,6 +53,10 @@ jobs:
5353
include: ${{ fromJson(needs.generate_wheels_matrix.outputs.include) }}
5454

5555
steps:
56+
- uses: docker/setup-qemu-action@v2
57+
if: runner.os == 'Linux'
58+
with:
59+
platforms: arm64
5660
- uses: actions/checkout@v4
5761
- name: Checkout mypy
5862
shell: bash

cibuildwheel.toml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ linux.manylinux-aarch64-image = "manylinux_2_28"
66
linux.musllinux-x86_64-image = "musllinux_1_2"
77
linux.musllinux-aarch64-image = "musllinux_1_2"
88

9-
# Don't build 32-bit wheels or PyPy
9+
# Don't build 32-bit wheels / PyPy / musllinux arm64
1010
skip = [
1111
"*-manylinux_i686",
1212
"*-musllinux_i686",
1313
"*-win32",
1414
"pp*",
15+
"*-musllinux_aarch64",
1516
]
1617

1718
# Python 3.8 can't be tested on macOS arm64
@@ -84,3 +85,17 @@ before-test = [
8485
"pip install -r {project}/mypy/test-requirements.txt",
8586
]
8687
environment = { MYPYC_OPT_LEVEL="3", MYPYC_DEBUG_LEVEL="0", CC="clang" }
88+
89+
[[tool.cibuildwheel.overrides]]
90+
select = "*linux_aarch64"
91+
# Only run testcheck, since the other tests are slow and can be flaky (because of TimeoutError).
92+
test-command = """ \
93+
( \
94+
DIR=$(python -c 'import mypy, os; dn = os.path.dirname; print(dn(dn(mypy.__path__[0])))') \
95+
&& cp '{project}/mypy/pyproject.toml' '{project}/mypy/conftest.py' $DIR \
96+
\
97+
&& MYPY_TEST_DIR=$(python -c 'import mypy.test; print(mypy.test.__path__[0])') \
98+
\
99+
&& MYPY_TEST_PREFIX='{project}/mypy' pytest $MYPY_TEST_DIR/testcheck.py \
100+
)
101+
"""

0 commit comments

Comments
 (0)