diff options
author | Steve Dower <steve.dower@python.org> | 2022-01-28 16:48:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-28 16:48:06 +0000 |
commit | 45faf151c693b6f13f78926761caea6df7242024 (patch) | |
tree | 8e45001c8431c55aba7a03015e8e449361b3d4c0 /.azure-pipelines | |
parent | db77bcd6092f3c174ae855522411ab83854d65a8 (diff) | |
download | cpython-git-45faf151c693b6f13f78926761caea6df7242024.tar.gz |
bpo-33125: Enables building traditional installer for Windows ARM64 (GH-30885)
Also makes a few general improvements to the build process and removes some dead code.
Diffstat (limited to '.azure-pipelines')
5 files changed, 74 insertions, 30 deletions
diff --git a/.azure-pipelines/windows-release.yml b/.azure-pipelines/windows-release.yml index 338c305ecd..c038ccdb86 100644 --- a/.azure-pipelines/windows-release.yml +++ b/.azure-pipelines/windows-release.yml @@ -34,6 +34,10 @@ parameters: displayName: "Signature description" type: string default: 'Built: $(Build.BuildNumber)' +- name: DoARM64 + displayName: "Publish ARM64 build" + type: boolean + default: true - name: DoPGO displayName: "Run PGO" type: boolean @@ -64,25 +68,26 @@ parameters: default: '0' variables: - __RealSigningCertificate: 'Python Software Foundation' - ${{ if ne(parameters.GitRemote, '(Other)') }}: - GitRemote: ${{ parameters.GitRemote }} - ${{ else }}: - GitRemote: ${{ parameters.GitRemote_Other }} - SourceTag: ${{ parameters.SourceTag }} - DoPGO: ${{ parameters.DoPGO }} - ${{ if ne(parameters.SigningCertificate, 'Unsigned') }}: - SigningCertificate: ${{ parameters.SigningCertificate }} - SigningDescription: ${{ parameters.SigningDescription }} - DoLayout: ${{ parameters.DoLayout }} - DoMSIX: ${{ parameters.DoMSIX }} - DoNuget: ${{ parameters.DoNuget }} - DoEmbed: ${{ parameters.DoEmbed }} - DoMSI: ${{ parameters.DoMSI }} - DoPublish: ${{ parameters.DoPublish }} + __RealSigningCertificate: 'Python Software Foundation' + ${{ if ne(parameters.GitRemote, '(Other)') }}: + GitRemote: ${{ parameters.GitRemote }} + ${{ else }}: + GitRemote: ${{ parameters.GitRemote_Other }} + SourceTag: ${{ parameters.SourceTag }} + DoPGO: ${{ parameters.DoPGO }} + ${{ if ne(parameters.SigningCertificate, 'Unsigned') }}: + SigningCertificate: ${{ parameters.SigningCertificate }} + SigningDescription: ${{ parameters.SigningDescription }} + DoLayout: ${{ parameters.DoLayout }} + DoMSIX: ${{ parameters.DoMSIX }} + DoNuget: ${{ parameters.DoNuget }} + DoEmbed: ${{ parameters.DoEmbed }} + DoMSI: ${{ parameters.DoMSI }} + DoPublish: ${{ parameters.DoPublish }} + PublishARM64: ${{ parameters.DoARM64 }} # QUEUE TIME VARIABLES -# PyDotOrgUsername: '' -# PyDotOrgServer: '' +# PyDotOrgUsername: '' +# PyDotOrgServer: '' trigger: none pr: none diff --git a/.azure-pipelines/windows-release/msi-steps.yml b/.azure-pipelines/windows-release/msi-steps.yml index 307510a40d..ef98d56c78 100644 --- a/.azure-pipelines/windows-release/msi-steps.yml +++ b/.azure-pipelines/windows-release/msi-steps.yml @@ -46,6 +46,20 @@ steps: targetPath: $(Build.BinariesDirectory)\amd64 - task: DownloadPipelineArtifact@1 + displayName: 'Download artifact: bin_arm64' + condition: and(succeeded(), eq(variables['PublishARM64'], 'true')) + inputs: + artifactName: bin_arm64 + targetPath: $(Build.BinariesDirectory)\arm64 + + - task: DownloadPipelineArtifact@1 + displayName: 'Download artifact: bin_arm64_d' + condition: and(succeeded(), eq(variables['PublishARM64'], 'true')) + inputs: + artifactName: bin_arm64_d + targetPath: $(Build.BinariesDirectory)\arm64 + + - task: DownloadPipelineArtifact@1 displayName: 'Download artifact: tcltk_lib_win32' inputs: artifactName: tcltk_lib_win32 @@ -84,12 +98,12 @@ steps: - script: | %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true - %MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false displayName: 'Build win32 installer' env: Platform: x86 Py_OutDir: $(Build.BinariesDirectory) PYTHON: $(Build.BinariesDirectory)\win32\python.exe + PythonForBuild: $(Build.BinariesDirectory)\win32\python.exe PYTHONHOME: $(Build.SourcesDirectory) TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_win32 BuildForRelease: true @@ -97,19 +111,32 @@ steps: - script: | %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true - %MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false displayName: 'Build amd64 installer' env: Platform: x64 Py_OutDir: $(Build.BinariesDirectory) PYTHON: $(Build.BinariesDirectory)\amd64\python.exe + PythonForBuild: $(Build.BinariesDirectory)\amd64\python.exe PYTHONHOME: $(Build.SourcesDirectory) TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_amd64 BuildForRelease: true SuppressMinGWLib: true + - script: | + %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true + displayName: 'Build arm64 installer' + condition: and(succeeded(), eq(variables['PublishARM64'], 'true')) + env: + Platform: ARM64 + Py_OutDir: $(Build.BinariesDirectory) + PYTHON: $(Build.BinariesDirectory)\win32\python.exe + PythonForBuild: $(Build.BinariesDirectory)\win32\python.exe + PYTHONHOME: $(Build.SourcesDirectory) + BuildForRelease: true + SuppressMinGWLib: true + - task: CopyFiles@2 - displayName: 'Assemble artifact: msi (1/2)' + displayName: 'Assemble artifact: msi (win32)' inputs: sourceFolder: $(Build.BinariesDirectory)\win32\en-us targetFolder: $(Build.ArtifactStagingDirectory)\msi\win32 @@ -119,7 +146,7 @@ steps: *.exe - task: CopyFiles@2 - displayName: 'Assemble artifact: msi (2/2)' + displayName: 'Assemble artifact: msi (amd64)' inputs: sourceFolder: $(Build.BinariesDirectory)\amd64\en-us targetFolder: $(Build.ArtifactStagingDirectory)\msi\amd64 @@ -128,6 +155,17 @@ steps: *.cab *.exe + - task: CopyFiles@2 + displayName: 'Assemble artifact: msi (arm64)' + condition: and(succeeded(), eq(variables['PublishARM64'], 'true')) + inputs: + sourceFolder: $(Build.BinariesDirectory)\arm64\en-us + targetFolder: $(Build.ArtifactStagingDirectory)\msi\arm64 + contents: | + *.msi + *.cab + *.exe + - task: PublishPipelineArtifact@0 displayName: 'Publish MSI' inputs: diff --git a/.azure-pipelines/windows-release/stage-publish-nugetorg.yml b/.azure-pipelines/windows-release/stage-publish-nugetorg.yml index 38f6772afc..a8855f0ace 100644 --- a/.azure-pipelines/windows-release/stage-publish-nugetorg.yml +++ b/.azure-pipelines/windows-release/stage-publish-nugetorg.yml @@ -36,9 +36,9 @@ jobs: - powershell: 'gci pythonarm*.nupkg | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del' - displayName: 'Prevent publishing ARM/ARM64 packages' + displayName: 'Prevent publishing ARM64 packages' workingDirectory: '$(Build.BinariesDirectory)\nuget' - condition: and(succeeded(), not(variables['PublishArmPackages'])) + condition: and(succeeded(), eq(variables['PublishARM64'], 'true')) - task: NuGetCommand@2 displayName: Push packages diff --git a/.azure-pipelines/windows-release/stage-publish-pythonorg.yml b/.azure-pipelines/windows-release/stage-publish-pythonorg.yml index ef95572f7d..be4ef9e0cc 100644 --- a/.azure-pipelines/windows-release/stage-publish-pythonorg.yml +++ b/.azure-pipelines/windows-release/stage-publish-pythonorg.yml @@ -77,10 +77,11 @@ jobs: downloadPath: $(Build.BinariesDirectory) + # Note that ARM64 MSIs are skipped at build when this option is specified - powershell: 'gci *embed-arm*.zip | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del' - displayName: 'Prevent publishing ARM/ARM64 packages' + displayName: 'Prevent publishing ARM64 packages' workingDirectory: '$(Build.BinariesDirectory)\embed' - condition: and(succeeded(), not(variables['PublishArmPackages'])) + condition: and(succeeded(), eq(variables['PublishARM64'], 'true')) - template: ./gpg-sign.yml diff --git a/.azure-pipelines/windows-release/stage-test-msi.yml b/.azure-pipelines/windows-release/stage-test-msi.yml index 4b02f478ce..a471d05bc6 100644 --- a/.azure-pipelines/windows-release/stage-test-msi.yml +++ b/.azure-pipelines/windows-release/stage-test-msi.yml @@ -11,19 +11,19 @@ jobs: strategy: matrix: win32_User: - ExeMatch: 'python-[\dabrc.]+-webinstall\.exe' + ExeMatch: 'python-[\dabrc.]+\.exe' Logs: $(Build.ArtifactStagingDirectory)\logs\win32_User InstallAllUsers: 0 win32_Machine: - ExeMatch: 'python-[\dabrc.]+-webinstall\.exe' + ExeMatch: 'python-[\dabrc.]+\.exe' Logs: $(Build.ArtifactStagingDirectory)\logs\win32_Machine InstallAllUsers: 1 amd64_User: - ExeMatch: 'python-[\dabrc.]+-amd64-webinstall\.exe' + ExeMatch: 'python-[\dabrc.]+-amd64\.exe' Logs: $(Build.ArtifactStagingDirectory)\logs\amd64_User InstallAllUsers: 0 amd64_Machine: - ExeMatch: 'python-[\dabrc.]+-amd64-webinstall\.exe' + ExeMatch: 'python-[\dabrc.]+-amd64\.exe' Logs: $(Build.ArtifactStagingDirectory)\logs\amd64_Machine InstallAllUsers: 1 |