Skip to content

Commit e1bf733

Browse files
committed
Fix error reporting in Windows preset build job
ghstack-source-id: 8d72955 ghstack-comment-id: 3169485065 Pull-Request: #13247
1 parent 1bac361 commit e1bf733

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/build-presets.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,24 @@ jobs:
119119
set -eux
120120
conda init powershell
121121
powershell -Command "& {
122-
\$ErrorActionPreference = 'Stop'
123122
Set-PSDebug -Trace 1
123+
\$ErrorActionPreference = 'Stop'
124+
\$PSNativeCommandUseErrorActionPreference = \$true
124125
125126
conda create --yes --quiet -n et python=3.12
126127
conda activate et
127128
128129
python install_requirements.py
129130
cmake --preset ${{ matrix.preset }}
131+
if (\$LASTEXITCODE -ne 0) {
132+
Write-Host "CMake configuration was unsuccessful. Exit code: \$LASTEXITCODE."
133+
exit \$LASTEXITCODE
134+
}
135+
130136
\$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1
131137
cmake --build cmake-out -j \$numCores
138+
if (\$LASTEXITCODE -ne 0) {
139+
Write-Host "CMake build was unsuccessful. Exit code: \$LASTEXITCODE."
140+
exit \$LASTEXITCODE
141+
}
132142
}"

0 commit comments

Comments
 (0)