File tree Expand file tree Collapse file tree 4 files changed +31
-18
lines changed
Expand file tree Collapse file tree 4 files changed +31
-18
lines changed Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change 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
@@ -96,19 +97,13 @@ jobs:
9697 python-version : ' 3.11'
9798
9899 - name : Native Windows
99- if : runner.os == 'Windows' && matrix.architecture != 'ARM64'
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
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ name: Reusable Windows MSI
33on :
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
1721jobs :
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 }}
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
Original file line number Diff line number Diff line change 2424
2525jobs :
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}"
You can’t perform that action at this time.
0 commit comments