diff --git a/.github/workflows/build-presets.yml b/.github/workflows/build-presets.yml index b0455140f62..160c07af15e 100644 --- a/.github/workflows/build-presets.yml +++ b/.github/workflows/build-presets.yml @@ -6,8 +6,6 @@ on: branches: - main - release/* - paths: - - .github/workflows/build-presets.yml workflow_dispatch: concurrency: @@ -121,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 + } }"