summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorNikhil Dabas <nikhil@nikhildabas.com>2026-09-18 12:31:19 +0100
committerMichael Williamson <mike@zwobble.org>2026-10-17 10:15:25 +0100
commitdf4cf4e7bdb38dcadc22555357d6f1d6e6b7caa4 (patch)
tree6204087c08eb7825e0837f13b54ba04cd7c71718 /.github
parent1834e43f65c5ce2fedac1a0cb8ea3361f56108f3 (diff)
Add Windows ARM64 builds
Diffstat (limited to '.github')
-rw-r--r--.github/actions/setup-msys2/action.yml4
-rw-r--r--.github/workflows/build.yml15
2 files changed, 15 insertions, 4 deletions
diff --git a/.github/actions/setup-msys2/action.yml b/.github/actions/setup-msys2/action.yml
index fce7c3d..2bbfca3 100644
--- a/.github/actions/setup-msys2/action.yml
+++ b/.github/actions/setup-msys2/action.yml
@@ -2,15 +2,17 @@ name: 'Setup msys2'
description: 'Install an MSYS2 toolchain targeting the given architecture.'
inputs:
arch:
- description: 'Target architecture: x86 or AMD64'
+ description: 'Target architecture: x86, AMD64 or ARM64.'
required: true
toolchains:
description: 'Lookup table mapping the target architecture to an MSYS2 environment and pacboy compiler packages.'
required: false
+ # gcc-compat provides the gcc/g++ aliases that setuptools' mingw32 compiler expects.
default: >-
{
"x86": {"msystem": "mingw32", "packages": ["gcc:p"]},
"AMD64": {"msystem": "ucrt64", "packages": ["gcc:p"]},
+ "ARM64": {"msystem": "clangarm64", "packages": ["gcc-compat:p"]}
}
runs:
using: "composite"
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ed4573a..67b4199 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -90,7 +90,13 @@ jobs:
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_MACOS: "auto"
CIBW_ENABLE: "pypy"
- CIBW_SKIP: "pp*-win_amd64"
+ # win_arm64 is restricted to CPython 3.11+, the earliest version with
+ # ARM64 builds available to actions/setup-python for testing.
+ #
+ # Free-threaded win_arm64 is skipped because CPython's _Py_ThreadId()
+ # tries calling __getReg() that CLANGARM64 clang does not provide.
+ # https://github.com/python/cpython/issues/157212
+ CIBW_SKIP: "pp*-win_amd64 cp39-win_arm64 cp310-win_arm64 cp3??t-win_arm64"
run: |
MATRIX=$(
{
@@ -99,7 +105,9 @@ jobs:
&& cibuildwheel --print-build-identifiers --platform macos \
| sed 's/.*/{"cibw-only": "&", "os": "macos-15-intel" }/' \
&& CIBW_ARCHS_WINDOWS=AMD64 cibuildwheel --print-build-identifiers --platform windows \
- | sed 's/.*/{"cibw-only": "&", "os": "windows-2022", "arch": "AMD64" }/'
+ | sed 's/.*/{"cibw-only": "&", "os": "windows-2022", "arch": "AMD64" }/' \
+ && CIBW_ARCHS_WINDOWS=ARM64 cibuildwheel --print-build-identifiers --platform windows \
+ | sed 's/.*/{"cibw-only": "&", "os": "windows-11-arm", "arch": "ARM64" }/'
} | jq --slurp --compact-output '{"include": .}'
)
echo matrix="$MATRIX" >> $GITHUB_OUTPUT
@@ -127,7 +135,8 @@ jobs:
matrix.cibw-only == 'cp310-macosx_x86_64' ||
matrix.cibw-only == 'cp314t-macosx_x86_64' ||
matrix.cibw-only == 'cp310-win_amd64' ||
- matrix.cibw-only == 'cp314t-win_amd64'
+ matrix.cibw-only == 'cp314t-win_amd64' ||
+ matrix.cibw-only == 'cp311-win_arm64'
shell: bash
run: echo true=1 >> $GITHUB_OUTPUT