diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f330d0e6cb41a..2293a6081de0a 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -99,6 +99,7 @@ jobs: # Note: M1 images on Github Actions start from macOS 14 - [macos-14, macosx_arm64] - [windows-2022, win_amd64] + - [windows-11-arm, win_arm64] # TODO: support PyPy? python: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"], ["cp313t", "3.13"]] include: @@ -112,6 +113,12 @@ jobs: - buildplat: [ubuntu-22.04, pyodide_wasm32] python: ["cp312", "3.12"] cibw_build_frontend: 'build' + exclude: + - buildplat: [windows-11-arm, win_arm64] + python: ["cp310", "3.10"] + # BackendUnavailable: Cannot import 'mesonpy' + - buildplat: [windows-11-arm, win_arm64] + python: ["cp313t", "3.13"] env: IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }} @@ -122,6 +129,12 @@ jobs: with: fetch-depth: 0 + - name: Set up MSVC environment for ARM64 + if: matrix.buildplat[1] == 'win_arm64' + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: arm64 + # TODO: Build wheels from sdist again # There's some sort of weird race condition? # within Github that makes the sdist be missing files @@ -159,9 +172,13 @@ jobs: env: CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} CIBW_BUILD_FRONTEND: ${{ matrix.cibw_build_frontend || 'pip' }} - CIBW_PLATFORM: ${{ matrix.buildplat[1] == 'pyodide_wasm32' && 'pyodide' || 'auto' }} + CIBW_PLATFORM: ${{ (matrix.buildplat[1] == 'pyodide_wasm32' && 'pyodide') || (matrix.buildplat[1] == 'win_arm64' && 'windows') || 'auto' }} + CIBW_ARCHS: ${{ matrix.buildplat[1] == 'win_arm64' && 'ARM64' || 'auto' }} + CIBW_BEFORE_BUILD_WINDOWS: 'python -m pip install delvewheel' - - name: Set up Python + - name: Set up Python for validation/upload (non-ARM64 Windows & other OS) + # micromamba is not available for ARM64 Windows + if: matrix.buildplat[1] != 'win_arm64' uses: mamba-org/setup-micromamba@v2 with: environment-name: wheel-env @@ -174,6 +191,12 @@ jobs: cache-downloads: true cache-environment: true + - name: Install wheel for win_arm64 + # installing wheel here because micromamba step was skipped + if: matrix.buildplat[1] == 'win_arm64' + shell: bash -el {0} + run: python -m pip install wheel + - name: Validate wheel RECORD shell: bash -el {0} run: for whl in $(ls wheelhouse); do wheel unpack wheelhouse/$whl -d /tmp; done