mirror of https://github.com/python/cpython
Fix some Windows release build script issues (GH-31931)
* Fix the condition used when excluding ARM64 packages from publish * Do not publish anything unless the traditional installer works * Fix disabling of MSI build * Add override conditions for publish steps * Allow overriding the Nuget version number during build
This commit is contained in:
parent
e707ceb6e4
commit
d56a237e16
|
@ -136,69 +136,80 @@ stages:
|
||||||
- template: windows-release/stage-test-embed.yml
|
- template: windows-release/stage-test-embed.yml
|
||||||
- template: windows-release/stage-test-nuget.yml
|
- template: windows-release/stage-test-nuget.yml
|
||||||
|
|
||||||
- stage: Layout_MSIX
|
- ${{ if eq(parameters.DoMSIX, 'true') }}:
|
||||||
displayName: Generate MSIX layouts
|
- stage: Layout_MSIX
|
||||||
dependsOn: Sign
|
displayName: Generate MSIX layouts
|
||||||
condition: and(succeeded(), eq(variables['DoMSIX'], 'true'))
|
dependsOn: Sign
|
||||||
jobs:
|
jobs:
|
||||||
- template: windows-release/stage-layout-msix.yml
|
- template: windows-release/stage-layout-msix.yml
|
||||||
parameters:
|
parameters:
|
||||||
ARM64TclTk: ${{ parameters.ARM64TclTk }}
|
ARM64TclTk: ${{ parameters.ARM64TclTk }}
|
||||||
|
|
||||||
- stage: Pack_MSIX
|
- stage: Pack_MSIX
|
||||||
displayName: Package MSIX
|
displayName: Package MSIX
|
||||||
dependsOn: Layout_MSIX
|
dependsOn: Layout_MSIX
|
||||||
jobs:
|
jobs:
|
||||||
- template: windows-release/stage-pack-msix.yml
|
- template: windows-release/stage-pack-msix.yml
|
||||||
|
|
||||||
- stage: Build_MSI
|
- ${{ if eq(parameters.DoMSI, 'true') }}:
|
||||||
displayName: Build MSI installer
|
- stage: Build_MSI
|
||||||
dependsOn: Sign
|
displayName: Build MSI installer
|
||||||
condition: and(succeeded(), eq(variables['DoMSI'], 'true'))
|
dependsOn: Sign
|
||||||
jobs:
|
jobs:
|
||||||
- template: windows-release/stage-msi.yml
|
- template: windows-release/stage-msi.yml
|
||||||
parameters:
|
parameters:
|
||||||
ARM64TclTk: ${{ parameters.ARM64TclTk }}
|
ARM64TclTk: ${{ parameters.ARM64TclTk }}
|
||||||
|
|
||||||
- stage: Test_MSI
|
- stage: Test_MSI
|
||||||
displayName: Test MSI installer
|
displayName: Test MSI installer
|
||||||
dependsOn: Build_MSI
|
dependsOn: Build_MSI
|
||||||
jobs:
|
jobs:
|
||||||
- template: windows-release/stage-test-msi.yml
|
- template: windows-release/stage-test-msi.yml
|
||||||
|
|
||||||
- ${{ if eq(parameters.DoPublish, 'true') }}:
|
- ${{ if eq(parameters.DoPublish, 'true') }}:
|
||||||
- stage: PublishPyDotOrg
|
- ${{ if eq(parameters.DoMSI, 'true') }}:
|
||||||
displayName: Publish to python.org
|
- stage: PublishPyDotOrg
|
||||||
dependsOn: ['Test_MSI', 'Test']
|
displayName: Publish to python.org
|
||||||
jobs:
|
dependsOn: ['Test_MSI', 'Test']
|
||||||
- template: windows-release/stage-publish-pythonorg.yml
|
jobs:
|
||||||
|
- template: windows-release/stage-publish-pythonorg.yml
|
||||||
|
|
||||||
- stage: PublishNuget
|
- ${{ if eq(parameters.DoNuget, 'true') }}:
|
||||||
displayName: Publish to nuget.org
|
- stage: PublishNuget
|
||||||
dependsOn: Test
|
displayName: Publish to nuget.org
|
||||||
jobs:
|
${{ if eq(parameters.DoMSI, 'true') }}:
|
||||||
- template: windows-release/stage-publish-nugetorg.yml
|
dependsOn: ['Test_MSI', 'Test']
|
||||||
|
${{ else }}:
|
||||||
|
dependsOn: 'Test'
|
||||||
|
jobs:
|
||||||
|
- template: windows-release/stage-publish-nugetorg.yml
|
||||||
|
|
||||||
- stage: PublishStore
|
- ${{ if eq(parameters.DoMSIX, 'true') }}:
|
||||||
displayName: Publish to Store
|
- stage: PublishStore
|
||||||
dependsOn: Pack_MSIX
|
displayName: Publish to Store
|
||||||
jobs:
|
${{ if eq(parameters.DoMSI, 'true') }}:
|
||||||
- template: windows-release/stage-publish-store.yml
|
dependsOn: ['Test_MSI', 'Pack_MSIX']
|
||||||
|
${{ else }}:
|
||||||
|
dependsOn: 'Pack_MSIX'
|
||||||
|
jobs:
|
||||||
|
- template: windows-release/stage-publish-store.yml
|
||||||
|
|
||||||
- ${{ else }}:
|
- ${{ else }}:
|
||||||
- stage: PublishExisting
|
- stage: PublishExisting
|
||||||
displayName: Publish existing build
|
displayName: Publish existing build
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
condition: and(succeeded(), eq(variables['DoPublish'], 'true'))
|
|
||||||
jobs:
|
jobs:
|
||||||
- template: windows-release/stage-publish-pythonorg.yml
|
- ${{ if eq(parameters.DoMSI, 'true') }}:
|
||||||
parameters:
|
- template: windows-release/stage-publish-pythonorg.yml
|
||||||
BuildToPublish: ${{ parameters.BuildToPublish }}
|
parameters:
|
||||||
|
BuildToPublish: ${{ parameters.BuildToPublish }}
|
||||||
|
|
||||||
- template: windows-release/stage-publish-nugetorg.yml
|
- ${{ if eq(parameters.DoNuget, 'true') }}:
|
||||||
parameters:
|
- template: windows-release/stage-publish-nugetorg.yml
|
||||||
BuildToPublish: ${{ parameters.BuildToPublish }}
|
parameters:
|
||||||
|
BuildToPublish: ${{ parameters.BuildToPublish }}
|
||||||
|
|
||||||
- template: windows-release/stage-publish-store.yml
|
- ${{ if eq(parameters.DoMSIX, 'true') }}:
|
||||||
parameters:
|
- template: windows-release/stage-publish-store.yml
|
||||||
BuildToPublish: ${{ parameters.BuildToPublish }}
|
parameters:
|
||||||
|
BuildToPublish: ${{ parameters.BuildToPublish }}
|
||||||
|
|
|
@ -32,8 +32,23 @@ jobs:
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '>=5.0'
|
versionSpec: '>=5.0'
|
||||||
|
|
||||||
- powershell: |
|
- powershell: >
|
||||||
nuget pack "$(Build.BinariesDirectory)\layout\python.nuspec" -OutputDirectory $(Build.ArtifactStagingDirectory) -NoPackageAnalysis -NonInteractive
|
nuget pack
|
||||||
|
"$(Build.BinariesDirectory)\layout\python.nuspec"
|
||||||
|
-OutputDirectory $(Build.ArtifactStagingDirectory)
|
||||||
|
-NoPackageAnalysis
|
||||||
|
-NonInteractive
|
||||||
|
condition: and(succeeded(), not(variables['OverrideNugetVersion']))
|
||||||
|
displayName: 'Create nuget package'
|
||||||
|
|
||||||
|
- powershell: >
|
||||||
|
nuget pack
|
||||||
|
"$(Build.BinariesDirectory)\layout\python.nuspec"
|
||||||
|
-OutputDirectory $(Build.ArtifactStagingDirectory)
|
||||||
|
-NoPackageAnalysis
|
||||||
|
-NonInteractive
|
||||||
|
-Version "$(OverrideNugetVersion)"
|
||||||
|
condition: and(succeeded(), variables['OverrideNugetVersion'])
|
||||||
displayName: 'Create nuget package'
|
displayName: 'Create nuget package'
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
|
|
|
@ -4,7 +4,7 @@ parameters:
|
||||||
jobs:
|
jobs:
|
||||||
- job: Publish_Nuget
|
- job: Publish_Nuget
|
||||||
displayName: Publish Nuget packages
|
displayName: Publish Nuget packages
|
||||||
condition: and(succeeded(), eq(variables['DoNuget'], 'true'))
|
condition: and(succeeded(), eq(variables['DoNuget'], 'true'), ne(variables['SkipNugetPublish'], 'true'))
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: windows-2022
|
vmImage: windows-2022
|
||||||
|
@ -38,7 +38,7 @@ jobs:
|
||||||
- powershell: 'gci pythonarm*.nupkg | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del'
|
- powershell: 'gci pythonarm*.nupkg | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del'
|
||||||
displayName: 'Prevent publishing ARM64 packages'
|
displayName: 'Prevent publishing ARM64 packages'
|
||||||
workingDirectory: '$(Build.BinariesDirectory)\nuget'
|
workingDirectory: '$(Build.BinariesDirectory)\nuget'
|
||||||
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
|
condition: and(succeeded(), ne(variables['PublishARM64'], 'true'))
|
||||||
|
|
||||||
- task: NuGetCommand@2
|
- task: NuGetCommand@2
|
||||||
displayName: Push packages
|
displayName: Push packages
|
||||||
|
|
|
@ -4,7 +4,7 @@ parameters:
|
||||||
jobs:
|
jobs:
|
||||||
- job: Publish_Python
|
- job: Publish_Python
|
||||||
displayName: Publish python.org packages
|
displayName: Publish python.org packages
|
||||||
condition: and(succeeded(), and(eq(variables['DoMSI'], 'true'), eq(variables['DoEmbed'], 'true')))
|
condition: and(succeeded(), eq(variables['DoMSI'], 'true'), eq(variables['DoEmbed'], 'true'), ne(variables['SkipPythonOrgPublish'], 'true'))
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
#vmImage: windows-2022
|
#vmImage: windows-2022
|
||||||
|
@ -81,7 +81,7 @@ jobs:
|
||||||
- powershell: 'gci *embed-arm*.zip | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del'
|
- powershell: 'gci *embed-arm*.zip | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del'
|
||||||
displayName: 'Prevent publishing ARM64 packages'
|
displayName: 'Prevent publishing ARM64 packages'
|
||||||
workingDirectory: '$(Build.BinariesDirectory)\embed'
|
workingDirectory: '$(Build.BinariesDirectory)\embed'
|
||||||
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
|
condition: and(succeeded(), ne(variables['PublishARM64'], 'true'))
|
||||||
|
|
||||||
|
|
||||||
- template: ./gpg-sign.yml
|
- template: ./gpg-sign.yml
|
||||||
|
|
|
@ -4,7 +4,7 @@ parameters:
|
||||||
jobs:
|
jobs:
|
||||||
- job: Publish_Store
|
- job: Publish_Store
|
||||||
displayName: Publish Store packages
|
displayName: Publish Store packages
|
||||||
condition: and(succeeded(), eq(variables['DoMSIX'], 'true'))
|
condition: and(succeeded(), eq(variables['DoMSIX'], 'true'), ne(variables['SkipMSIXPublish'], 'true'))
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: windows-2022
|
vmImage: windows-2022
|
||||||
|
|
Loading…
Reference in New Issue