mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Improves the Windows MSI test run on PR (GH-104929)
Correctly set the exit code when builds fail
Also build docs as part of the test
(cherry picked from commit 569b2b8d61
)
Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
parent
b328ba1941
commit
d176f78ec2
2 changed files with 27 additions and 35 deletions
4
.github/workflows/build_msi.yml
vendored
4
.github/workflows/build_msi.yml
vendored
|
@ -8,12 +8,14 @@ on:
|
||||||
- '3.*'
|
- '3.*'
|
||||||
paths:
|
paths:
|
||||||
- 'Tools/msi/**'
|
- 'Tools/msi/**'
|
||||||
|
- '.github/workflows/build_msi.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
- '3.*'
|
- '3.*'
|
||||||
paths:
|
paths:
|
||||||
- 'Tools/msi/**'
|
- 'Tools/msi/**'
|
||||||
|
- '.github/workflows/build_msi.yml'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
@ -33,4 +35,4 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Build CPython installer
|
- name: Build CPython installer
|
||||||
run: .\Tools\msi\build.bat -${{ matrix.type }}
|
run: .\Tools\msi\build.bat --doc -${{ matrix.type }}
|
||||||
|
|
|
@ -29,29 +29,23 @@ call "%D%get_externals.bat"
|
||||||
call "%PCBUILD%find_msbuild.bat" %MSBUILD%
|
call "%PCBUILD%find_msbuild.bat" %MSBUILD%
|
||||||
if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
|
if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
|
||||||
|
|
||||||
if defined BUILDX86 (
|
if defined BUILDX86 call "%PCBUILD%build.bat" -p Win32 -d -e %REBUILD% %BUILDTEST%
|
||||||
call "%PCBUILD%build.bat" -p Win32 -d -e %REBUILD% %BUILDTEST%
|
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
call "%PCBUILD%build.bat" -p Win32 -e %REBUILD% %BUILDTEST%
|
if defined BUILDX86 call "%PCBUILD%build.bat" -p Win32 -e %REBUILD% %BUILDTEST%
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
)
|
|
||||||
if defined BUILDX64 (
|
|
||||||
call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
|
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
|
||||||
call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
|
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
|
||||||
)
|
|
||||||
if defined BUILDARM64 (
|
|
||||||
call "%PCBUILD%build.bat" -p ARM64 -d -e %REBUILD% %BUILDTEST%
|
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
|
||||||
call "%PCBUILD%build.bat" -p ARM64 -e %REBUILD% %BUILDTEST%
|
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
|
||||||
)
|
|
||||||
|
|
||||||
if defined BUILDDOC (
|
if defined BUILDX64 call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
|
||||||
call "%PCBUILD%..\Doc\make.bat" html
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
|
if defined BUILDX64 call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
|
||||||
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
|
if defined BUILDARM64 call "%PCBUILD%build.bat" -p ARM64 -d -e %REBUILD% %BUILDTEST%
|
||||||
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
|
if defined BUILDARM64 call "%PCBUILD%build.bat" -p ARM64 -e %REBUILD% %BUILDTEST%
|
||||||
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
|
|
||||||
|
if defined BUILDDOC call "%PCBUILD%..\Doc\make.bat" html
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
)
|
|
||||||
|
|
||||||
rem Build the launcher MSI separately
|
rem Build the launcher MSI separately
|
||||||
%MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86
|
%MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86
|
||||||
|
@ -68,18 +62,14 @@ if defined REBUILD (
|
||||||
set BUILD_CMD=%BUILD_CMD% /t:Rebuild
|
set BUILD_CMD=%BUILD_CMD% /t:Rebuild
|
||||||
)
|
)
|
||||||
|
|
||||||
if defined BUILDX86 (
|
if defined BUILDX86 %MSBUILD% /p:Platform=x86 %BUILD_CMD%
|
||||||
%MSBUILD% /p:Platform=x86 %BUILD_CMD%
|
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
)
|
|
||||||
if defined BUILDX64 (
|
if defined BUILDX64 %MSBUILD% /p:Platform=x64 %BUILD_CMD%
|
||||||
%MSBUILD% /p:Platform=x64 %BUILD_CMD%
|
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
)
|
|
||||||
if defined BUILDARM64 (
|
if defined BUILDARM64 %MSBUILD% /p:Platform=ARM64 %BUILD_CMD%
|
||||||
%MSBUILD% /p:Platform=ARM64 %BUILD_CMD%
|
|
||||||
if errorlevel 1 exit /B %ERRORLEVEL%
|
if errorlevel 1 exit /B %ERRORLEVEL%
|
||||||
)
|
|
||||||
|
|
||||||
exit /B 0
|
exit /B 0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue