From a5fd7cf4e9928b6c91398c04f250b84658490c7a Mon Sep 17 00:00:00 2001 From: bergwerkgis Date: Tue, 16 Jun 2015 21:15:24 +0200 Subject: [PATCH] make AppVeyor green again --- .gitignore | 4 ++ appveyor-build.bat | 113 +++++++++++++++++++++++++++++++++++++++++++++ appveyor.yml | 39 +++------------- build-local.bat | 19 ++++++++ 4 files changed, 143 insertions(+), 32 deletions(-) create mode 100644 appveyor-build.bat create mode 100644 build-local.bat diff --git a/.gitignore b/.gitignore index 6ed5d2a4e..6264b4294 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# pre compiled dependencies # +############################# +osrm-deps + # Compiled source # ################### *.com diff --git a/appveyor-build.bat b/appveyor-build.bat new file mode 100644 index 000000000..eef29b1ba --- /dev/null +++ b/appveyor-build.bat @@ -0,0 +1,113 @@ +@ECHO OFF +SETLOCAL +SET EL=0 + +ECHO platform^: %platform% +:: HARDCODE "x64" as it is uppercase on AppVeyor and download from S3 is case sensitive +SET DEPSPKG=osrm-deps-win-x64-14.0.7z + +:: local development +IF "%computername%"=="MB" GOTO SKIPDL + +IF EXIST %DEPSPKG% DEL %DEPSPKG% +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +ECHO downloading %DEPSPKG% +powershell Invoke-WebRequest https://mapbox.s3.amazonaws.com/windows-builds/windows-deps/$env:DEPSPKG -OutFile C:\projects\osrm\$env:DEPSPKG +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +7z -y x %DEPSPKG% | %windir%\system32\FIND "ing archive" +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +:SKIPDL + +IF EXIST build rd /s /q build +IF %ERRORLEVEL% NEQ 0 GOTO ERROR +mkdir build +IF %ERRORLEVEL% NEQ 0 GOTO ERROR +cd build +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +SET OSRMDEPSDIR=c:\projects\osrm\osrm-deps +set PREFIX=%OSRMDEPSDIR%/libs +set BOOST_ROOT=%OSRMDEPSDIR%/boost +set TBB_INSTALL_DIR=%OSRMDEPSDIR%/tbb +set TBB_ARCH_PLATFORM=intel64/vc14 + +ECHO calling cmake .... +cmake .. ^ +-G "Visual Studio 14 Win64" ^ +-DBOOST_ROOT=%BOOST_ROOT% ^ +-DBoost_ADDITIONAL_VERSIONS=1.57 ^ +-DBoost_USE_MULTITHREADED=ON ^ +-DBoost_USE_STATIC_LIBS=ON ^ +-DCMAKE_BUILD_TYPE=%CONFIGURATION% ^ +-DCMAKE_INSTALL_PREFIX=%PREFIX% +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +ECHO building ... +msbuild OSRM.sln ^ +/p:Configuration=%Configuration% ^ +/p:Platform=x64 ^ +/t:rebuild ^ +/p:BuildInParallel=true ^ +/m:%NUMBER_OF_PROCESSORS% ^ +/toolsversion:14.0 ^ +/p:PlatformToolset=v140 ^ +/clp:Verbosity=normal ^ +/nologo ^ +/flp1:logfile=build_errors.txt;errorsonly ^ +/flp2:logfile=build_warnings.txt;warningsonly +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +ECHO ========= TODO^: CREATE PACKAGES ========== + +CD c:\projects\osrm\build\%Configuration% +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +SET PATH=c:\projects\osrm\osrm-deps\libs\bin;%PATH% + +ECHO running datastructure-tests.exe ... +datastructure-tests.exe +IF %ERRORLEVEL% NEQ 0 GOTO ERROR +ECHO running algorithm-tests.exe ... +algorithm-tests.exe +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +GOTO DONE + +:ERROR +SET EL=%ERRORLEVEL% +ECHO ============== ERROR =============== + +:DONE +ECHO ============= DONE =============== +CD C:\projects\osrm +EXIT /b %EL% + + + + + - cd c:/projects/osrm + - mkdir build + - cd build + - echo Running cmake... + - call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 + - SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH% + - SET P=c:/projects/osrm + - set TBB_INSTALL_DIR=%P%/tbb + - set TBB_ARCH_PLATFORM=intel64/vc12 + - cmake .. -G "Visual Studio 14 Win64" -DCMAKE_BUILD_TYPE=%Configuration% -DCMAKE_INSTALL_PREFIX=%P%/libs -DBOOST_ROOT=%P%/boost_min -DBoost_ADDITIONAL_VERSIONS=1.57 -DBoost_USE_STATIC_LIBS=ON + - SET PLATFORM_TOOLSET=v140 + - SET TOOLS_VERSION=14.0 + - msbuild /p:Platform=x64 /clp:Verbosity=minimal /toolsversion:%TOOLS_VERSION% /p:PlatformToolset=%PLATFORM_TOOLSET% /nologo OSRM.sln + - msbuild /p:Platform=x64 /clp:Verbosity=minimal /toolsversion:%TOOLS_VERSION% /p:PlatformToolset=%PLATFORM_TOOLSET% /nologo tests.vcxproj + - cd %Configuration% + - if "%APPVEYOR_REPO_BRANCH%"=="develop" (7z a %P%/osrm_%Configuration%.zip *.exe *.pdb %P%/libs/bin/*.dll -tzip) + - cd ..\..\profiles + - echo disk=c:\temp\stxxl,10000,wincall > .stxxl.txt + - if "%APPVEYOR_REPO_BRANCH%"=="develop" (7z a %P%/osrm_%Configuration%.zip * -tzip) + - set PATH=%PATH%;c:/projects/osrm/libs/bin + - cd c:/projects/osrm/build/%Configuration% + - datastructure-tests.exe + - algorithm-tests.exe diff --git a/appveyor.yml b/appveyor.yml index 38d07d0e0..cf45a3224 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,13 +1,13 @@ environment: matrix: - - configuration: Debug - configuration: Release +# - configuration: Debug # scripts that are called at very beginning, before repo cloning init: - git config --global core.autocrlf input -os: Visual Studio 2015 Preview +os: Visual Studio 2015 RC # clone directory clone_folder: c:\projects\osrm @@ -15,44 +15,19 @@ clone_folder: c:\projects\osrm platform: x64 install: - # by default, all script lines are interpreted as batch - - nuget install protobuf - - cd c:\projects\osrm - - curl -O http://build.project-osrm.org/libs_osrm_%Configuration%.7z - - 7z x libs_osrm_%Configuration%.7z | find ":" + - set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH% + - CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 build_script: - - cd c:/projects/osrm - - mkdir build - - cd build - - echo Running cmake... - - call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 - - SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH% - - SET P=c:/projects/osrm - - set TBB_INSTALL_DIR=%P%/tbb - - set TBB_ARCH_PLATFORM=intel64/vc12 - - cmake .. -G "Visual Studio 14 Win64" -DCMAKE_BUILD_TYPE=%Configuration% -DCMAKE_INSTALL_PREFIX=%P%/libs -DBOOST_ROOT=%P%/boost_min -DBoost_ADDITIONAL_VERSIONS=1.57 -DBoost_USE_STATIC_LIBS=ON - - SET PLATFORM_TOOLSET=v140 - - SET TOOLS_VERSION=14.0 - - msbuild /p:Platform=x64 /clp:Verbosity=minimal /toolsversion:%TOOLS_VERSION% /p:PlatformToolset=%PLATFORM_TOOLSET% /nologo OSRM.sln - - msbuild /p:Platform=x64 /clp:Verbosity=minimal /toolsversion:%TOOLS_VERSION% /p:PlatformToolset=%PLATFORM_TOOLSET% /nologo tests.vcxproj - - cd %Configuration% - - if "%APPVEYOR_REPO_BRANCH%"=="develop" (7z a %P%/osrm_%Configuration%.zip *.exe *.pdb %P%/libs/bin/*.dll -tzip) - - cd ..\..\profiles - - echo disk=c:\temp\stxxl,10000,wincall > .stxxl.txt - - if "%APPVEYOR_REPO_BRANCH%"=="develop" (7z a %P%/osrm_%Configuration%.zip * -tzip) - - set PATH=%PATH%;c:/projects/osrm/libs/bin - - cd c:/projects/osrm/build/%Configuration% - - datastructure-tests.exe - - algorithm-tests.exe + - CALL appveyor-build.bat test: off artifacts: - - path: osrm_Debug.zip - name: osrm_Debug.zip - path: osrm_Release.zip name: osrm_Release.zip +# - path: osrm_Debug.zip +# name: osrm_Debug.zip deploy: provider: FTP diff --git a/build-local.bat b/build-local.bat new file mode 100644 index 000000000..47a1fb3a6 --- /dev/null +++ b/build-local.bat @@ -0,0 +1,19 @@ +@ECHO OFF + +SET PLATFORM=x64 +SET CONFIGURATION=Release + +WHERE msbuild +IF %ERRORLEVEL% EQU 0 GOTO RUNBUILD + +SET PATH=C:\mb\windows-builds-64\tmp-bin\cmake-3.1.0-win32-x86\bin;%PATH% +SET PATH=C:\Program Files\7-Zip;%PATH% +ECHO activating VS command prompt ... +SET PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH% +CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 + +:RUNBUILD + +powershell Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force +CALL appveyor-build.bat +EXIT /b %ERRORLEVEL%