https://github.com/python/cpython/commit/0dbaeb94a8b39972ebda7782b50bb49488951e3c
commit: 0dbaeb94a8b39972ebda7782b50bb49488951e3c
branch: main
author: Diego Russo <[email protected]>
committer: ambv <[email protected]>
date: 2025-04-03T22:32:29+02:00
summary:
Enable Windows on Arm GitHub runners (#131994)
files:
M .github/workflows/build.yml
M .github/workflows/jit.yml
M .github/workflows/reusable-windows-msi.yml
M .github/workflows/reusable-windows.yml
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 97ec5cbaa7475f..c8fc5cff28bdd2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -164,10 +164,12 @@ jobs:
- false
- true
include:
- - os: windows-latest # FIXME(diegorusso): change to os:
windows-aarch64
+ # Forks don't have access to Windows on Arm runners. These jobs are
skipped below:
+ - os: ${{ github.repository_owner == 'python' && 'windows-aarch64'
|| 'windows-latest' }}
arch: arm64
free-threading: false
- - os: windows-latest # FIXME(diegorusso): change to os:
windows-aarch64
+ # Forks don't have access to Windows on Arm runners. These jobs are
skipped below:
+ - os: ${{ github.repository_owner == 'python' && 'windows-aarch64'
|| 'windows-latest' }}
arch: arm64
free-threading: true
- os: windows-latest
@@ -187,12 +189,18 @@ jobs:
strategy:
fail-fast: false
matrix:
+ os:
+ - windows-latest
arch:
- x86
- x64
- - arm64
+ include:
+ # Forks don't have access to Windows on Arm runners. These jobs are
skipped below:
+ - os: ${{ github.repository_owner == 'python' && 'windows-aarch64'
|| 'windows-latest' }}
+ arch: arm64
uses: ./.github/workflows/reusable-windows-msi.yml
with:
+ os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
build-macos:
diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml
index d9e2ffc3fd4da6..4f5ba84d48ef3d 100644
--- a/.github/workflows/jit.yml
+++ b/.github/workflows/jit.yml
@@ -74,7 +74,8 @@ jobs:
runner: windows-latest
- target: aarch64-pc-windows-msvc/msvc
architecture: ARM64
- runner: windows-latest
+ # Forks don't have access to Windows on Arm runners. These jobs
are skipped below:
+ runner: ${{ github.repository_owner == 'python' &&
'windows-aarch64' || 'windows-latest' }}
- target: x86_64-apple-darwin/clang
architecture: x86_64
runner: macos-13
@@ -95,25 +96,19 @@ jobs:
with:
python-version: '3.11'
- - name: Native Windows
- if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
+ - name: Windows
+ # Forks don't have access to Windows on Arm runners. Skip those:
+ if: runner.os == 'Windows' && (matrix.architecture != 'ARM64' ||
github.repository_owner == 'python')
run: |
choco install llvm --allow-downgrade --no-progress --version ${{
matrix.llvm }}.1.0
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' ||
'' }} -p ${{ matrix.architecture }}
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{
matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
- # No tests (yet):
- - name: Emulated Windows
- if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
- run: |
- choco install llvm --allow-downgrade --no-progress --version ${{
matrix.llvm }}.1.0
- ./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' ||
'' }} -p ${{ matrix.architecture }}
-
# The `find` line is required as a result of
https://github.com/actions/runner-images/issues/9966.
# This is a bug in the macOS runner image where the pre-installed
Python is installed in the same
# directory as the Homebrew Python, which causes the build to fail for
macos-13. This line removes
# the symlink to the pre-installed Python so that the Homebrew Python
is used instead.
- - name: Native macOS
+ - name: macOS
if: runner.os == 'macOS'
run: |
brew update
@@ -124,7 +119,7 @@ jobs:
make all --jobs 4
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2
--verbose3
- - name: Native Linux
+ - name: Linux
if: runner.os == 'Linux'
run: |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh
${{ matrix.llvm }}
diff --git a/.github/workflows/reusable-windows-msi.yml
b/.github/workflows/reusable-windows-msi.yml
index bc0414d1bbcd8f..6213c903c5ab84 100644
--- a/.github/workflows/reusable-windows-msi.yml
+++ b/.github/workflows/reusable-windows-msi.yml
@@ -3,6 +3,10 @@ name: Reusable Windows MSI
on:
workflow_call:
inputs:
+ os:
+ description: OS to run on
+ required: true
+ type: string
arch:
description: CPU architecture
required: true
@@ -17,7 +21,7 @@ env:
jobs:
build:
name: installer for ${{ inputs.arch }}
- runs-on: windows-latest
+ runs-on: ${{ inputs.os }}
timeout-minutes: 60
env:
ARCH: ${{ inputs.arch }}
@@ -27,5 +31,7 @@ jobs:
with:
persist-credentials: false
- name: Build CPython installer
+ # Forks don't have access to Windows on Arm runners. Skip those:
+ if: inputs.arch != 'arm64' || github.repository_owner == 'python'
run: ./Tools/msi/build.bat --doc -"${ARCH}"
shell: bash
diff --git a/.github/workflows/reusable-windows.yml
b/.github/workflows/reusable-windows.yml
index 5485a0169130b0..deb1f41640e41f 100644
--- a/.github/workflows/reusable-windows.yml
+++ b/.github/workflows/reusable-windows.yml
@@ -24,7 +24,7 @@ env:
jobs:
build:
- name: ${{ inputs.arch == 'arm64' && 'build' || 'build and test' }} (${{
inputs.arch }})
+ name: Build and test (${{ inputs.arch }})
runs-on: ${{ inputs.os }}
timeout-minutes: 60
env:
@@ -37,17 +37,21 @@ jobs:
if: inputs.arch != 'Win32'
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Build CPython
+ # Forks don't have access to Windows on Arm runners. Skip those:
+ if: inputs.arch != 'arm64' || github.repository_owner == 'python'
run: >-
.\\PCbuild\\build.bat
-e -d -v
-p "${ARCH}"
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
shell: bash
- - name: Display build info # FIXME(diegorusso): remove the `if`
- if: inputs.arch != 'arm64'
+ - name: Display build info
+ # Forks don't have access to Windows on Arm runners. Skip those:
+ if: inputs.arch != 'arm64' || github.repository_owner == 'python'
run: .\\python.bat -m test.pythoninfo
- - name: Tests # FIXME(diegorusso): remove the `if`
- if: inputs.arch != 'arm64'
+ - name: Tests
+ # Forks don't have access to Windows on Arm runners. Skip those:
+ if: inputs.arch != 'arm64' || github.repository_owner == 'python'
run: >-
.\\PCbuild\\rt.bat
-p "${ARCH}"
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]