Skip to content

Commit 2eea8c8

Browse files
authored
chore: use windows-11-arm runner instead of custom one (#338)
This allows contributors to test on GitHub hosted Windows ARM64 runners easily now that those runners are available for free for public repositories
1 parent 56544d4 commit 2eea8c8

File tree

1 file changed

+3
-54
lines changed

1 file changed

+3
-54
lines changed

.github/workflows/build-python-packages.yml

Lines changed: 3 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
PLATFORMS:
2121
description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)'
2222
required: true
23-
default: 'ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-13_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64'
23+
default: 'ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-13_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-11_arm64'
2424
pull_request:
2525
paths-ignore:
2626
- 'versions-manifest.json'
@@ -44,7 +44,7 @@ jobs:
4444
- name: Generate execution matrix
4545
id: generate-matrix
4646
run: |
47-
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-13,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64' }}".Split(",").Trim()
47+
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-13,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-11_arm64' }}".Split(",").Trim()
4848
[String[]]$buildModes = "${{ inputs.threading_build_modes || 'default' }}".Split(",").Trim()
4949
$matrix = @()
5050
@@ -56,11 +56,7 @@ jobs:
5656
switch -wildcard ($os) {
5757
"*ubuntu*" { $platform = $os.Replace("ubuntu","linux"); if ($arch -eq "arm64" ) { $os = "${os}-arm" } }
5858
"*macos*" { $platform = 'darwin' }
59-
"*windows*" { $platform = 'win32' }
60-
}
61-
62-
if ($configuration -eq "windows-2019_arm64") {
63-
$os = "setup-actions-windows-arm64-4-core"
59+
"*windows*" { $platform = 'win32'; if ($arch -eq "arm64" ) { $os = "${os}-arm" } }
6460
}
6561
6662
if ($buildMode -eq "freethreaded") {
@@ -89,30 +85,6 @@ jobs:
8985
env:
9086
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
9187
steps:
92-
- name: Setup Environment on Windows ARM64 Runner
93-
if: matrix.os == 'setup-actions-windows-arm64-4-core'
94-
shell: powershell
95-
run: |
96-
# Install Chocolatey
97-
Set-ExecutionPolicy Bypass -Scope Process -Force
98-
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
99-
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
100-
echo "C:\ProgramData\Chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
101-
102-
# Install PowerShell
103-
choco install powershell-core -y
104-
echo "C:\Program Files\PowerShell\7" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
105-
106-
# Install Git
107-
choco install git -y
108-
echo "C:\Program Files\Git\cmd" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
109-
110-
111-
# Install 7-Zip
112-
choco install 7zip -y
113-
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
114-
115-
11688
- name: Check out repository code
11789
uses: actions/checkout@v4
11890
with:
@@ -144,29 +116,6 @@ jobs:
144116
env:
145117
ARTIFACT_NAME: python-${{ inputs.VERSION || '3.12.3' }}-${{ matrix.platform }}-${{ matrix.arch }}
146118
steps:
147-
- name: Setup Environment on Windows ARM64 Runner
148-
if: matrix.os == 'setup-actions-windows-arm64-4-core'
149-
shell: powershell
150-
run: |
151-
# Install Chocolatey
152-
Set-ExecutionPolicy Bypass -Scope Process -Force
153-
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
154-
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
155-
echo "C:\ProgramData\Chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
156-
157-
# Install PowerShell
158-
choco install powershell-core -y
159-
echo "C:\Program Files\PowerShell\7" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
160-
161-
# Install Git
162-
choco install git -y
163-
echo "C:\Program Files\Git\cmd" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
164-
165-
166-
# Install 7-Zip
167-
choco install 7zip -y
168-
echo "C:\ProgramData\chocolatey\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
169-
170119
- name: Check out repository code
171120
uses: actions/checkout@v4
172121
with:

0 commit comments

Comments
 (0)