This commit is contained in:
Siarhei Fedartsou 2024-06-08 10:35:00 +02:00
parent 8a472b3aea
commit 01996f3e6e
2 changed files with 39 additions and 36 deletions

View File

@ -75,15 +75,25 @@ jobs:
# conan profile new default --detect || true # conan profile new default --detect || true
# conan profile update settings.compiler=clang default # conan profile update settings.compiler=clang default
- name: Build - name: Build
#shell: bash shell: bash
run: | run: |
.\scripts\ci\windows-build.bat #.\scripts\ci\windows-build.bat
# make --version # make --version
# clang --version # clang --version
# mkdir build mkdir build
# cd build cd build
# cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON .. cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON ..
# cmake --build . --config Release cmake --build . --config Release
cmake --build . --config Release --target tests
- name: Run tests
shell: bash
run: |
ls -R build
- name: Run tests
shell: bash
run: |
./build/unit_tests/Release/server-tests.exe
# .\scripts\ci\windows-build.bat # .\scripts\ci\windows-build.bat
# - name: Run node tests # - name: Run node tests

View File

@ -11,56 +11,49 @@ mkdir build
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
cd build cd build
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON .. cmake -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "Visual Studio 17 2022" ..
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
cmake --build . --config Release
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
@REM cmake -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "Visual Studio 17 2022" .. msbuild OSRM.sln ^
@REM IF %ERRORLEVEL% NEQ 0 GOTO ERROR /p:Configuration=%CONFIGURATION% ^
/p:Platform=x64 ^
@REM msbuild OSRM.sln ^ /t:rebuild ^
@REM /p:Configuration=%CONFIGURATION% ^ /p:BuildInParallel=true ^
@REM /p:Platform=x64 ^ /m:%NUMBER_OF_PROCESSORS% ^
@REM /t:rebuild ^ /toolsversion:Current ^
@REM /p:BuildInParallel=true ^ /clp:Verbosity=quiet ^
@REM /m:%NUMBER_OF_PROCESSORS% ^ /nologo
@REM /toolsversion:Current ^ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
@REM /clp:Verbosity=quiet ^
@REM /nologo
@REM IF %ERRORLEVEL% NEQ 0 GOTO ERROR
CD %PROJECT_DIR%\build CD %PROJECT_DIR%\build
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
dir /S
ECHO running extractor-tests.exe ... ECHO running extractor-tests.exe ...
unit_tests\extractor-tests.exe unit_tests\%CONFIGURATION%\extractor-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO running contractor-tests.exe ... ECHO running contractor-tests.exe ...
unit_tests\contractor-tests.exe unit_tests\%CONFIGURATION%\contractor-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO running engine-tests.exe ... ECHO running engine-tests.exe ...
unit_tests\engine-tests.exe unit_tests\%CONFIGURATION%\engine-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO running util-tests.exe ... ECHO running util-tests.exe ...
unit_tests\util-tests.exe unit_tests\%CONFIGURATION%\util-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO running server-tests.exe ... ECHO running server-tests.exe ...
unit_tests\server-tests.exe unit_tests\%CONFIGURATION%\server-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO running partitioner-tests.exe ... ECHO running partitioner-tests.exe ...
unit_tests\artitioner-tests.exe unit_tests\%CONFIGURATION%\partitioner-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO running customizer-tests.exe ... ECHO running customizer-tests.exe ...
unit_tests\customizer-tests.exe unit_tests\%CONFIGURATION%\customizer-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
SET test_region=monaco SET test_region=monaco
@ -68,7 +61,7 @@ SET test_region_ch=ch\monaco
SET test_region_mld=mld\monaco SET test_region_mld=mld\monaco
SET test_osm=%test_region%.osm.pbf SET test_osm=%test_region%.osm.pbf
COPY %PROJECT_DIR%\test\data\%test_region%.osm.pbf %test_osm% COPY %PROJECT_DIR%\test\data\%test_region%.osm.pbf %test_osm%
osrm-extract.exe -p %PROJECT_DIR%\profiles\car.lua %test_osm% %CONFIGURATION%\osrm-extract.exe -p %PROJECT_DIR%\profiles\car.lua %test_osm%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
MKDIR ch MKDIR ch
@ -77,12 +70,12 @@ XCOPY %test_region%.osrm ch\
MKDIR mld MKDIR mld
XCOPY %test_region%.osrm.* mld\ XCOPY %test_region%.osrm.* mld\
XCOPY %test_region%.osrm mld\ XCOPY %test_region%.osrm mld\
osrm-contract.exe %test_region_ch%.osrm %CONFIGURATION%\osrm-contract.exe %test_region_ch%.osrm
osrm-partition.exe %test_region_mld%.osrm %CONFIGURATION%\osrm-partition.exe %test_region_mld%.osrm
osrm-customize.exe %test_region_mld%.osrm %CONFIGURATION%\osrm-customize.exe %test_region_mld%.osrm
XCOPY /Y ch\*.* ..\test\data\ch\ XCOPY /Y ch\*.* ..\test\data\ch\
XCOPY /Y mld\*.* ..\test\data\mld\ XCOPY /Y mld\*.* ..\test\data\mld\
unit_tests\library-tests.exe unit_tests\%CONFIGURATION%\library-tests.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
:ERROR :ERROR