From 16d54693a62bf2815edcbea9ba51ed2dd8f6e927 Mon Sep 17 00:00:00 2001 From: bergwerkgis Date: Mon, 21 Sep 2015 13:38:36 +0200 Subject: [PATCH] try AppVeyor skeleton --- appveyor.yml | 17 ++++++++++++ scripts/build-appveyor.bat | 53 ++++++++++++++++++++++++++++++++++++++ scripts/build-local.bat | 25 ++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 appveyor.yml create mode 100644 scripts/build-appveyor.bat create mode 100644 scripts/build-local.bat diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..eeffd3484 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,17 @@ +environment: + msvs_toolset: 14 + BOOST_VERSION: 58 + matrix: + - platform: x64 + configuration: Release + +os: Visual Studio 2015 + +shallow_clone: true + +install: + - scripts\build-appveyor.bat + +build: off +test: off +deploy: off diff --git a/scripts/build-appveyor.bat b/scripts/build-appveyor.bat new file mode 100644 index 000000000..d1fe4266a --- /dev/null +++ b/scripts/build-appveyor.bat @@ -0,0 +1,53 @@ +@ECHO OFF +SETLOCAL +SET EL=0 + +ECHO =========== %~f0 =========== + +SET PATH=C:\Python27;%PATH% +SET PATH=C:\Program Files\7-Zip;%PATH% + +if EXIST gyp ECHO gyp already cloned && GOTO GYP_ALREADY_HERE +CALL git clone https://chromium.googlesource.com/external/gyp.git gyp +IF %ERRORLEVEL% NEQ 0 GOTO ERROR +:GYP_ALREADY_HERE +CD gyp +IF %ERRORLEVEL% NEQ 0 GOTO ERROR +git pull +CD .. +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +SET DEPS_URL=https://mapbox.s3.amazonaws.com/windows-builds/windows-build-deps/mapnik-win-sdk-binary-deps-%msvs_toolset%.0-%platform%.7z +ECHO fetching binary deps^: %DEPS_URL% +IF EXIST deps.7z (ECHO already downloaded) ELSE (powershell Invoke-WebRequest "${env:DEPS_URL}" -OutFile deps.7z) +IF %ERRORLEVEL% NEQ 0 GOTO ERROR +ECHO extracting binary deps +IF EXIST mapnik-sdk (ECHO already extracted) ELSE (7z -y x deps.7z | %windir%\system32\FIND "ing archive") +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +SET MAPNIK_SDK=%APPVEYOR_BUILD_FOLDER%\mapnik-sdk + +ECHO generating solution file, calling gyp... +CALL gyp\gyp.bat mapnik.gyp --depth=. ^ + --debug=all ^ + -Dincludes=%MAPNIK_SDK%/include ^ + -Dlibs=%MAPNIK_SDK%/lib ^ + -Dconfiguration=%configuration% ^ + -Dplatform=%platform% ^ + -Dboost_version=1_%BOOST_VERSION% ^ + -f msvs -G msvs_version=2015 ^ + --generator-output=build +IF %ERRORLEVEL% NEQ 0 (ECHO error during solution file generation && GOTO ERROR) ELSE (ECHO solution file generated) + + +GOTO DONE + +:ERROR +ECHO =========== ERROR %~f0 =========== +ECHO ERRORLEVEL^: %ERRORLEVEL% +SET EL=%ERRORLEVEL% + +:DONE +ECHO =========== DONE %~f0 =========== + +EXIT /b %EL% diff --git a/scripts/build-local.bat b/scripts/build-local.bat new file mode 100644 index 000000000..6a2961d70 --- /dev/null +++ b/scripts/build-local.bat @@ -0,0 +1,25 @@ +@ECHO OFF +SETLOCAL +SET EL=0 + +ECHO =========== %~f0 =========== + +SET MAPNIK_GIT=3.0.5 +SET BOOST_VERSION=58 +SET msvs_toolset=14 +SET platform=x64 +SET APPVEYOR_BUILD_FOLDER=%CD% +CALL scripts\build-appveyor.bat +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +GOTO DONE + +:ERROR +ECHO =========== ERROR %~f0 =========== +ECHO ERRORLEVEL^: %ERRORLEVEL% +SET EL=%ERRORLEVEL% + +:DONE +ECHO =========== DONE %~f0 =========== + +EXIT /b %EL%