]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Improves the Windows MSI test run on PR (GH-104929)
authorSteve Dower <steve.dower@python.org>
Thu, 25 May 2023 15:17:12 +0000 (16:17 +0100)
committerGitHub <noreply@github.com>
Thu, 25 May 2023 15:17:12 +0000 (16:17 +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 2bed09014e0ff20df359770dd3b6b948d96448c6..22f613a88aa11ebf51f3c0d0b967575c2586ccee 100644 (file)
@@ -8,12 +8,14 @@ on:
     - '3.*'
     paths:
     - 'Tools/msi/**'
+    - '.github/workflows/build_msi.yml'
   pull_request:
     branches:
     - 'main'
     - '3.*'
     paths:
     - 'Tools/msi/**'
+    - '.github/workflows/build_msi.yml'
 
 permissions:
   contents: read
@@ -33,4 +35,4 @@ jobs:
     steps:
     - uses: actions/checkout@v3
     - name: Build CPython installer
-      run: .\Tools\msi\build.bat -${{ matrix.type }}
+      run: .\Tools\msi\build.bat --doc -${{ matrix.type }}
index 8771d004211ea9476d4f402dec33c7bd15ebcf2a..b9aab887c4939b802248f0cfce0d24dbf9f77fca 100644 (file)
@@ -29,29 +29,23 @@ 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 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 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" html
-    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 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%
 
 rem Build the launcher MSI separately
 %MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86
@@ -68,18 +62,14 @@ 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 BUILDARM64 (
-    %MSBUILD% /p:Platform=ARM64 %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%
+
+if defined BUILDARM64 %MSBUILD% /p:Platform=ARM64 %BUILD_CMD%
+if errorlevel 1 exit /B %ERRORLEVEL%
 
 exit /B 0