Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 38 additions & 33 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
image: Visual Studio 2017
image: Visual Studio 2019

platform:
- x64

environment:
matrix:
# VS 2017
- VS_VERSION: Visual Studio 15 2017
- VS_VERSION: Visual Studio 16 2019

shallow_clone: true

build_script:
- echo build_script
- if "%platform%" == "x64" SET VS_FULL=%VS_VERSION% Win64
- set "BUILD_FOLDER=%APPVEYOR_BUILD_FOLDER:\=/%"
- if "%platform%" == "x64" SET VS_FULL=%VS_VERSION%
- if "%platform%" == "x64" SET VS_ARCH=x64
- if "%platform%" == "x86" SET VS_FULL=%VS_VERSION%
- if "%platform%" == "x86" SET SDK=release-1911
- if "%platform%" == "x64" SET SDK=release-1911-x64
- if "%platform%" == "x86" SET VS_ARCH=Win32
- if "%platform%" == "x86" SET SDK=release-1928
- if "%platform%" == "x64" SET SDK=release-1928-x64
- if "%platform%" == "x64" call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvars64.bat"
- if "%platform%" == "x86" call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvars32.bat"
- echo "%VS_FULL%"
- if "%platform%" == "x64" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- if "%platform%" == "x86" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
- set SDK_ZIP=%SDK%-dev.zip
- set SDK_URL=http://download.gisinternals.com/sdk/downloads/%SDK_ZIP%
- echo "%SDK_ZIP%"
Expand All @@ -28,14 +30,14 @@ build_script:
- appveyor DownloadFile "%SDK_URL%"
- 7z x "%SDK_ZIP%" > nul
- cd %SDK%
- cd lib
- copy libpng.lib libpng.lib.lib
#- cd lib
#- copy libpng.lib libpng.lib.lib
- cd %APPVEYOR_BUILD_FOLDER%
- set SDK_PREFIX=%CD%\sdk\%SDK%
- set SDK_INC=%CD%\sdk\%SDK%\include
- set SDK_LIB=%CD%\sdk\%SDK%\lib
- set SDK_BIN=%CD%\sdk\%SDK%\bin
- set REGEX_DIR=%CD%\sdk\regex-0.12
- set SDK_PREFIX=%BUILD_FOLDER%/sdk/%SDK%
- set SDK_INC=%BUILD_FOLDER%/sdk/%SDK%/include
- set SDK_LIB=%BUILD_FOLDER%/sdk/%SDK%/lib
- set SDK_BIN=%BUILD_FOLDER%/sdk/%SDK%/bin
- set REGEX_DIR=%BUILD_FOLDER%/sdk/support/regex-0.12

- if not exist apr-1.6.3-win32-src.zip appveyor DownloadFile https://archive.apache.org/dist/apr/apr-1.6.3-win32-src.zip
- 7z x apr-1.6.3-win32-src.zip
Expand Down Expand Up @@ -96,42 +98,45 @@ build_script:
- nmake
- nmake install

- copy %SDK_PREFIX%\lib\libfcgi.lib %SDK_PREFIX%\lib\fcgi.lib /Y > nul
- copy %SDK_PREFIX%\lib\apr-1.lib %SDK_PREFIX%\lib\apr-1-1.lib /Y > nul
- copy %SDK_PREFIX%\lib\libapr-1.lib %SDK_PREFIX%\lib\apr-1.lib /Y > nul
- copy %SDK_PREFIX%\lib\aprutil-1.lib %SDK_PREFIX%\lib\aprutil-1-1.lib /Y > nul
- copy %SDK_PREFIX%\lib\libaprutil-1.lib %SDK_PREFIX%\lib\aprutil-1.lib /Y > nul
- xcopy %REGEX_DIR%\*.h %SDK_PREFIX%\include\ /O /X /E /H /K /Y > nul
- echo %SDK_LIB%
- cd %SDK_LIB%
- dir
- copy "%SDK_LIB%/libfcgi.lib" "%SDK_LIB%/fcgi.lib" /Y
- copy "%SDK_LIB%/apr-1.lib" "%SDK_LIB%/apr-1-1.lib" /Y
- copy "%SDK_LIB%/libapr-1.lib" "%SDK_LIB%/apr-1.lib" /Y > nul
- copy "%SDK_LIB%/aprutil-1.lib" "%SDK_LIB%/aprutil-1-1.lib" /Y > nul
- copy "%SDK_LIB%/libaprutil-1.lib" "%SDK_LIB%/aprutil-1.lib" /Y > nul
- xcopy "%REGEX_DIR%/*.h" "%SDK_INC%" /O /X /E /H /K /Y > nul

