From 1666f157eb9b3fbee24038b5372b9f3da4164b6b Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 28 Jul 2023 17:22:16 +0200 Subject: [PATCH] Return or throw HRESULTs from published samples --- .github/workflows/dotnet.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index af42466a1..f13a561e5 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -243,7 +243,8 @@ jobs: sleep -Seconds 2; $process.CloseMainWindow() | Out-Null; $process.WaitForExit(); - $process.ExitCode + if ($process.ExitCode < 0) throw $process.ExitCode; + return $process.ExitCode; # Upload the binary (to track binary size trends) - if: matrix.platform == 'x64' @@ -271,7 +272,8 @@ jobs: sleep -Seconds 2; $process.CloseMainWindow() | Out-Null; $process.WaitForExit(); - $process.ExitCode + if ($process.ExitCode < 0) throw $process.ExitCode; + return $process.ExitCode; # Upload the binary again (with a different name) - if: matrix.platform == 'x64' @@ -297,7 +299,8 @@ jobs: sleep -Seconds 2; $process.CloseMainWindow() | Out-Null; $process.WaitForExit(); - $process.ExitCode + if ($process.ExitCode < 0) throw $process.ExitCode; + return $process.ExitCode; # Download the NuGet packages generated in the previous job and use them # to build and run the sample project referencing them. This is used as