ci-windows-build.bat 1.23 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
@echo off
::########################################
::# Fetch test data
::########################################
rmdir /Q /S TestData
:: clone libraries git (set env variable to GIT_SSH_COMMAND maybe use setx once as this key won't change) 
set GIT_SSH_COMMAND=ssh -i E:\\\gitlab\\\id_rsa 
git clone git@roosevelt.informatik.rwth-aachen.de:moebius/OpenFlipper-Test-Data.git TestData

::load configuration and settings
call %~dp0\ci-windows-config.bat

mkdir rel
cd rel

::clear any old binary files
del *.exe

::invoke cmake
Jan Möbius's avatar
Jan Möbius committed
20
"C:\Program Files\CMake\bin\cmake.exe"  -DGTEST_PREFIX="%LIBPATH_BASE%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%"  -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE %CMAKE_CONFIGURATION% ..
21 22 23 24 25 26 27

IF %errorlevel% NEQ 0 exit /b %errorlevel%

:: build Open-Flipper

%VS_PATH% /Build "Release" OpenFlipper.sln /Project "ALL_BUILD"

28 29 30 31 32 33 34 35 36 37 38
IF %errorlevel% NEQ 0 exit /b %errorlevel%

:: back to the root folder
cd ..

:: copy all files to a new artifacts folder except the .git folder
:: use the following options to make robocopy silent /NFL /NDL /NJH /NJS /nc /ns /np
robocopy . artifacts /e /NFL /NDL /NJH /NJS /nc /ns /np /xd artifacts /xd .git

::robocopy uses some error codes different from 0 
IF %errorlevel% LSS 8 exit /b 0