- cd %APPVEYOR_BUILD_FOLDER%

- mkdir build
- cd build
- cmake -G "%VS_FULL%"
- cmake -G "%VS_FULL%" -A %VS_ARCH%
-DWITH_APACHE=OFF
-DWITH_FCGI=ON
-DWITH_PCRE=ON
-DWITH_TIFF=OFF
-DCMAKE_PREFIX_PATH=%SDK_PREFIX% ..
- cmake --build . --config Release

- copy %SDK_PREFIX%\lib\apr-1-1.lib %SDK_PREFIX%\lib\apr-1.lib /Y > nul
- copy %SDK_PREFIX%\lib\aprutil-1-1.lib %SDK_PREFIX%\lib\aprutil-1.lib /Y > nul
- copy %SDK_PREFIX%\bin\libapr-1.dll %SDK_PREFIX%\bin\apr-1.dll /Y > nul
- copy %SDK_PREFIX%\bin\libaprutil-1.dll %SDK_PREFIX%\bin\aprutil-1.dll /Y > nul
- copy %SDK_PREFIX%\bin\libfcgi.dll %SDK_PREFIX%\bin\fcgi.dll /Y > nul
- copy Release\*dll %SDK_PREFIX%\bin\ /Y > nul
- copy Release\*lib %SDK_PREFIX%\lib\ /Y > nul
- copy cgi\Release\*exe %SDK_PREFIX%\bin\ /Y > nul
- copy util\Release\*exe %SDK_PREFIX%\bin\ /Y > nul
- copy "%SDK_LIB%\apr-1-1.lib" "%SDK_LIB%\apr-1.lib" /Y > nul
- copy "%SDK_LIB%\aprutil-1-1.lib" "%SDK_LIB%\aprutil-1.lib" /Y > nul
- copy "%SDK_BIN%\libapr-1.dll" "%SDK_BIN%\apr-1.dll" /Y > nul
- copy "%SDK_BIN%\libaprutil-1.dll" "%SDK_BIN%\aprutil-1.dll" /Y > nul
- copy "%SDK_BIN%\libfcgi.dll" "%SDK_BIN%\fcgi.dll" /Y > nul
- copy "Release\*dll" "%SDK_BIN%" /Y > nul
- copy "Release\*lib" "%SDK_LIB%" /Y > nul
- copy "cgi\Release\*exe" "%SDK_BIN%" /Y > nul
- copy "util\Release\*exe" "%SDK_BIN%" /Y > nul

after_build:
- cd %SDK_PREFIX%\bin
- cd %SDK_BIN%
- 7z a %APPVEYOR_BUILD_FOLDER%\mapcache.zip libapr*.dll apr*.dll pcre.dll pcreposix.dll mapcache.dll
mapcache.fcgi.exe mapcache_seed.exe %APPVEYOR_BUILD_FOLDER%\mapcache.xml

test_script:
- cd %SDK_PREFIX%\bin
- cd %SDK_BIN%
- set MAPCACHE_CONFIG_FILE=mapcache.xml
- set PATH_INFO="/"
- set REQUEST_METHOD=GET
Expand Down