mirror of
https://github.com/actions/python-versions.git
synced 2025-12-14 06:26:45 +00:00
Update build-python-packages.yml
This commit is contained in:
6
.github/workflows/build-python-packages.yml
vendored
6
.github/workflows/build-python-packages.yml
vendored
@@ -15,7 +15,7 @@ on:
|
|||||||
PLATFORMS:
|
PLATFORMS:
|
||||||
description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)'
|
description: 'Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)'
|
||||||
required: true
|
required: true
|
||||||
default: 'ubuntu-20.04,ubuntu-20.04_arm64,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-11_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86,setup-actions-windows-arm64-4-core'
|
default: 'ubuntu-20.04,ubuntu-20.04_arm64,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-11_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86,windows-2019_arm64'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'versions-manifest.json'
|
- 'versions-manifest.json'
|
||||||
@@ -39,12 +39,13 @@ jobs:
|
|||||||
- name: Generate execution matrix
|
- name: Generate execution matrix
|
||||||
id: generate-matrix
|
id: generate-matrix
|
||||||
run: |
|
run: |
|
||||||
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-20.04_arm64,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-11,macos-14_arm64,windows-2019_x64,windows-2019_x86' }}".Split(",").Trim()
|
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,ubuntu-20.04_arm64,ubuntu-22.04,ubuntu-22.04_arm64,ubuntu-24.04,ubuntu-24.04_arm64,macos-11,macos-14_arm64,windows-2019_x64,windows-2019_arm64' }}".Split(",").Trim()
|
||||||
$matrix = @()
|
$matrix = @()
|
||||||
foreach ($configuration in $configurations) {
|
foreach ($configuration in $configurations) {
|
||||||
$parts = $configuration.Split("_")
|
$parts = $configuration.Split("_")
|
||||||
$os = $parts[0]
|
$os = $parts[0]
|
||||||
$arch = if ($parts[1]) {$parts[1]} else {"x64"}
|
$arch = if ($parts[1]) {$parts[1]} else {"x64"}
|
||||||
|
$runner_name = if ($os -eq 'windows-2019' -and $arch -eq 'arm64') {'setup-actions-windows-arm64-4-core'} else {''}
|
||||||
switch -wildcard ($os) {
|
switch -wildcard ($os) {
|
||||||
"*ubuntu*" { $platform = $os.Replace("ubuntu","linux")}
|
"*ubuntu*" { $platform = $os.Replace("ubuntu","linux")}
|
||||||
"*macos*" { $platform = 'darwin' }
|
"*macos*" { $platform = 'darwin' }
|
||||||
@@ -54,6 +55,7 @@ jobs:
|
|||||||
'platform' = $platform
|
'platform' = $platform
|
||||||
'os' = $os
|
'os' = $os
|
||||||
'arch' = $arch
|
'arch' = $arch
|
||||||
|
'runner_name' = $runner_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT
|
echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user