Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0dbaeb9

Browse filesBrowse files
authored
Enable Windows on Arm GitHub runners (#131994)
1 parent b6c92ec commit 0dbaeb9
Copy full SHA for 0dbaeb9

File tree

4 files changed

+34
-21
lines changed
Filter options

4 files changed

+34
-21
lines changed

‎.github/workflows/build.yml

Copy file name to clipboardExpand all lines: .github/workflows/build.yml
+11-3Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,12 @@ jobs:
164164
- false
165165
- true
166166
include:
167-
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
167+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
168+
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
168169
arch: arm64
169170
free-threading: false
170-
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
171+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
172+
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
171173
arch: arm64
172174
free-threading: true
173175
- os: windows-latest
@@ -187,12 +189,18 @@ jobs:
187189
strategy:
188190
fail-fast: false
189191
matrix:
192+
os:
193+
- windows-latest
190194
arch:
191195
- x86
192196
- x64
193-
- arm64
197+
include:
198+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
199+
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
200+
arch: arm64
194201
uses: ./.github/workflows/reusable-windows-msi.yml
195202
with:
203+
os: ${{ matrix.os }}
196204
arch: ${{ matrix.arch }}
197205

198206
build-macos:

‎.github/workflows/jit.yml

Copy file name to clipboardExpand all lines: .github/workflows/jit.yml
+7-12Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ jobs:
7474
runner: windows-latest
7575
- target: aarch64-pc-windows-msvc/msvc
7676
architecture: ARM64
77-
runner: windows-latest
77+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
78+
runner: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
7879
- target: x86_64-apple-darwin/clang
7980
architecture: x86_64
8081
runner: macos-13
@@ -95,25 +96,19 @@ jobs:
9596
with:
9697
python-version: '3.11'
9798

98-
- name: Native Windows
99-
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
99+
- name: Windows
100+
# Forks don't have access to Windows on Arm runners. Skip those:
101+
if: runner.os == 'Windows' && (matrix.architecture != 'ARM64' || github.repository_owner == 'python')
100102
run: |
101103
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
102104
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
103105
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
104106
105-
# No tests (yet):
106-
- name: Emulated Windows
107-
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
108-
run: |
109-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
110-
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
111-
112107
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
113108
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
114109
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
115110
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
116-
- name: Native macOS
111+
- name: macOS
117112
if: runner.os == 'macOS'
118113
run: |
119114
brew update
@@ -124,7 +119,7 @@ jobs:
124119
make all --jobs 4
125120
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
126121
127-
- name: Native Linux
122+
- name: Linux
128123
if: runner.os == 'Linux'
129124
run: |
130125
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}

‎.github/workflows/reusable-windows-msi.yml

Copy file name to clipboardExpand all lines: .github/workflows/reusable-windows-msi.yml
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Reusable Windows MSI
33
on:
44
workflow_call:
55
inputs:
6+
os:
7+
description: OS to run on
8+
required: true
9+
type: string
610
arch:
711
description: CPU architecture
812
required: true
@@ -17,7 +21,7 @@ env:
1721
jobs:
1822
build:
1923
name: installer for ${{ inputs.arch }}
20-
runs-on: windows-latest
24+
runs-on: ${{ inputs.os }}
2125
timeout-minutes: 60
2226
env:
2327
ARCH: ${{ inputs.arch }}
@@ -27,5 +31,7 @@ jobs:
2731
with:
2832
persist-credentials: false
2933
- name: Build CPython installer
34+
# Forks don't have access to Windows on Arm runners. Skip those:
35+
if: inputs.arch != 'arm64' || github.repository_owner == 'python'
3036
run: ./Tools/msi/build.bat --doc -"${ARCH}"
3137
shell: bash

‎.github/workflows/reusable-windows.yml

Copy file name to clipboardExpand all lines: .github/workflows/reusable-windows.yml
+9-5Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
2525
jobs:
2626
build:
27-
name: ${{ inputs.arch == 'arm64' && 'build' || 'build and test' }} (${{ inputs.arch }})
27+
name: Build and test (${{ inputs.arch }})
2828
runs-on: ${{ inputs.os }}
2929
timeout-minutes: 60
3030
env:
@@ -37,17 +37,21 @@ jobs:
3737
if: inputs.arch != 'Win32'
3838
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
3939
- name: Build CPython
40+
# Forks don't have access to Windows on Arm runners. Skip those:
41+
if: inputs.arch != 'arm64' || github.repository_owner == 'python'
4042
run: >-
4143
.\\PCbuild\\build.bat
4244
-e -d -v
4345
-p "${ARCH}"
4446
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
4547
shell: bash
46-
- name: Display build info # FIXME(diegorusso): remove the `if`
47-
if: inputs.arch != 'arm64'
48+
- name: Display build info
49+
# Forks don't have access to Windows on Arm runners. Skip those:
50+
if: inputs.arch != 'arm64' || github.repository_owner == 'python'
4851
run: .\\python.bat -m test.pythoninfo
49-
- name: Tests # FIXME(diegorusso): remove the `if`
50-
if: inputs.arch != 'arm64'
52+
- name: Tests
53+
# Forks don't have access to Windows on Arm runners. Skip those:
54+
if: inputs.arch != 'arm64' || github.repository_owner == 'python'
5155
run: >-
5256
.\\PCbuild\\rt.bat
5357
-p "${ARCH}"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.