summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2023-05-25 16:45:47 (GMT)
committerGitHub <noreply@github.com>2023-05-25 16:45:47 (GMT)
commitf22ddbfc7aef8e7b6930fbe779ec1431a4ed1755 (patch)
treeeca8b4ff9ee24bc25f65ec51029eb402a81706f2
parentf9d2a109bb9a477f79639c0459d32f1c38c67cce (diff)
downloadcpython-f22ddbfc7aef8e7b6930fbe779ec1431a4ed1755.zip
cpython-f22ddbfc7aef8e7b6930fbe779ec1431a4ed1755.tar.gz
cpython-f22ddbfc7aef8e7b6930fbe779ec1431a4ed1755.tar.bz2
[3.10] 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
-rw-r--r--.github/workflows/build_msi.yml6
-rw-r--r--Tools/msi/build.bat40
2 files changed, 20 insertions, 26 deletions
diff --git a/.github/workflows/build_msi.yml b/.github/workflows/build_msi.yml
index 0eba92e..4c757c6 100644
--- a/.github/workflows/build_msi.yml
+++ b/.github/workflows/build_msi.yml
@@ -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
diff --git a/Tools/msi/build.bat b/Tools/msi/build.bat
index 99c0767..da7eb68 100644
--- a/Tools/msi/build.bat
+++ b/Tools/msi/build.bat
@@ -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