Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions windows-release/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ parameters:
displayName: "Signature description"
type: string
default: '(default)'
- name: Post315OutputDir
displayName: "Separate free-threaded outputs (3.15 and later)"
type: boolean
default: false
- name: DoTailCalling
displayName: "Build with tail-calling support (3.15 and later)"
type: boolean
Expand Down Expand Up @@ -196,6 +200,8 @@ stages:
TailCallingOption: ''
${{ else }}:
TailCallingOption: '--tail-call-interp'
Post315OutputDir: ${{ parameters.Post315OutputDir }}

- stage: Sign
displayName: Sign binaries
dependsOn: Build
Expand Down Expand Up @@ -269,6 +275,7 @@ stages:
DoARM64: ${{ parameters.DoARM64}}
DoFreethreaded: ${{ parameters.DoFreethreaded }}
SigningCertificate: ${{ iif(eq(parameters.SigningCertificate, 'Unsigned'), '', parameters.SigningCertificate) }}
Post315OutputDir: ${{ parameters.Post315OutputDir }}
- ${{ if eq(parameters.DoMSIX, 'true') }}:
- template: stage-pack-msix.yml
parameters:
Expand Down
18 changes: 9 additions & 9 deletions windows-release/build-steps-pgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ steps:
- ${{ if ne(parameters.PGRun, 'true') }}:
# Not running in this job, so we publish our entire build and object files

- publish: '$(Build.BinariesDirectory)\bin\$(Arch)\instrumented'
- publish: '$(Build.BinariesDirectory)\bin\$(ArchDir)\instrumented'
artifact: instrumented_bin_$(Name)
displayName: 'Publish binaries for profiling'

Expand All @@ -54,10 +54,10 @@ steps:
inputs:
buildType: current
artifact: instrumented_bin_$(Name)
targetPath: '$(Build.BinariesDirectory)\bin\$(Arch)\instrumented'
targetPath: '$(Build.BinariesDirectory)\bin\$(ArchDir)\instrumented'

- powershell: |
$exe = (gci "$(Build.BinariesDirectory)\bin\$(Arch)\instrumented\$(PythonExePattern)" | select -First 1)
$exe = (gci "$(Build.BinariesDirectory)\bin\$(ArchDir)\instrumented\$(PythonExePattern)" | select -First 1)
& $exe -m test --pgo
ignoreLASTEXITCODE: true
displayName: 'Collect profile'
Expand All @@ -67,7 +67,7 @@ steps:

- ${{ if ne(parameters.PGUpdate, 'true') }}:
# Not finishing in this job, so publish the binaries
- publish: '$(Build.BinariesDirectory)\bin\$(Arch)\instrumented'
- publish: '$(Build.BinariesDirectory)\bin\$(ArchDir)\instrumented'
artifact: profile_bin_$(Name)
displayName: 'Publish collected data and binaries'

Expand All @@ -80,7 +80,7 @@ steps:
inputs:
buildType: current
artifact: profile_bin_$(Name)
targetPath: '$(Build.BinariesDirectory)\bin\$(Arch)\instrumented'
targetPath: '$(Build.BinariesDirectory)\bin\$(ArchDir)\instrumented'

- task: DownloadPipelineArtifact@2
displayName: 'Download artifact: instrumented_obj_$(Name)'
Expand Down Expand Up @@ -125,20 +125,20 @@ steps:
}
displayName: 'Generate catalog'
env:
CAT: $(Build.BinariesDirectory)\bin\$(Arch)\python
CAT: $(Build.BinariesDirectory)\bin\$(ArchDir)\python
PYTHON_HEXVERSION: $(VersionHex)

- powershell: |
del instrumented -r -EA 0
del *.pgc, *.pgd, *.exp
displayName: 'Cleanup build'
workingDirectory: '$(Build.BinariesDirectory)\bin\$(Arch)'
workingDirectory: '$(Build.BinariesDirectory)\bin\$(ArchDir)'

- powershell: |
copy "$(Build.SourcesDirectory)\Lib\venv\scripts\common\Activate.ps1" .
displayName: 'Copy Powershell scripts from source'
workingDirectory: '$(Build.BinariesDirectory)\bin\$(Arch)'
workingDirectory: '$(Build.BinariesDirectory)\bin\$(ArchDir)'

- publish: '$(Build.BinariesDirectory)\bin\$(Arch)'
- publish: '$(Build.BinariesDirectory)\bin\$(ArchDir)'
artifact: $(Artifact)
displayName: 'Publish binaries'
8 changes: 4 additions & 4 deletions windows-release/build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ steps:
}
displayName: 'Generate catalog'
env:
CAT: $(Build.BinariesDirectory)\bin\$(Arch)\python
CAT: $(Build.BinariesDirectory)\bin\$(ArchDir)\python
PYTHON_HEXVERSION: $(VersionHex)

