From 7b6b782c443fbfc178bafe658ef8db5d0f48b1b8 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Thu, 20 Jan 2022 11:16:11 +0100 Subject: [PATCH] GitHub CI [Windows, XIMEA]: kill installer forcibly after 300 s --- .github/scripts/Windows/prepare.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/scripts/Windows/prepare.ps1 b/.github/scripts/Windows/prepare.ps1 index 64800d345..f5ae1a915 100644 --- a/.github/scripts/Windows/prepare.ps1 +++ b/.github/scripts/Windows/prepare.ps1 @@ -16,7 +16,13 @@ if (!${env:no_cuda}) { } # Install XIMEA -Start-Process -FilePath C:\XIMEA_API_Installer.exe -ArgumentList "/S /SecXiApi=ON" -Wait +$proc = Start-Process -FilePath C:\XIMEA_API_Installer.exe -ArgumentList "/S /SecXiApi=ON" -PassThru +$proc | Wait-Process -Timeout 300 -ErrorAction SilentlyContinue -ErrorVariable timeouted +if ($timeouted) { + # terminate the process + $proc | kill + throw "XIMEA install timeout" +} # Install NDI # TODO: NDI installer opens a manual in a browser and doesn't end, thus StartProcess with -Wait