blob: f3e52f1be077d3920fd75b2053a872a13a5a1437 [file] [log] [blame]
# Possible test configurations for comprehensive feature coverage:
#
# Cygwin
# ------
# 1) -Dnetwork:BOOL=ON -Dnetwork-accessor=curl -Dmessage-loader=icu -Dtranscoder=iconv
# 2) -Dnetwork:BOOL=ON -Dnetwork-accessor=socket -Dmessage-loader=inmemory -Dtranscoder=icu
# 3) -Dnetwork:BOOL=OFF"
# 4) (none)
#
# MinGW
# -----
# 1) -Dnetwork:BOOL=ON -Dtranscoder=iconv
# 2) -Dnetwork:BOOL=ON -Dtranscoder=windows
# 3) -Dnetwork:BOOL=OFF
# 4) (none)
#
# MSVC
# ----
# 1) -Dnetwork:BOOL=ON -Dmessage-loader=icu -Dtranscoder=iconv
# 2) -Dnetwork:BOOL=ON -Dnetwork-accessor=winsock -Dmessage-loader=inmemory -Dtranscoder=icu
# 3) -Dnetwork:BOOL=ON -Dtranscoder=windows
# 4) -Dnetwork:BOOL=OFF
# 5) (none)
#
# To keep the test matrix size manageable, only a subset of these are
# used, to test each settable option, but not in every possible
# combination.
environment:
AV_PROJECTS: 'c:\projects'
AV_XERCES_DOWNLOAD: 'c:\projects\download'
AV_XERCES_TOOLS: 'c:\projects\tools'
AV_XERCES_SOURCE: 'c:\projects\xerces-c'
AV_XERCES_BUILD: 'c:\projects\build'
AV_XERCES_INSTALL: 'c:/projects/libs'
matrix:
- compiler: cygwin
configuration: Release
generator: Unix Makefiles
shared: ON
network: ON
netaccessor: curl
msgloader: inmemory
transcoder: iconv
mutexmanager: posix
xmlch: uint16_t
- compiler: cygwin
configuration: Debug
generator: Unix Makefiles
shared: OFF
network: OFF
netaccessor:
msgloader:
transcoder:
mutexmanager: standard
xmlch: char16_t
- compiler: mingw
configuration: Release
generator: Ninja
shared: ON
network: ON
netaccessor:
msgloader:
transcoder: windows
mutexmanager: windows
xmlch: wchar_t
- compiler: mingw
configuration: Debug
generator: Ninja
shared: OFF
network:
netaccessor:
msgloader:
transcoder: iconv
mutexmanager:
xmlch: uint16_t
- compiler: vc14
configuration: Release
generator: Visual Studio 14 2015 Win64
shared: ON
network: ON
netaccessor:
msgloader: icu
transcoder: windows
mutexmanager: windows
xmlch: wchar_t
mfc: ON
- compiler: vc14
configuration: Debug
generator: Visual Studio 14 2015 Win64
shared: OFF
network: OFF
netaccessor: winsock
msgloader: inmemory
transcoder: icu
mutexmanager: standard
xmlch: char16_t
mfc: OFF
# Operating system (build VM template)
os: 'Visual Studio 2015'
# clone directory
clone_folder: 'c:\projects\xerces-c'
clone_depth: 5
platform: x64
init:
- git config --global core.autocrlf input
before_build:
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_DOWNLOAD%`) DO SET AV_XERCES_CYG_DOWNLOAD=%%F'
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_TOOLS%`) DO SET AV_XERCES_CYG_TOOLS=%%F'
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_SOURCE%`) DO SET AV_XERCES_CYG_SOURCE=%%F'
- 'FOR /F "tokens=* USEBACKQ" %%F IN (`C:\cygwin64\bin\cygpath -u %AV_XERCES_INSTALL%`) DO SET AV_XERCES_CYG_INSTALL=%%F'
- 'if NOT EXIST "%AV_XERCES_DOWNLOAD%\" mkdir %AV_XERCES_DOWNLOAD%'
- 'if NOT EXIST "%AV_XERCES_TOOLS%\" mkdir %AV_XERCES_TOOLS%'
- 'if %compiler%==cygwin C:\Cygwin64\setup-x86_64 -q -R C:\Cygwin64 -s http://cygwin.mirror.constant.com -l %AV_XERCES_DOWNLOAD%\cygwin -P libcurl-devel,cmake'
- if [%msgloader%] == [icu] set AV_ICU_BUILD=true
- if [%transcoder%] == [icu] set AV_ICU_BUILD=true
- 'if EXIST "%AV_PROJECTS%\icu" set AV_ICU_BUILD=false'
- 'set "PATH=C:\Program Files (x86)\cmake\bin;%AV_XERCES_TOOLS%;%PATH%"'
- 'if %compiler%==cygwin set "PATH=C:\Cygwin64\bin;%PATH%"'
- 'if %compiler%==mingw set "PATH=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%"'
- set "AV_CMAKE_ARGS=-DBUILD_SHARED_LIBS:BOOL=%shared%"
- set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dnetwork:BOOL=%network%"
- if NOT [%netaccessor%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dnetwork-accessor=%netaccessor%"
- if NOT [%msgloader%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dmessage-loader=%msgloader%"
- if NOT [%transcoder%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dtranscoder=%transcoder%"
- if NOT [%mutexmanager%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dmutex-manager=%mutexmanager%"
- if NOT [%xmlch%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dxmlch-type=%xmlch%"
- if NOT [%mfc%] == [] set "AV_CMAKE_ARGS=%AV_CMAKE_ARGS% -Dmfc-debug=%mfc%"
- set "AV_XERCES_CMAKE_SOURCE=%AV_XERCES_SOURCE%"
- set "AV_XERCES_CMAKE_INSTALL=%AV_XERCES_INSTALL%"
- 'if %compiler%==cygwin set "AV_XERCES_CMAKE_SOURCE=%AV_XERCES_CYG_SOURCE%'
- 'if %compiler%==cygwin set "AV_XERCES_CMAKE_INSTALL=%AV_XERCES_CYG_INSTALL%'
- 'C:\cygwin64\bin\bash %AV_XERCES_CYG_SOURCE%/scripts/ci-appveyor-setup'
- set ICU_PLATFORM=x64
- if [%platform%] == [x86] set ICU_PLATFORM=Win32
- 'if [%AV_ICU_BUILD%] == [true] cd "%AV_PROJECTS%\icu"'
- 'if [%AV_ICU_BUILD%] == [true] echo "Running msbuild to build ICU"'
- 'if [%AV_ICU_BUILD%] == [true] call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %platform%'
- 'if [%AV_ICU_BUILD%] == [true] msbuild source\allinone\allinone.sln /p:Configuration=%configuration% /p:Platform=%ICU_PLATFORM% /m'
- 'if [%AV_ICU_BUILD%] == [true] set "PATH=%AV_PROJECTS%\icu\bin;%AV_PROJECTS%\icu\bin64;%PATH%"'
- 'if [%AV_ICU_BUILD%] == [true] set "CMAKE_PREFIX_PATH=%AV_PROJECTS%\icu"'
- mkdir %AV_XERCES_BUILD%
- cd %AV_XERCES_BUILD%
- echo Running cmake -G "%generator%" -DCMAKE_INSTALL_PREFIX=%AV_XERCES_CMAKE_INSTALL% -DCMAKE_BUILD_TYPE=%configuration% %AV_XERCES_CMAKE_SOURCE%
- cmake -G "%generator%" -DCMAKE_INSTALL_PREFIX=%AV_XERCES_CMAKE_INSTALL% -DCMAKE_BUILD_TYPE=%configuration% %AV_CMAKE_ARGS% %AV_XERCES_CMAKE_SOURCE%
build_script:
- cd %AV_XERCES_BUILD%
- cmake --build . --config %configuration%
- cmake --build . --config %configuration% --target install
after_build:
- cd %AV_XERCES_INSTALL%
- '7z a %AV_XERCES_SOURCE%\xerces-c.zip * -tzip'
before_test:
- cd %AV_XERCES_BUILD%
- ctest -V -C %configuration%