Fix Windows release build issues (GH-14091)

* Increase timeout for PGO builds in Windows release
* Fix test step failures
* Disable MinGW step properly
* Fix embeddable distro name
This commit is contained in:
Steve Dower 2019-06-14 14:19:25 -07:00 committed by GitHub
parent bd5798f6d4
commit 749e73065d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 8 deletions

View File

@ -94,8 +94,8 @@ steps:
Py_OutDir: $(Build.BinariesDirectory) Py_OutDir: $(Build.BinariesDirectory)
- script: | - script: |
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true /p:BuildForRelease=true %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
%MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false /p:BuildForRelease=true %MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false
displayName: 'Build win32 installer' displayName: 'Build win32 installer'
env: env:
Platform: x86 Platform: x86
@ -103,10 +103,12 @@ steps:
PYTHON: $(Build.BinariesDirectory)\win32\python.exe PYTHON: $(Build.BinariesDirectory)\win32\python.exe
PYTHONHOME: $(Build.SourcesDirectory) PYTHONHOME: $(Build.SourcesDirectory)
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_win32 TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_win32
BuildForRelease: true
SuppressMinGWLib: true
- script: | - script: |
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true /p:BuildForRelease=true %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
%MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false /p:BuildForRelease=true %MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false
displayName: 'Build amd64 installer' displayName: 'Build amd64 installer'
env: env:
Platform: x64 Platform: x64
@ -114,6 +116,8 @@ steps:
PYTHON: $(Build.BinariesDirectory)\amd64\python.exe PYTHON: $(Build.BinariesDirectory)\amd64\python.exe
PYTHONHOME: $(Build.SourcesDirectory) PYTHONHOME: $(Build.SourcesDirectory)
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_amd64 TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_amd64
BuildForRelease: true
SuppressMinGWLib: true
- task: CopyFiles@2 - task: CopyFiles@2
displayName: 'Assemble artifact: msi (1/2)' displayName: 'Assemble artifact: msi (1/2)'

View File

@ -95,6 +95,9 @@ jobs:
displayName: Python PGO build displayName: Python PGO build
condition: and(succeeded(), eq(variables['DoPGO'], 'true')) condition: and(succeeded(), eq(variables['DoPGO'], 'true'))
# Allow up to five hours for PGO
timeoutInMinutes: 300
pool: pool:
name: 'Windows Release' name: 'Windows Release'

View File

@ -39,7 +39,7 @@ jobs:
- powershell: > - powershell: >
$(LayoutCmd) $(LayoutCmd)
--copy "$(Build.ArtifactStagingDirectory)\layout" --copy "$(Build.ArtifactStagingDirectory)\layout"
--zip "$(Build.ArtifactStagingDirectory)\embed\$(VersionText)-embed-$(Name).zip" --zip "$(Build.ArtifactStagingDirectory)\embed\python-$(VersionText)-embed-$(Name).zip"
--preset-embed --preset-embed
displayName: 'Generate embeddable layout' displayName: 'Generate embeddable layout'

View File

@ -26,7 +26,8 @@ jobs:
downloadPath: $(Build.BinariesDirectory) downloadPath: $(Build.BinariesDirectory)
- powershell: | - powershell: |
Expand-Archive -Path "$(Build.BinariesDirectory)\embed\embed-$(Name).zip" -DestinationPath "$(Build.BinariesDirectory)\Python" $p = gi "$(Build.BinariesDirectory)\embed\python*embed-$(Name).zip"
Expand-Archive -Path $p -DestinationPath "$(Build.BinariesDirectory)\Python"
$p = gi "$(Build.BinariesDirectory)\Python\python.exe" $p = gi "$(Build.BinariesDirectory)\Python\python.exe"
Write-Host "##vso[task.prependpath]$(Split-Path -Parent $p)" Write-Host "##vso[task.prependpath]$(Split-Path -Parent $p)"
displayName: 'Install Python and add to PATH' displayName: 'Install Python and add to PATH'

View File

@ -8,7 +8,7 @@
</PropertyGroup> </PropertyGroup>
<Import Project="..\msi.props" /> <Import Project="..\msi.props" />
<PropertyGroup> <PropertyGroup>
<DefineConstants Condition="$(BuildForRelease)"> <DefineConstants Condition="$(BuildForRelease) and $(SuppressMinGWLib) == ''">
$(DefineConstants); $(DefineConstants);
IncludeMinGWLib=1; IncludeMinGWLib=1;
</DefineConstants> </DefineConstants>
@ -35,7 +35,7 @@
Inputs="$(BuildPath)$(PyDllName).dll" Inputs="$(BuildPath)$(PyDllName).dll"
Outputs="$(BuildPath)lib$(PyDllName).a" Outputs="$(BuildPath)lib$(PyDllName).a"
AfterTargets="PrepareForBuild" AfterTargets="PrepareForBuild"
Condition="$(BuildForRelease)"> Condition="$(BuildForRelease) and $(SuppressMinGWLib) == ''">
<!-- Build libpython##.a as part of this project. This requires gendef and dlltool on the path. --> <!-- Build libpython##.a as part of this project. This requires gendef and dlltool on the path. -->
<PropertyGroup> <PropertyGroup>
<_DllToolOpts>-m i386 --as-flags=--32</_DllToolOpts> <_DllToolOpts>-m i386 --as-flags=--32</_DllToolOpts>