diff --git a/.ci/scripts/build.bat b/.ci/scripts/build.bat index d218464707c..76c78c620cd 100644 --- a/.ci/scripts/build.bat +++ b/.ci/scripts/build.bat @@ -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% @@ -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% diff --git a/.ci/scripts/test.bat b/.ci/scripts/test.bat index 74909f3652b..aaced0689be 100644 --- a/.ci/scripts/test.bat +++ b/.ci/scripts/test.bat @@ -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% @@ -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 @@ -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%