Skip to content

Commit

Permalink
Add manylinux_aarch64 platform (#76)
Browse files Browse the repository at this point in the history
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu Jain <hauntsaninja@gmail.com>
  • Loading branch information
3 people authored Dec 28, 2024
1 parent ac664a0 commit 4d92335
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
)
echo "include=$MATRIX" | tee -a $GITHUB_OUTPUT
env:
CIBW_ARCHS_LINUX: x86_64
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_WINDOWS: AMD64

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

steps:
- uses: docker/setup-qemu-action@v2
if: runner.os == 'Linux'
with:
platforms: arm64
- uses: actions/checkout@v4
- name: Checkout mypy
shell: bash
Expand Down
17 changes: 16 additions & 1 deletion cibuildwheel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ linux.manylinux-aarch64-image = "manylinux_2_28"
linux.musllinux-x86_64-image = "musllinux_1_2"
linux.musllinux-aarch64-image = "musllinux_1_2"

# Don't build 32-bit wheels or PyPy
# Don't build 32-bit wheels / PyPy / musllinux arm64
skip = [
"*-manylinux_i686",
"*-musllinux_i686",
"*-win32",
"pp*",
"*-musllinux_aarch64",
]

# Python 3.8 can't be tested on macOS arm64
Expand Down Expand Up @@ -84,3 +85,17 @@ before-test = [
"pip install -r {project}/mypy/test-requirements.txt",
]
environment = { MYPYC_OPT_LEVEL="3", MYPYC_DEBUG_LEVEL="0", CC="clang" }

[[tool.cibuildwheel.overrides]]
select = "*linux_aarch64"
# Only run testcheck, since the other tests are slow and can be flaky (because of TimeoutError).
test-command = """ \
( \
DIR=$(python -c 'import mypy, os; dn = os.path.dirname; print(dn(dn(mypy.__path__[0])))') \
&& cp '{project}/mypy/pyproject.toml' '{project}/mypy/conftest.py' $DIR \
\
&& MYPY_TEST_DIR=$(python -c 'import mypy.test; print(mypy.test.__path__[0])') \
\
&& MYPY_TEST_PREFIX='{project}/mypy' pytest $MYPY_TEST_DIR/testcheck.py \
)
"""

0 comments on commit 4d92335

Please sign in to comment.