55 inputs :
66 VERSION :
77 description : ' Python version to build and upload'
8- default : ' 3.12.3 '
8+ default : ' 3.13.0 '
99 required : true
1010 PUBLISH_RELEASES :
1111 description : ' Whether to publish releases'
1212 required : true
1313 type : boolean
1414 default : false
15+ THREADING_BUILD_MODES :
16+ description : ' CPython threading build modes'
17+ required : true
18+ type : str
19+ default : ' freethreaded'
1520 PLATFORMS :
1621 description : ' Platforms for execution in "os" or "os_arch" format (arch is "x64" by default)'
1722 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'
1924 pull_request :
2025 paths-ignore :
2126 - ' versions-manifest.json'
@@ -40,32 +45,42 @@ jobs:
4045 id : generate-matrix
4146 run : |
4247 [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()
4349 $matrix = @()
4450
4551 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+ }
6984 }
7085 }
7186 echo "matrix=$($matrix | ConvertTo-Json -Compress -AsArray)" >> $env:GITHUB_OUTPUT
@@ -201,6 +216,9 @@ jobs:
201216 python-version : ${{ env.VERSION }}
202217 architecture : ${{ matrix.arch }}
203218
219+ - name : Python version
220+ run : python -VVV
221+
204222 - name : Verbose sysconfig dump
205223 if : runner.os == 'Linux' || runner.os == 'macOS'
206224 run : python ./sources/python-config-output.py
0 commit comments