5
5
inputs :
6
6
VERSION :
7
7
description : ' Python version to build and upload'
8
- default : ' 3.12.3 '
8
+ default : ' 3.13.0 '
9
9
required : true
10
10
PUBLISH_RELEASES :
11
11
description : ' Whether to publish releases'
12
12
required : true
13
13
type : boolean
14
14
default : false
15
+ THREADING_BUILD_MODES :
16
+ description : ' CPython threading build modes'
17
+ required : true
18
+ type : str
19
+ default : ' freethreaded'
15
20
PLATFORMS :
16
21
description : ' Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)'
17
22
required : true
18
- default : ' ubuntu-20.04,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-20.04,ubuntu-22.04,ubuntu-24.04,macos-13_x64,macos-14_arm64,windows-2019_x64,windows-2019_x86'
19
24
pull_request :
20
25
paths-ignore :
21
26
- ' versions-manifest.json'
@@ -40,32 +45,42 @@ jobs:
40
45
id : generate-matrix
41
46
run : |
42
47
[String[]]$configurations = "${{ inputs.platforms || 'ubuntu-20.04,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()
48
+ [String[]]$buildModes = "${{ inputs.threading_build_modes || 'default' }}".Split(",").Trim()
43
49
$matrix = @()
44
50
45
51
foreach ($configuration in $configurations) {
46
- $parts = $configuration.Split("_")
47
- $os = $parts[0]
48
- $arch = if ($parts[1]) {$parts[1]} else {"x64"}
49
- switch -wildcard ($os) {
50
- "*ubuntu*" { $platform = $os.Replace("ubuntu","linux")}
51
- "*macos*" { $platform = 'darwin' }
52
- "*windows*" { $platform = 'win32' }
53
- }
54
-
55
- if ($configuration -eq "ubuntu-22.04_arm64") {
56
- $os = "setup-actions-ubuntu-arm64-2-core"
57
- }
58
- elseif ($configuration -eq "ubuntu-24.04_arm64") {
59
- $os = "setup-actions-ubuntu24-arm64-2-core"
60
- }
61
- elseif ($configuration -eq "windows-2019_arm64") {
62
- $os = "setup-actions-windows-arm64-4-core"
63
- }
64
-
65
- $matrix += @{
66
- 'platform' = $platform
67
- 'os' = $os
68
- 'arch' = $arch
52
+ foreach ($buildMode in $buildModes) {
53
+ $parts = $configuration.Split("_")
54
+ $os = $parts[0]
55
+ $arch = if ($parts[1]) {$parts[1]} else {"x64"}
56
+ switch -wildcard ($os) {
57
+ "*ubuntu*" { $platform = $os.Replace("ubuntu","linux")}
58
+ "*macos*" { $platform = 'darwin' }
59
+ "*windows*" { $platform = 'win32' }
60
+ }
61
+
62
+ if ($configuration -eq "ubuntu-22.04_arm64") {
63
+ $os = "setup-actions-ubuntu-arm64-2-core"
64
+ }
65
+ elseif ($configuration -eq "ubuntu-24.04_arm64") {
66
+ $os = "setup-actions-ubuntu24-arm64-2-core"
67
+ }
68
+ elseif ($configuration -eq "windows-2019_arm64") {
69
+ $os = "setup-actions-windows-arm64-4-core"
70
+ }
71
+
72
+ if ($buildMode -eq "freethreaded") {
73
+ if ([semver]"${{ inputs.VERSION }}" -lt [semver]"3.13.0") {
74
+ continue;
75
+ }
76
+ $arch += "-freethreaded"
77
+ }
78
+
79
+ $matrix += @{
80
+ 'platform' = $platform
81
+ 'os' = $os
82
+ 'arch' = $arch
83
+ }
69
84
}
70
85
}
71
86
echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT
@@ -201,6 +216,9 @@ jobs:
201
216
python-version : ${{ env.VERSION }}
202
217
architecture : ${{ matrix.arch }}
203
218
219
+ - name : Python version
220
+ run : python -VVV
221
+
204
222
- name : Verbose sysconfig dump
205
223
if : runner.os == 'Linux' || runner.os == 'macOS'
206
224
run : python ./sources/python-config-output.py
0 commit comments