From d055eea24e641a4ea17a7cd046e5caea37f561bd Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Jan 2026 21:15:11 -0800 Subject: [PATCH] Add Windows ARM64 Python wheel builds (#8280) * Initial plan * Add Windows ARM64 Python wheel building to nightly and release builds Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Improve clarity of wheel copying step with better comments Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Use existing windows-build-arm64 output instead of separate build job Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --- .github/workflows/nightly.yml | 12 ++++++++++-- .github/workflows/release.yml | 12 ++++++++++-- src/api/python/setup.py | 1 + 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b58cdfb52..6662a77cb 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -463,7 +463,7 @@ jobs: python-package: name: "Python packaging" - needs: [mac-build-x64, mac-build-arm64, windows-build-x64, windows-build-x86, manylinux-python-amd64, manylinux-python-arm64] + needs: [mac-build-x64, mac-build-arm64, windows-build-x64, windows-build-x86, windows-build-arm64, manylinux-python-amd64, manylinux-python-arm64] runs-on: ubuntu-24.04 steps: - name: Checkout code @@ -498,6 +498,12 @@ jobs: name: WindowsBuild-x86 path: artifacts + - name: Download Win ARM64 Build + uses: actions/download-artifact@v7.0.0 + with: + name: WindowsBuild-arm64 + path: artifacts + - name: Download ManyLinux AMD64 Build uses: actions/download-artifact@v7.0.0 with: @@ -514,11 +520,12 @@ jobs: run: | cd artifacts ls - mkdir -p osx-x64-bin osx-arm64-bin win32-bin win64-bin + mkdir -p osx-x64-bin osx-arm64-bin win32-bin win64-bin win-arm64-bin cd osx-x64-bin && unzip ../z3-*-x64-osx*.zip && cd .. cd osx-arm64-bin && unzip ../z3-*-arm64-osx*.zip && cd .. cd win32-bin && unzip ../z3-*-x86-win*.zip && cd .. cd win64-bin && unzip ../z3-*-x64-win*.zip && cd .. + cd win-arm64-bin && unzip ../z3-*-arm64-win*.zip && cd .. - name: Build Python packages run: | @@ -527,6 +534,7 @@ jobs: python3 setup.py sdist echo $PWD/../../../artifacts/win32-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel echo $PWD/../../../artifacts/win64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel + echo $PWD/../../../artifacts/win-arm64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel echo $PWD/../../../artifacts/osx-x64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel echo $PWD/../../../artifacts/osx-arm64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0cde283ad..babf1309c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -482,7 +482,7 @@ jobs: python-package: name: "Python packaging" - needs: [mac-build-x64, mac-build-arm64, windows-build-x64, windows-build-x86, manylinux-python-amd64, manylinux-python-arm64] + needs: [mac-build-x64, mac-build-arm64, windows-build-x64, windows-build-x86, windows-build-arm64, manylinux-python-amd64, manylinux-python-arm64] runs-on: ubuntu-24.04 steps: - name: Checkout code @@ -517,6 +517,12 @@ jobs: name: WindowsBuild-x86 path: artifacts + - name: Download Win ARM64 Build + uses: actions/download-artifact@v7.0.0 + with: + name: WindowsBuild-arm64 + path: artifacts + - name: Download ManyLinux AMD64 Build uses: actions/download-artifact@v7.0.0 with: @@ -533,11 +539,12 @@ jobs: run: | cd artifacts ls - mkdir -p osx-x64-bin osx-arm64-bin win32-bin win64-bin + mkdir -p osx-x64-bin osx-arm64-bin win32-bin win64-bin win-arm64-bin cd osx-x64-bin && unzip ../z3-*-x64-osx*.zip && cd .. cd osx-arm64-bin && unzip ../z3-*-arm64-osx*.zip && cd .. cd win32-bin && unzip ../z3-*-x86-win*.zip && cd .. cd win64-bin && unzip ../z3-*-x64-win*.zip && cd .. + cd win-arm64-bin && unzip ../z3-*-arm64-win*.zip && cd .. - name: Build Python packages run: | @@ -546,6 +553,7 @@ jobs: python3 setup.py sdist echo $PWD/../../../artifacts/win32-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel echo $PWD/../../../artifacts/win64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel + echo $PWD/../../../artifacts/win-arm64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel echo $PWD/../../../artifacts/osx-x64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel echo $PWD/../../../artifacts/osx-arm64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel diff --git a/src/api/python/setup.py b/src/api/python/setup.py index c51bd8497..8f70b9c6f 100644 --- a/src/api/python/setup.py +++ b/src/api/python/setup.py @@ -316,6 +316,7 @@ class bdist_wheel(_bdist_wheel): # windows arm64 is not supported by pypi yet ("win", "x64"): "win_amd64", ("win", "x86"): "win32", + ("win", "arm64"): "win_arm64", ("osx", "x64"): f"macosx_{os_version_tag}_x86_64", ("osx", "arm64"): f"macosx_{os_version_tag}_arm64", ("darwin", "x86_64"): f"macosx_{os_version_tag}_x86_64",