diff --git a/.github/workflows/build-presets.yml b/.github/workflows/build-presets.yml index c4318e3daa5..160c07af15e 100644 --- a/.github/workflows/build-presets.yml +++ b/.github/workflows/build-presets.yml @@ -119,14 +119,24 @@ jobs: set -eux conda init powershell powershell -Command "& { - \$ErrorActionPreference = 'Stop' Set-PSDebug -Trace 1 + \$ErrorActionPreference = 'Stop' + \$PSNativeCommandUseErrorActionPreference = \$true conda create --yes --quiet -n et python=3.12 conda activate et python install_requirements.py cmake --preset ${{ matrix.preset }} + if (\$LASTEXITCODE -ne 0) { + Write-Host "CMake configuration was unsuccessful. Exit code: \$LASTEXITCODE." + exit \$LASTEXITCODE + } + \$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1 cmake --build cmake-out -j \$numCores + if (\$LASTEXITCODE -ne 0) { + Write-Host "CMake build was unsuccessful. Exit code: \$LASTEXITCODE." + exit \$LASTEXITCODE + } }"