diff --git a/windows-release/azure-pipelines.yml b/windows-release/azure-pipelines.yml index c4460195..3a1c9100 100644 --- a/windows-release/azure-pipelines.yml +++ b/windows-release/azure-pipelines.yml @@ -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 @@ -196,6 +200,8 @@ stages: TailCallingOption: '' ${{ else }}: TailCallingOption: '--tail-call-interp' + Post315OutputDir: ${{ parameters.Post315OutputDir }} + - stage: Sign displayName: Sign binaries dependsOn: Build @@ -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: diff --git a/windows-release/build-steps-pgo.yml b/windows-release/build-steps-pgo.yml index f55ec42c..5823cbd5 100644 --- a/windows-release/build-steps-pgo.yml +++ b/windows-release/build-steps-pgo.yml @@ -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' @@ -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' @@ -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' @@ -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)' @@ -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' diff --git a/windows-release/build-steps.yml b/windows-release/build-steps.yml index 300d7e79..727c3634 100644 --- a/windows-release/build-steps.yml +++ b/windows-release/build-steps.yml @@ -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' diff --git a/windows-release/stage-build.yml b/windows-release/stage-build.yml index 12d8076e..3facc985 100644 --- a/windows-release/stage-build.yml +++ b/windows-release/stage-build.yml @@ -7,6 +7,7 @@ parameters: ExtraOptions: '' ExtraOptionsFreethreaded: '--disable-gil' TailCallingOption: '' + Post315OutputDir: false jobs: - job: Build_Docs @@ -49,6 +50,7 @@ jobs: win32: Name: win32 Arch: win32 + ArchDir: win32 Platform: x86 Configuration: Release _HostPython: .\python @@ -60,6 +62,7 @@ jobs: win32_d: Name: win32_d Arch: win32 + ArchDir: win32 Platform: x86 Configuration: Debug _HostPython: .\python @@ -69,6 +72,7 @@ jobs: amd64: Name: amd64 Arch: amd64 + ArchDir: amd64 Platform: x64 Configuration: Release _HostPython: .\python @@ -80,6 +84,7 @@ jobs: amd64_d: Name: amd64_d Arch: amd64 + ArchDir: amd64 Platform: x64 Configuration: Debug _HostPython: .\python @@ -89,6 +94,7 @@ jobs: arm64: Name: arm64 Arch: arm64 + ArchDir: arm64 Platform: ARM64 Configuration: Release _HostPython: python @@ -100,6 +106,7 @@ jobs: arm64_d: Name: arm64_d Arch: arm64 + ArchDir: arm64 Platform: ARM64 Configuration: Debug _HostPython: python @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -183,6 +196,7 @@ jobs: amd64: Name: amd64 Arch: amd64 + ArchDir: amd64 Platform: x64 _HostPython: .\python PythonExePattern: python.exe @@ -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 @@ -220,7 +235,6 @@ jobs: clean: all variables: - Arch: arm64 Platform: ARM64 _HostPython: python @@ -228,6 +242,8 @@ jobs: matrix: arm64: Name: arm64 + Arch: arm64 + ArchDir: arm64 PythonExePattern: python.exe ExtraOptions: ${{ parameters.ExtraOptions }} ${{ if eq(parameters.ToBeSigned, 'true') }}: @@ -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 @@ -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 @@ -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 }}: @@ -297,7 +318,6 @@ jobs: clean: all variables: - Arch: arm64 Platform: ARM64 _HostPython: python @@ -305,6 +325,8 @@ jobs: matrix: arm64: Name: arm64 + Arch: arm64 + ArchDir: arm64 PythonExePattern: python.exe ExtraOptions: ${{ parameters.ExtraOptions }} ${{ if eq(parameters.ToBeSigned, 'true') }}: @@ -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 diff --git a/windows-release/stage-msi.yml b/windows-release/stage-msi.yml index 4342a470..42474f19 100644 --- a/windows-release/stage-msi.yml +++ b/windows-release/stage-msi.yml @@ -3,6 +3,7 @@ parameters: DoARM64: true DoFreethreaded: false SigningCertificate: '' + Post315OutputDir: false jobs: - job: Make_MSI @@ -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