Skip to content

Commit 6efdea0

Browse files
authored
Add Windows release options for JIT builds (#241)
1 parent 7944a16 commit 6efdea0

File tree

2 files changed

+44
-18
lines changed

2 files changed

+44
-18
lines changed

windows-release/azure-pipelines.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ parameters:
4141
displayName: "Signature description"
4242
type: string
4343
default: '(default)'
44+
- name: DoJIT
45+
displayName: "Build the JIT compiler (3.14 and later)"
46+
type: boolean
47+
default: false
4448
- name: DoGPG
4549
displayName: "Include GPG signatures (3.13 and earlier)"
4650
type: boolean
@@ -99,6 +103,14 @@ parameters:
99103
displayName: "Enable Nuget signing (not recommended right now)"
100104
type: boolean
101105
default: false
106+
- name: DoJITEnabled
107+
displayName: "Enable the JIT compiler by default (not used yet)"
108+
type: boolean
109+
default: false
110+
- name: DoJITFreethreaded
111+
displayName: "Build the JIT compiler for free-threaded builds (not used yet)"
112+
type: boolean
113+
default: false
102114

103115
resources:
104116
pipelines:
@@ -141,6 +153,18 @@ stages:
141153
DoPGOARM64: ${{ parameters.DoPGOARM64 }}
142154
${{ if and(parameters.SigningCertificate, ne(parameters.SigningCertificate, 'Unsigned')) }}:
143155
ToBeSigned: true
156+
${{ if ne(parameters.DoJIT, 'true') }}:
157+
ExtraOptions: ''
158+
${{ elseif ne(parameters.DoJITEnabled, 'true') }}:
159+
ExtraOptions: '--experimental-jit-off'
160+
${{ else }}:
161+
ExtraOptions: '--experimental-jit'
162+
${{ if or(ne(parameters.DoJIT, 'true'), ne(parameters.DoJITFreethreaded, 'true')) }}:
163+
ExtraOptionsFreethreaded: '--disable-gil'
164+
${{ elseif ne(parameters.DoJITEnabled, 'true') }}:
165+
ExtraOptionsFreethreaded: '--disable-gil --experimental-jit-off'
166+
${{ else }}:
167+
ExtraOptionsFreethreaded: '--disable-gil --experimental-jit'
144168

145169
- stage: Sign
146170
displayName: Sign binaries

windows-release/stage-build.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ parameters:
44
DoPGOARM64: true
55
DoFreethreaded: false
66
ToBeSigned: false
7+
ExtraOptions: ''
8+
ExtraOptionsFreethreaded: '--disable-gil'
79

810
jobs:
911
- job: Build_Docs
@@ -52,7 +54,7 @@ jobs:
5254
Platform: x86
5355
Configuration: Release
5456
_HostPython: .\python
55-
ExtraOptions: ''
57+
ExtraOptions: ${{ parameters.ExtraOptions }}
5658
${{ if eq(parameters.ToBeSigned, 'true') }}:
5759
Artifact: unsigned_win32
5860
${{ else }}:
@@ -63,7 +65,7 @@ jobs:
6365
Platform: x86
6466
Configuration: Debug
6567
_HostPython: .\python
66-
ExtraOptions: ''
68+
ExtraOptions: ${{ parameters.ExtraOptions }}
6769
Artifact: bin_win32_d
6870
${{ if ne(parameters.DoPGO, 'true') }}:
6971
amd64:
@@ -72,7 +74,7 @@ jobs:
7274
Platform: x64
7375
Configuration: Release
7476
_HostPython: .\python
75-
ExtraOptions: ''
77+
ExtraOptions: ${{ parameters.ExtraOptions }}
7678
${{ if eq(parameters.ToBeSigned, 'true') }}:
7779
Artifact: unsigned_amd64
7880
${{ else }}:
@@ -83,7 +85,7 @@ jobs:
8385
Platform: x64
8486
Configuration: Debug
8587
_HostPython: .\python
86-
ExtraOptions: ''
88+
ExtraOptions: ${{ parameters.ExtraOptions }}
8789
Artifact: bin_amd64_d
8890
${{ if or(ne(parameters.DoPGO, 'true'), ne(parameters.DoPGOARM64, 'true')) }}:
8991
arm64:
@@ -92,7 +94,7 @@ jobs:
9294
Platform: ARM64
9395
Configuration: Release
9496
_HostPython: python
95-
ExtraOptions: ''
97+
ExtraOptions: ${{ parameters.ExtraOptions }}
9698
${{ if eq(parameters.ToBeSigned, 'true') }}:
9799
Artifact: unsigned_arm64
98100
${{ else }}:
@@ -103,7 +105,7 @@ jobs:
103105
Platform: ARM64
104106
Configuration: Debug
105107
_HostPython: python
106-
ExtraOptions: ''
108+
ExtraOptions: ${{ parameters.ExtraOptions }}
107109
Artifact: bin_arm64_d
108110
${{ if eq(parameters.DoFreethreaded, 'true') }}:
109111
win32_t:
@@ -112,7 +114,7 @@ jobs:
112114
Platform: x86
113115
Configuration: Release
114116
_HostPython: .\python
115-
ExtraOptions: --disable-gil
117+
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
116118
${{ if eq(parameters.ToBeSigned, 'true') }}:
117119
Artifact: unsigned_win32_t
118120
${{ else }}:
@@ -123,7 +125,7 @@ jobs:
123125
Platform: x86
124126
Configuration: Debug
125127
_HostPython: .\python
126-
ExtraOptions: --disable-gil
128+
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
127129
Artifact: bin_win32_td
128130
${{ if ne(parameters.DoPGO, 'true') }}:
129131
amd64_t:
@@ -132,7 +134,7 @@ jobs:
132134
Platform: x64
133135
Configuration: Release
134136
_HostPython: .\python
135-
ExtraOptions: --disable-gil
137+
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
136138
${{ if eq(parameters.ToBeSigned, 'true') }}:
137139
Artifact: unsigned_amd64_t
138140
${{ else }}:
@@ -143,7 +145,7 @@ jobs:
143145
Platform: x64
144146
Configuration: Debug
145147
_HostPython: .\python
146-
ExtraOptions: --disable-gil
148+
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
147149
Artifact: bin_amd64_td
148150
${{ if or(ne(parameters.DoPGO, 'true'), ne(parameters.DoPGOARM64, 'true')) }}:
149151
arm64_t:
@@ -152,7 +154,7 @@ jobs:
152154
Platform: ARM64
153155
Configuration: Release
154156
_HostPython: python
155-
ExtraOptions: --disable-gil
157+
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
156158
${{ if eq(parameters.ToBeSigned, 'true') }}:
157159
Artifact: unsigned_arm64_t
158160
${{ else }}:
@@ -163,7 +165,7 @@ jobs:
163165
Platform: ARM64
164166
Configuration: Debug
165167
_HostPython: python
166-
ExtraOptions: --disable-gil
168+
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
167169
Artifact: bin_arm64_td
168170

169171
steps:
@@ -188,7 +190,7 @@ jobs:
188190
Platform: x64
189191
_HostPython: .\python
190192
PythonExePattern: python.exe
191-
ExtraOptions: ''
193+
ExtraOptions: ${{ parameters.ExtraOptions }}
192194
${{ if eq(parameters.ToBeSigned, 'true') }}:
193195
Artifact: unsigned_amd64
194196
${{ else }}:
@@ -200,7 +202,7 @@ jobs:
200202
Platform: x64
201203
_HostPython: .\python
202204
PythonExePattern: python3*t.exe
203-
ExtraOptions: --disable-gil
205+
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
204206
${{ if eq(parameters.ToBeSigned, 'true') }}:
205207
Artifact: unsigned_amd64_t
206208
${{ else }}:
@@ -233,7 +235,7 @@ jobs:
233235
arm64:
234236
Name: arm64
235237
PythonExePattern: python.exe
236-
ExtraOptions: ''
238+
ExtraOptions: ${{ parameters.ExtraOptions }}
237239
${{ if eq(parameters.ToBeSigned, 'true') }}:
238240
Artifact: unsigned_arm64
239241
${{ else }}:
@@ -242,7 +244,7 @@ jobs:
242244
arm64_t:
243245
Name: arm64_t
244246
PythonExePattern: python3*t.exe
245-
ExtraOptions: --disable-gil
247+
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
246248
${{ if eq(parameters.ToBeSigned, 'true') }}:
247249
Artifact: unsigned_arm64_t
248250
${{ else }}:
@@ -313,7 +315,7 @@ jobs:
313315
arm64:
314316
Name: arm64
315317
PythonExePattern: python.exe
316-
ExtraOptions: ''
318+
ExtraOptions: ${{ parameters.ExtraOptions }}
317319
${{ if eq(parameters.ToBeSigned, 'true') }}:
318320
Artifact: unsigned_arm64
319321
${{ else }}:
@@ -322,7 +324,7 @@ jobs:
322324
arm64_t:
323325
Name: arm64_t
324326
PythonExePattern: python3*t.exe
325-
ExtraOptions: --disable-gil
327+
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
326328
${{ if eq(parameters.ToBeSigned, 'true') }}:
327329
Artifact: unsigned_arm64_t
328330
${{ else }}:

0 commit comments

Comments
 (0)