diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3bb6baf8f85..fdc56dd2f10a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -353,6 +353,11 @@ jobs: - {VERSION: "3.8", NOXSESSION: "tests-nocoverage"} - {VERSION: "3.14", NOXSESSION: "tests"} - {VERSION: "3.14t", NOXSESSION: "tests"} + include: + # Not in the main matrix because we want tests-nocoverage on Python + # 3.14 + - PYTHON: {VERSION: "3.14", NOXSESSION: "tests-nocoverage"} + WINDOWS: {ARCH: 'arm64', WINDOWS: 'arm64', RUNNER: 'windows-11-arm'} timeout-minutes: 15 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -368,12 +373,36 @@ jobs: cache: pip cache-dependency-path: ci-constraints-requirements.txt timeout-minutes: 3 + if: matrix.WINDOWS.ARCH != 'arm64' + - name: Setup Python ${{ matrix.PYTHON.VERSION }}-${{ matrix.WINDOWS.ARCH }} via PyManager + if: matrix.WINDOWS.ARCH == 'arm64' + shell: pwsh + run: | + winget install Python.PythonInstallManager --source winget --accept-package-agreements --accept-source-agreements + if ($LASTEXITCODE -ne 0) { throw "Failed to install PyManager" } + + $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") + $pyVersion = "${{ matrix.PYTHON.VERSION }}-${{ matrix.WINDOWS.ARCH }}" + pymanager install $pyVersion + if ($LASTEXITCODE -ne 0) { throw "Failed to install Python $pyVersion" } + + $pythonExe = pymanager exec -V:$pyVersion -c "import sys; print(sys.executable)" + if ($LASTEXITCODE -ne 0) { throw "Failed to resolve Python path" } + $pythonExe = $pythonExe.Trim() + $pythonDir = Split-Path $pythonExe + $scriptsDir = Join-Path $pythonDir "Scripts" + + echo "Python executable: $pythonExe" + echo "Python directory: $pythonDir" + echo "$pythonDir" >> $env:GITHUB_PATH + echo "$scriptsDir" >> $env:GITHUB_PATH + echo "UV_PYTHON=$pythonExe" >> $env:GITHUB_ENV - run: rustup component add llvm-tools-preview - name: Cache rust and pip uses: ./.github/actions/cache timeout-minutes: 2 with: - key: ${{ matrix.PYTHON.NOXSESSION }}-${{ matrix.WINDOWS.ARCH }}-${{ steps.setup-python.outputs.python-version }} + key: ${{ matrix.PYTHON.NOXSESSION }}-${{ matrix.WINDOWS.ARCH }}-${{ steps.setup-python.outputs.python-version || matrix.PYTHON.VERSION }} - run: python -m pip install -c ci-constraints-requirements.txt "nox[uv]" "tomli; python_version < '3.11'" - uses: dawidd6/action-download-artifact@5c98f0b039f36ef966fdb7dfa9779262785ecb05 # v14 diff --git a/.github/workflows/wheel-builder.yml b/.github/workflows/wheel-builder.yml index 49a6388a12b3..cd6f4f3a7cd0 100644 --- a/.github/workflows/wheel-builder.yml +++ b/.github/workflows/wheel-builder.yml @@ -315,6 +315,7 @@ jobs: WINDOWS: - {ARCH: 'x86', WINDOWS: 'win32', RUST_TRIPLE: 'i686-pc-windows-msvc', RUNNER: 'windows-latest'} - {ARCH: 'x64', WINDOWS: 'win64', RUST_TRIPLE: 'x86_64-pc-windows-msvc', RUNNER: 'windows-latest'} + - {ARCH: 'arm64', WINDOWS: 'arm64', RUST_TRIPLE: 'aarch64-pc-windows-msvc', RUNNER: 'windows-11-arm'} PYTHON: - {VERSION: "3.14", "ABI_VERSION": "py38"} - {VERSION: "3.14", "ABI_VERSION": "py311"} @@ -324,6 +325,12 @@ jobs: # We need to exclude the below configuration because there is no 32-bit pypy3 - WINDOWS: {ARCH: 'x86', WINDOWS: 'win32', RUST_TRIPLE: 'i686-pc-windows-msvc'} PYTHON: {VERSION: "pypy-3.11"} + # We need to exclude the below configuration because there is no ARM64 pypy3 + - WINDOWS: {ARCH: 'arm64', WINDOWS: 'arm64', RUST_TRIPLE: 'aarch64-pc-windows-msvc', RUNNER: 'windows-11-arm'} + PYTHON: {VERSION: "pypy-3.11"} + # We need to exclude the below configuration because there is no ARM64 py38 + - WINDOWS: {ARCH: 'arm64', WINDOWS: 'arm64', RUST_TRIPLE: 'aarch64-pc-windows-msvc', RUNNER: 'windows-11-arm'} + PYTHON: {VERSION: "3.14", "ABI_VERSION": "py38"} name: "${{ matrix.PYTHON.VERSION }} ${{ matrix.WINDOWS.WINDOWS }} ${{ matrix.PYTHON.ABI_VERSION }}" steps: - name: Get build-requirements.txt from repository @@ -348,6 +355,30 @@ jobs: python-version: ${{ matrix.PYTHON.VERSION }} architecture: ${{ matrix.WINDOWS.ARCH }} timeout-minutes: 3 + if: matrix.WINDOWS.ARCH != 'arm64' + - name: Setup Python ${{ matrix.PYTHON.VERSION }}-${{ matrix.WINDOWS.ARCH }} via PyManager + if: matrix.WINDOWS.ARCH == 'arm64' + shell: pwsh + run: | + winget install Python.PythonInstallManager --source winget --accept-package-agreements --accept-source-agreements + if ($LASTEXITCODE -ne 0) { throw "Failed to install PyManager" } + + $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") + $pyVersion = "${{ matrix.PYTHON.VERSION }}-${{ matrix.WINDOWS.ARCH }}" + pymanager install $pyVersion + if ($LASTEXITCODE -ne 0) { throw "Failed to install Python $pyVersion" } + + $pythonExe = pymanager exec -V:$pyVersion -c "import sys; print(sys.executable)" + if ($LASTEXITCODE -ne 0) { throw "Failed to resolve Python path" } + $pythonExe = $pythonExe.Trim() + $pythonDir = Split-Path $pythonExe + $scriptsDir = Join-Path $pythonDir "Scripts" + + echo "Python executable: $pythonExe" + echo "Python directory: $pythonDir" + echo "$pythonDir" >> $env:GITHUB_PATH + echo "$scriptsDir" >> $env:GITHUB_PATH + echo "UV_PYTHON=$pythonExe" >> $env:GITHUB_ENV - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with: toolchain: stable @@ -368,7 +399,7 @@ jobs: echo "OPENSSL_STATIC=1" >> $GITHUB_ENV shell: bash - - run: pip install -r "${UV_REQUIREMENTS_PATH}" + - run: python -m pip install -r "${UV_REQUIREMENTS_PATH}" shell: bash - run: mkdir wheelhouse - run: | diff --git a/docs/installation.rst b/docs/installation.rst index ffc26db39590..51a19c1dba8f 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -32,6 +32,7 @@ operating systems. * x86-64 Debian Bookworm (12.x), Trixie (13.x), and Sid (unstable) * x86-64 and ARM64 Alpine (latest) * 32-bit and 64-bit Python on 64-bit Windows Server 2022 +* ARM64 Windows 11 We test compiling with ``clang`` as well as ``gcc`` and use the following OpenSSL releases in addition to distribution provided releases from the