From 3cc4318b29151878e6552ee1bba3a28f268eae01 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Sat, 9 Dec 2023 22:15:56 +0100 Subject: [PATCH 1/2] Build: Windows: Improve dependency download speed Invoke-WebRequest enables a progress bar by default which slows down the requests a lot. Disabling these makes the build run much faster. Source: - https://stackoverflow.com/a/43477248 - Interactive testing --- .github/autobuild/windows.ps1 | 4 ++++ windows/deploy_windows.ps1 | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/autobuild/windows.ps1 b/.github/autobuild/windows.ps1 index c973d5049b..2d57ebafcf 100644 --- a/.github/autobuild/windows.ps1 +++ b/.github/autobuild/windows.ps1 @@ -39,6 +39,10 @@ param( # Fail early on all errors $ErrorActionPreference = "Stop" +# Invoke-WebRequest is really slow by default because it renders a progress bar. +# Disabling this, improves vastly performance: +$ProgressPreference = 'SilentlyContinue' + $QtDir = 'C:\Qt' $ChocoCacheDir = 'C:\ChocoCache' $DownloadCacheDir = 'C:\AutobuildCache' diff --git a/windows/deploy_windows.ps1 b/windows/deploy_windows.ps1 index 16b6b91efb..7ea6092d5a 100644 --- a/windows/deploy_windows.ps1 +++ b/windows/deploy_windows.ps1 @@ -21,6 +21,10 @@ param ( # Fail early on all errors $ErrorActionPreference = "Stop" +# Invoke-WebRequest is really slow by default because it renders a progress bar. +# Disabling this, improves vastly performance: +$ProgressPreference = 'SilentlyContinue' + # change directory to the directory above (if needed) Set-Location -Path "$PSScriptRoot\..\" From aeb7239415634537f09f42dcf5a8af9c3307d778 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Sat, 9 Dec 2023 22:18:24 +0100 Subject: [PATCH 2/2] Autobuild: Ensure JACK install completion Previously, the JACK installers were started as ordinary programs. As they are GUI applications, they detach from the console and the powershell build script (and Github Actions) continues. Therefore, once the actual build starts, the JACK installation may not have finished at all. This commit uses Powershell's Start-Process -Wait feature to wait for completion before continuing. Fixes: #3035 --- .github/autobuild/windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/autobuild/windows.ps1 b/.github/autobuild/windows.ps1 index 2d57ebafcf..e5ce90456e 100644 --- a/.github/autobuild/windows.ps1 +++ b/.github/autobuild/windows.ps1 @@ -183,7 +183,7 @@ Function Ensure-JACK $JACKInstallPath = "${DownloadCacheDir}\JACK64.exe" - & $JACKInstallPath $JACKInstallParms + Start-Process -Wait $JACKInstallPath -ArgumentList "$JACKInstallParms" if ( !$? ) { @@ -198,7 +198,7 @@ Function Ensure-JACK $JACKInstallPath = "${DownloadCacheDir}\JACK32.exe" - & $JACKInstallPath $JACKInstallParms + Start-Process -Wait $JACKInstallPath -ArgumentList "$JACKInstallParms" if ( !$? ) {