Skip to content

Commit 8c470c7

Browse files
committed
Add support for new build layout in Windows free-threaded builds
1 parent 7239870 commit 8c470c7

3 files changed

Lines changed: 29 additions & 17 deletions

File tree

windows-release/azure-pipelines.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ parameters:
4242
displayName: "Signature description"
4343
type: string
4444
default: '(default)'
45+
- name: Post315OutputDir
46+
displayName: "Separate free-threaded outputs (3.15.0b1 and later)"
47+
type: boolean
48+
default: false
4549
- name: DoTailCalling
4650
displayName: "Build with tail-calling support (3.15 and later)"
4751
type: boolean
@@ -196,6 +200,8 @@ stages:
196200
TailCallingOption: ''
197201
${{ else }}:
198202
TailCallingOption: '--tail-call-interp'
203+
ArchSuffix: iif(eq(parameters.Post315OutputDir, 'true'), 't', '')
204+
199205
- stage: Sign
200206
displayName: Sign binaries
201207
dependsOn: Build
@@ -269,6 +275,7 @@ stages:
269275
DoARM64: ${{ parameters.DoARM64}}
270276
DoFreethreaded: ${{ parameters.DoFreethreaded }}
271277
SigningCertificate: ${{ iif(eq(parameters.SigningCertificate, 'Unsigned'), '', parameters.SigningCertificate) }}
278+
ArchSuffix: iif(eq(parameters.Post315OutputDir, 'true'), 't', '')
272279
- ${{ if eq(parameters.DoMSIX, 'true') }}:
273280
- template: stage-pack-msix.yml
274281
parameters:

windows-release/stage-build.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ parameters:
77
ExtraOptions: ''
88
ExtraOptionsFreethreaded: '--disable-gil'
99
TailCallingOption: ''
10+
ArchSuffix: ''
1011

1112
jobs:
1213
- job: Build_Docs
@@ -108,7 +109,7 @@ jobs:
108109
${{ if eq(parameters.DoFreethreaded, 'true') }}:
109110
win32_t:
110111
Name: win32_t
111-
Arch: win32
112+
Arch: win32${{ parameters.ArchSuffix }}
112113
Platform: x86
113114
Configuration: Release
114115
_HostPython: .\python
@@ -119,7 +120,7 @@ jobs:
119120
Artifact: bin_win32_t
120121
win32_td:
121122
Name: win32_td
122-
Arch: win32
123+
Arch: win32${{ parameters.ArchSuffix }}
123124
Platform: x86
124125
Configuration: Debug
125126
_HostPython: .\python
@@ -128,7 +129,7 @@ jobs:
128129
${{ if ne(parameters.DoPGO, 'true') }}:
129130
amd64_t:
130131
Name: amd64_t
131-
Arch: amd64
132+
Arch: amd64${{ parameters.ArchSuffix }}
132133
Platform: x64
133134
Configuration: Release
134135
_HostPython: .\python
@@ -139,7 +140,7 @@ jobs:
139140
Artifact: bin_amd64_t
140141
amd64_td:
141142
Name: amd64_td
142-
Arch: amd64
143+
Arch: amd64${{ parameters.ArchSuffix }}
143144
Platform: x64
144145
Configuration: Debug
145146
_HostPython: .\python
@@ -148,7 +149,7 @@ jobs:
148149
${{ if or(ne(parameters.DoPGO, 'true'), ne(parameters.DoPGOARM64, 'true')) }}:
149150
arm64_t:
150151
Name: arm64_t
151-
Arch: arm64
152+
Arch: arm64${{ parameters.ArchSuffix }}
152153
Platform: ARM64
153154
Configuration: Release
154155
_HostPython: python
@@ -159,7 +160,7 @@ jobs:
159160
Artifact: bin_arm64_t
160161
arm64_td:
161162
Name: arm64_td
162-
Arch: arm64
163+
Arch: arm64${{ parameters.ArchSuffix }}
163164
Platform: ARM64
164165
Configuration: Debug
165166
_HostPython: python
@@ -194,7 +195,7 @@ jobs:
194195
${{ if eq(parameters.DoFreethreaded, 'true') }}:
195196
amd64_t:
196197
Name: amd64_t
197-
Arch: amd64
198+
Arch: amd64${{ parameters.ArchSuffix }}
198199
Platform: x64
199200
_HostPython: .\python
200201
PythonExePattern: python3*t.exe
@@ -220,14 +221,14 @@ jobs:
220221
clean: all
221222

