Skip to content

Commit

Permalink
Use Github action arm runner for aarch64 builds (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p authored Jan 17, 2025
1 parent 4d92335 commit ec06cea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ jobs:
run: |
MATRIX=$(
{
cibuildwheel --config-file=cibuildwheel.toml --print-build-identifiers --platform linux mypy \
cibuildwheel --config-file=cibuildwheel.toml --print-build-identifiers --platform linux --archs x86_64 mypy \
| pyp 'json.dumps({"only": x, "os": "ubuntu-latest"})' \
&& cibuildwheel --config-file=cibuildwheel.toml --print-build-identifiers --platform linux --archs aarch64 mypy \
| pyp 'json.dumps({"only": x, "os": "ubuntu-24.04-arm"})' \
&& cibuildwheel --config-file=cibuildwheel.toml --print-build-identifiers --platform macos mypy \
| pyp 'json.dumps({"only": x, "os": "macos-latest"})' \
&& cibuildwheel --config-file=cibuildwheel.toml --print-build-identifiers --platform windows mypy \
Expand All @@ -39,7 +41,6 @@ jobs:
)
echo "include=$MATRIX" | tee -a $GITHUB_OUTPUT
env:
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_WINDOWS: AMD64

Expand All @@ -53,10 +54,6 @@ 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
14 changes: 0 additions & 14 deletions cibuildwheel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,3 @@ 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 \
)
"""
2 changes: 1 addition & 1 deletion mypy_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
499adaed8adbded1a180e30d071438fef81779ec
8859d5163fc6bd16c2161e24fcf2677e3d6479e1

0 comments on commit ec06cea

Please sign in to comment.