Skip to content

Commit

Permalink
[bug, CI] fix error handling in windows builds (#2802)
Browse files Browse the repository at this point in the history
* Update build.bat

* Update test.bat

* Update build.bat

* Update build.bat

* Update build.bat

* Update build.bat

* Update build.bat

* Update build.bat
  • Loading branch information
icfaust authored Jun 4, 2024
1 parent 00cfccb commit 7958b94
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
17 changes: 9 additions & 8 deletions .ci/scripts/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ rem %1 - Make target
rem %2 - Compiler
rem %3 - Instruction set

for /f "tokens=*" %%i in ('python -c "from multiprocessing import cpu_count; print(cpu_count())"') do set CPUCOUNT=%%i
echo CPUCOUNT=%CPUCOUNT%
set errorcode=0
echo CPUCOUNT=%NUMBER_OF_PROCESSORS%

echo PATH=C:\msys64\usr\bin;%PATH%
set PATH=C:\msys64\usr\bin;%PATH%
Expand All @@ -29,15 +29,16 @@ echo pacman -S --noconfirm msys/make msys/dos2unix
pacman -S --noconfirm msys/make msys/dos2unix

echo call .ci\env\tbb.bat
call .ci\env\tbb.bat
if "%TBBROOT%"=="" if not exist .\__deps\tbb\win\tbb call .ci\env\tbb.bat || set errorcode=1

echo call .\dev\download_micromkl.bat
call .\dev\download_micromkl.bat
if "%MKLGPUFPKROOT%"=="" if not exist .\__deps\mklgpufpk\win call .\dev\download_micromkl.bat || set errorcode=1

echo call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall" x64
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall" x64
if "%VISUALSTUDIOVERSION%"=="" call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall" x64 || set errorcode=1

echo make %1 -j%CPUCOUNT% COMPILER=%2 PLAT=win32e REQCPU=%3
make %1 -j%CPUCOUNT% COMPILER=%2 PLAT=win32e REQCPU=%3
echo make %1 -j%NUMBER_OF_PROCESSORS% COMPILER=%2 PLAT=win32e REQCPU=%3
make %1 -j%NUMBER_OF_PROCESSORS% COMPILER=%2 PLAT=win32e REQCPU=%3 || set errorcode=1

cmake -DINSTALL_DIR=__release_win_vc\daal\latest\lib\cmake\oneDAL -DARCH_DIR=intel64 -P cmake\scripts\generate_config.cmake
cmake -DINSTALL_DIR=__release_win_vc\daal\latest\lib\cmake\oneDAL -DARCH_DIR=intel64 -P cmake\scripts\generate_config.cmake || set errorcode=1
EXIT /B %errorcode%
9 changes: 5 additions & 4 deletions .ci/scripts/test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ echo PATH=C:\msys64\usr\bin;%PATH%
set PATH=C:\msys64\usr\bin;%PATH%

echo call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall" x64
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall" x64
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall" x64 || set errorcode=1

echo call __release_win_vc\daal\latest\env\vars.bat
call __release_win_vc\daal\latest\env\vars.bat
call __release_win_vc\daal\latest\env\vars.bat || set errorcode=1

echo set LIB=%~dp0..\..\__release_win_vc\tbb\latest\lib\intel64\vc_mt;%LIB%
set LIB=%~dp0..\..\__release_win_vc\tbb\latest\lib\intel64\vc_mt;%LIB%
Expand Down Expand Up @@ -69,9 +69,9 @@ if "%build_system%"=="cmake" (

set results_dir=_cmake_results\intel_intel64_%cmake_link_mode_short%\Release
echo cmake -B Build -S . -DONEDAL_LINK=%cmake_link_mode% -DTBB_DIR=%TBB_DIR%
cmake -B Build -S . -DONEDAL_LINK=%cmake_link_mode% -DTBB_DIR=%TBB_DIR%
cmake -B Build -S . -DONEDAL_LINK=%cmake_link_mode% -DTBB_DIR=%TBB_DIR% || set errorcode=1
set solution_name=%examples:\=_%
msbuild.exe "Build\!solution_name!_examples.sln" /p:Configuration=Release
msbuild.exe "Build\!solution_name!_examples.sln" /p:Configuration=Release || set errorcode=1

for /f "delims=." %%F in ('dir /B !results_dir!\*.exe 2^> nul') do (
set example=%%F
Expand Down Expand Up @@ -100,3 +100,4 @@ if "%build_system%"=="cmake" (
if "%examples%"=="daal\cpp" nmake %linking% compiler=%compiler%
if "%examples%"=="oneapi\cpp" nmake %linking% compiler=%compiler%
)
EXIT /B %errorcode%

0 comments on commit 7958b94

Please # to comment.