222223
variables:
223-
Arch: arm64
224224
Platform: ARM64
225225
_HostPython: python
226226

227227
strategy:
228228
matrix:
229229
arm64:
230230
Name: arm64
231+
Arch: arm64
231232
PythonExePattern: python.exe
232233
ExtraOptions: ${{ parameters.ExtraOptions }}
233234
${{ if eq(parameters.ToBeSigned, 'true') }}:
@@ -237,7 +238,8 @@ jobs:
237238
${{ if eq(parameters.DoFreethreaded, 'true') }}:
238239
arm64_t:
239240
Name: arm64_t
240-
PythonExePattern: python3*t.exe
241+
Arch: arm64${{ parameters.ArchSuffix }}
242+
PythonExePattern314: python3*t.exe
241243
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
242244
${{ if eq(parameters.ToBeSigned, 'true') }}:
243245
Artifact: unsigned_arm64_t
@@ -263,13 +265,13 @@ jobs:
263265
clean: all
264266

265267
variables:
266-
Arch: arm64
267268
Platform: ARM64
268269

269270
strategy:
270271
matrix:
271272
arm64:
272273
Name: arm64
274+
Arch: arm64
273275
PythonExePattern: python.exe
274276
${{ if eq(parameters.ToBeSigned, 'true') }}:
275277
Artifact: unsigned_arm64
@@ -278,6 +280,7 @@ jobs:
278280
${{ if eq(parameters.DoFreethreaded, 'true') }}:
279281
arm64_t:
280282
Name: arm64_t
283+
Arch: arm64${{ parameters.ArchSuffix }}
281284
PythonExePattern: python3*t.exe
282285
${{ if eq(parameters.ToBeSigned, 'true') }}:
283286
Artifact: unsigned_arm64_t
@@ -297,14 +300,14 @@ jobs:
297300
clean: all
298301

299302
variables:
300-
Arch: arm64
301303
Platform: ARM64
302304
_HostPython: python
303305

304306
strategy:
305307
matrix:
306308
arm64:
307309
Name: arm64
310+
Arch: arm64
308311
PythonExePattern: python.exe
309312
ExtraOptions: ${{ parameters.ExtraOptions }}
310313
${{ if eq(parameters.ToBeSigned, 'true') }}:
@@ -314,6 +317,7 @@ jobs:
314317
${{ if eq(parameters.DoFreethreaded, 'true') }}:
315318
arm64_t:
316319
Name: arm64_t
320+
Arch: arm64${{ parameters.ArchSuffix }}
317321
PythonExePattern: python3*t.exe
318322
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
319323
${{ if eq(parameters.ToBeSigned, 'true') }}:

windows-release/stage-msi.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ parameters:
33
DoARM64: true
44
DoFreethreaded: false
55
SigningCertificate: ''
6+
ArchSuffix: ''
67

78
jobs:
89
- job: Make_MSI
@@ -52,18 +53,18 @@ jobs:
5253
# are not overwritten.
5354
- ${{ if eq(parameters.DoFreethreaded, 'true') }}:
5455
- artifact: bin_win32_t
55-
target: $(Build.BinariesDirectory)\win32
56+
target: $(Build.BinariesDirectory)\win32${{parameters.ArchSuffix}}
5657
- artifact: bin_win32_td
57-
target: $(Build.BinariesDirectory)\win32
58+
target: $(Build.BinariesDirectory)\win32${{parameters.ArchSuffix}}
5859
- artifact: bin_amd64_t
59-
target: $(Build.BinariesDirectory)\amd64
60+
target: $(Build.BinariesDirectory)\amd64${{parameters.ArchSuffix}}
6061
- artifact: bin_amd64_td
61-
target: $(Build.BinariesDirectory)\amd64
62+
target: $(Build.BinariesDirectory)\amd64${{parameters.ArchSuffix}}
6263
- ${{ if eq(parameters.DoARM64, 'true') }}:
6364
- artifact: bin_arm64_t
64-
target: $(Build.BinariesDirectory)\arm64
65+
target: $(Build.BinariesDirectory)\arm64${{parameters.ArchSuffix}}
6566
- artifact: bin_arm64_td
66-
target: $(Build.BinariesDirectory)\arm64
67+
target: $(Build.BinariesDirectory)\arm64${{parameters.ArchSuffix}}
6768
Bundles:
6869
- bundle: win32
6970
Platform: x86

0 commit comments

Comments
 (0)