]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] Improves the Windows MSI test run on PR (GH-104929)
authorSteve Dower <steve.dower@python.org>
Thu, 25 May 2023 16:45:47 +0000 (17:45 +0100)
committerGitHub <noreply@github.com>
Thu, 25 May 2023 16:45:47 +0000 (17:45 +0100)
Correctly set the exit code when builds fail
Also build docs as part of the test

.github/workflows/build_msi.yml
Tools/msi/build.bat

index 0eba92e1c844385baae0ef45c093b211af92f13b..4c757c6934bb109dd6452c824bf65922936c0484 100644 (file)
@@ -10,6 +10,7 @@ on:
     - 3.7
     paths:
     - 'Tools/msi/**'
+    - '.github/workflows/build_msi.yml'
   pull_request:
     branches:
     - master
@@ -19,6 +20,7 @@ on:
     - 3.7
     paths:
     - 'Tools/msi/**'
+    - '.github/workflows/build_msi.yml'
 
 permissions:
   contents: read
@@ -34,7 +36,7 @@ jobs:
     steps:
     - uses: actions/checkout@v3
     - name: Build CPython installer
-      run: .\Tools\msi\build.bat -x86
+      run: .\Tools\msi\build.bat --doc -x86
 
   build_win_amd64:
     name: 'Windows (x64) Installer'
@@ -42,4 +44,4 @@ jobs:
     steps:
     - uses: actions/checkout@v3
     - name: Build CPython installer
-      run: .\Tools\msi\build.bat -x64
+      run: .\Tools\msi\build.bat --doc -x64
index 99c0767fe9382b8fd46a5c33a82290379d989e67..da7eb68b399fbafe1736c6762359576b24f5780c 100644 (file)
@@ -27,23 +27,18 @@ call "%D%get_externals.bat"
 call "%PCBUILD%find_msbuild.bat" %MSBUILD%
 if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
 
-if defined BUILDX86 (
-    call "%PCBUILD%build.bat" -p Win32 -d -e %REBUILD% %BUILDTEST%
-    if errorlevel 1 exit /B %ERRORLEVEL%
-    call "%PCBUILD%build.bat" -p Win32 -e %REBUILD% %BUILDTEST%
-    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 BUILDX86 call "%PCBUILD%build.bat" -p Win32 -d -e %REBUILD% %BUILDTEST%
+if errorlevel 1 exit /B %ERRORLEVEL%
+if defined BUILDX86 call "%PCBUILD%build.bat" -p Win32 -e %REBUILD% %BUILDTEST%
+if errorlevel 1 exit /B %ERRORLEVEL%
 
-if defined BUILDDOC (
-    call "%PCBUILD%..\Doc\make.bat" htmlhelp
-    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%
+if defined BUILDX64 call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
+if errorlevel 1 exit /B %ERRORLEVEL%
+
+if defined BUILDDOC call "%PCBUILD%..\Doc\make.bat" html
+if errorlevel 1 exit /B %ERRORLEVEL%
 
 rem Build the launcher MSI separately
 %MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86
@@ -60,14 +55,11 @@ if defined REBUILD (
     set BUILD_CMD=%BUILD_CMD% /t:Rebuild
 )
 
-if defined BUILDX86 (
-    %MSBUILD% /p:Platform=x86 %BUILD_CMD%
-    if errorlevel 1 exit /B %ERRORLEVEL%
-)
-if defined BUILDX64 (
-    %MSBUILD% /p:Platform=x64 %BUILD_CMD%
-    if errorlevel 1 exit /B %ERRORLEVEL%
-)
+if defined BUILDX86 %MSBUILD% /p:Platform=x86 %BUILD_CMD%
+if errorlevel 1 exit /B %ERRORLEVEL%
+
+if defined BUILDX64 %MSBUILD% /p:Platform=x64 %BUILD_CMD%
+if errorlevel 1 exit /B %ERRORLEVEL%
 
 exit /B 0