- powershell: |
del *.pgc, *.pgd, *.exp
displayName: 'Cleanup binaries'
workingDirectory: '$(Build.BinariesDirectory)\bin\$(Arch)'
workingDirectory: '$(Build.BinariesDirectory)\bin\$(ArchDir)'

- powershell: |
copy "$(Build.SourcesDirectory)\Lib\venv\scripts\common\Activate.ps1" .
displayName: 'Copy Powershell scripts from source'
workingDirectory: '$(Build.BinariesDirectory)\bin\$(Arch)'
workingDirectory: '$(Build.BinariesDirectory)\bin\$(ArchDir)'

- publish: '$(Build.BinariesDirectory)\bin\$(Arch)'
- publish: '$(Build.BinariesDirectory)\bin\$(ArchDir)'
artifact: $(Artifact)
displayName: 'Publish binaries'
38 changes: 31 additions & 7 deletions windows-release/stage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parameters:
ExtraOptions: ''
ExtraOptionsFreethreaded: '--disable-gil'
TailCallingOption: ''
Post315OutputDir: false

jobs:
- job: Build_Docs
Expand Down Expand Up @@ -49,6 +50,7 @@ jobs:
win32:
Name: win32
Arch: win32
ArchDir: win32
Platform: x86
Configuration: Release
_HostPython: .\python
Expand All @@ -60,6 +62,7 @@ jobs:
win32_d:
Name: win32_d
Arch: win32
ArchDir: win32
Platform: x86
Configuration: Debug
_HostPython: .\python
Expand All @@ -69,6 +72,7 @@ jobs:
amd64:
Name: amd64
Arch: amd64
ArchDir: amd64
Platform: x64
Configuration: Release
_HostPython: .\python
Expand All @@ -80,6 +84,7 @@ jobs:
amd64_d:
Name: amd64_d
Arch: amd64
ArchDir: amd64
Platform: x64
Configuration: Debug
_HostPython: .\python
Expand All @@ -89,6 +94,7 @@ jobs:
arm64:
Name: arm64
Arch: arm64
ArchDir: arm64
Platform: ARM64
Configuration: Release
_HostPython: python
Expand All @@ -100,6 +106,7 @@ jobs:
arm64_d:
Name: arm64_d
Arch: arm64
ArchDir: arm64
Platform: ARM64
Configuration: Debug
_HostPython: python
Expand All @@ -109,6 +116,7 @@ jobs:
win32_t:
Name: win32_t
Arch: win32
ArchDir: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'win32t', 'win32') }}
Platform: x86
Configuration: Release
_HostPython: .\python
Expand All @@ -120,6 +128,7 @@ jobs:
win32_td:
Name: win32_td
Arch: win32
ArchDir: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'win32t', 'win32') }}
Platform: x86
Configuration: Debug
_HostPython: .\python
Expand All @@ -129,6 +138,7 @@ jobs:
amd64_t:
Name: amd64_t
Arch: amd64
ArchDir: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'amd64t', 'amd64') }}
Platform: x64
Configuration: Release
_HostPython: .\python
Expand All @@ -140,6 +150,7 @@ jobs:
amd64_td:
Name: amd64_td
Arch: amd64
ArchDir: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'amd64t', 'amd64') }}
Platform: x64
Configuration: Debug
_HostPython: .\python
Expand All @@ -149,6 +160,7 @@ jobs:
arm64_t:
Name: arm64_t
Arch: arm64
ArchDir: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'arm64t', 'arm64') }}
Platform: ARM64
Configuration: Release
_HostPython: python
Expand All @@ -160,6 +172,7 @@ jobs:
arm64_td:
Name: arm64_td
Arch: arm64
ArchDir: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'arm64t', 'arm64') }}
Platform: ARM64
Configuration: Debug
_HostPython: python
Expand All @@ -183,6 +196,7 @@ jobs:
amd64:
Name: amd64
Arch: amd64
ArchDir: amd64
Platform: x64
_HostPython: .\python
PythonExePattern: python.exe
Expand All @@ -195,9 +209,10 @@ jobs:
amd64_t:
Name: amd64_t
Arch: amd64
ArchDir: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'amd64t', 'amd64') }}
Platform: x64
_HostPython: .\python
PythonExePattern: python3*t.exe
PythonExePattern: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'python.exe', 'python3*t.exe') }}
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }} ${{ parameters.TailCallingOption }}
${{ if eq(parameters.ToBeSigned, 'true') }}:
Artifact: unsigned_amd64_t
Expand All @@ -220,14 +235,15 @@ jobs:
clean: all

variables:
Arch: arm64
Platform: ARM64
_HostPython: python

strategy:
matrix:
arm64:
Name: arm64
Arch: arm64
ArchDir: arm64
PythonExePattern: python.exe
ExtraOptions: ${{ parameters.ExtraOptions }}
${{ if eq(parameters.ToBeSigned, 'true') }}:
Expand All @@ -237,7 +253,9 @@ jobs:
${{ if eq(parameters.DoFreethreaded, 'true') }}:
arm64_t:
Name: arm64_t
PythonExePattern: python3*t.exe
Arch: arm64
ArchDir: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'arm64t', 'arm64') }}
PythonExePattern: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'python.exe', 'python3*t.exe') }}
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
${{ if eq(parameters.ToBeSigned, 'true') }}:
Artifact: unsigned_arm64_t
Expand All @@ -263,13 +281,14 @@ jobs:
clean: all

variables:
Arch: arm64
Platform: ARM64

strategy:
matrix:
arm64:
Name: arm64
Arch: arm64
ArchDir: arm64
PythonExePattern: python.exe
${{ if eq(parameters.ToBeSigned, 'true') }}:
Artifact: unsigned_arm64
Expand All @@ -278,7 +297,9 @@ jobs:
${{ if eq(parameters.DoFreethreaded, 'true') }}:
arm64_t:
Name: arm64_t
PythonExePattern: python3*t.exe
Arch: arm64
ArchDir: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'arm64t', 'arm64') }}
PythonExePattern: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'python.exe', 'python3*t.exe') }}
${{ if eq(parameters.ToBeSigned, 'true') }}:
Artifact: unsigned_arm64_t
${{ else }}:
Expand All @@ -297,14 +318,15 @@ jobs:
clean: all

variables:
Arch: arm64
Platform: ARM64
_HostPython: python

strategy:
matrix:
arm64:
Name: arm64
Arch: arm64
ArchDir: arm64
PythonExePattern: python.exe
ExtraOptions: ${{ parameters.ExtraOptions }}
${{ if eq(parameters.ToBeSigned, 'true') }}:
Expand All @@ -314,7 +336,9 @@ jobs:
${{ if eq(parameters.DoFreethreaded, 'true') }}:
arm64_t:
Name: arm64_t
PythonExePattern: python3*t.exe
Arch: arm64
ArchDir: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'arm64t', 'arm64') }}
PythonExePattern: ${{ iif(eq(parameters.Post315OutputDir, 'true'), 'python.exe', 'python3*t.exe') }}
ExtraOptions: ${{ parameters.ExtraOptionsFreethreaded }}
${{ if eq(parameters.ToBeSigned, 'true') }}:
Artifact: unsigned_arm64_t
Expand Down
42 changes: 29 additions & 13 deletions windows-release/stage-msi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ parameters:
DoARM64: true
DoFreethreaded: false
SigningCertificate: ''
Post315OutputDir: false

jobs:
- job: Make_MSI
Expand Down Expand Up @@ -51,19 +52,34 @@ jobs:
# Freethreaded binaries copy into the same target directory, but files
# are not overwritten.
- ${{ if eq(parameters.DoFreethreaded, 'true') }}:
- artifact: bin_win32_t
target: $(Build.BinariesDirectory)\win32
- artifact: bin_win32_td
target: $(Build.BinariesDirectory)\win32
- artifact: bin_amd64_t
target: $(Build.BinariesDirectory)\amd64
- artifact: bin_amd64_td
target: $(Build.BinariesDirectory)\amd64
- ${{ if eq(parameters.DoARM64, 'true') }}:
- artifact: bin_arm64_t
target: $(Build.BinariesDirectory)\arm64
- artifact: bin_arm64_td
target: $(Build.BinariesDirectory)\arm64
- ${{ if eq(parameters.Post315OutputDir, 'true') }}:
- artifact: bin_win32_t
target: $(Build.BinariesDirectory)\win32t
- artifact: bin_win32_td
target: $(Build.BinariesDirectory)\win32t
- artifact: bin_amd64_t
target: $(Build.BinariesDirectory)\amd64t
- artifact: bin_amd64_td
target: $(Build.BinariesDirectory)\amd64t
- ${{ if eq(parameters.DoARM64, 'true') }}:
- artifact: bin_arm64_t
target: $(Build.BinariesDirectory)\arm64t
- artifact: bin_arm64_td
target: $(Build.BinariesDirectory)\arm64t
- ${{ else }}:
- artifact: bin_win32_t
target: $(Build.BinariesDirectory)\win32
- artifact: bin_win32_td
target: $(Build.BinariesDirectory)\win32
- artifact: bin_amd64_t
target: $(Build.BinariesDirectory)\amd64
- artifact: bin_amd64_td
target: $(Build.BinariesDirectory)\amd64
- ${{ if eq(parameters.DoARM64, 'true') }}:
- artifact: bin_arm64_t
target: $(Build.BinariesDirectory)\arm64
- artifact: bin_arm64_td
target: $(Build.BinariesDirectory)\arm64
Bundles:
- bundle: win32
Platform: x86
Expand Down
Loading