Author: rleigh
Date: Wed Jun 14 21:44:01 2017
New Revision: 1798779

URL: http://svn.apache.org/viewvc?rev=1798779&view=rev
Log:
ci: Add appveyor support for Cygwin, MinGW64 and MSVC14

Added:
    xerces/c/trunk/.appveyor.yml
    xerces/c/trunk/scripts/ci-appveyor-setup   (with props)

Added: xerces/c/trunk/.appveyor.yml
URL: 
http://svn.apache.org/viewvc/xerces/c/trunk/.appveyor.yml?rev=1798779&view=auto
==============================================================================
--- xerces/c/trunk/.appveyor.yml (added)
+++ xerces/c/trunk/.appveyor.yml Wed Jun 14 21:44:01 2017
@@ -0,0 +1,156 @@
+# 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
+    - compiler: cygwin
+      configuration: Debug
+      generator: Unix Makefiles
+      shared: OFF
+      network: OFF
+      netaccessor:
+      msgloader:
+      transcoder:
+    - compiler: mingw
+      configuration: Release
+      generator: Ninja
+      shared: ON
+      network: ON
+      netaccessor:
+      msgloader:
+      transcoder: windows
+    - compiler: mingw
+      configuration: Debug
+      generator: Ninja
+      shared: OFF
+      network:
+      netaccessor:
+      msgloader:
+      transcoder: iconv
+    - compiler: vc14
+      configuration: Release
+      generator: Visual Studio 14 2015 Win64
+      shared: ON
+      network: ON
+      netaccessor:
+      msgloader: icu
+      transcoder: windows
+    - compiler: vc14
+      configuration: Debug
+      generator: Visual Studio 14 2015 Win64
+      shared: OFF
+      network: OFF
+      netaccessor: winsock
+      msgloader: inmemory
+      transcoder: icu
+
+cache:
+  - 'c:\projects\download -> scripts/ci-appveyor-setup'
+  - 'c:\projects\icu -> scripts/ci-appveyor-setup'
+
+# 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
+  - '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" 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%"
+  - 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%'
+
+before_build:
+  - '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%
+
+artifacts:
+  - path: xerces-c.zip
+    name: xerces-c.zip

Added: xerces/c/trunk/scripts/ci-appveyor-setup
URL: 
http://svn.apache.org/viewvc/xerces/c/trunk/scripts/ci-appveyor-setup?rev=1798779&view=auto
==============================================================================
--- xerces/c/trunk/scripts/ci-appveyor-setup (added)
+++ xerces/c/trunk/scripts/ci-appveyor-setup Wed Jun 14 21:44:01 2017
@@ -0,0 +1,56 @@
+#!c:/cygwin64/bin/bash
+
+set -e
+set -x
+
+PATH="/cygdrive/c/cygwin64/bin:$PATH"
+
+download_file()
+(
+    url="$1"
+    file="$2"
+    hash="$3"
+    hash_output="${hash} *$file"
+
+  if [ ! -f "$file" ]; then
+    echo "Downloading $file"
+  else
+    if [ "$(sha512sum "$file")" != "$hash_output" ]; then
+      echo "$file sha512sum mismatch"
+    fi
+  fi
+
+  if [ ! -f "$file" ] || [ "$(sha512sum "$file")" != "$hash_output" ]; then
+    rm -f "$file"
+    curl -L -o "$file" "$url"
+  fi
+  [ "$(sha512sum "$file")" = "$hash_output" ]
+)
+
+icu_source=icu4c-59_1-src.zip
+icu_url="http://download.icu-project.org/files/icu4c/59.1/${icu_source}";
+icu_hash="1d3b39678e7cc4e9794e724982886a4918642231048eb76b9f683aad5a19e0b7c52b3b9c7107cb1a3879464682c4a3a97b58ab012d082bd9e5a80c67adf8ce8b"
+
+ninja_binary="ninja-win.zip"
+ninja_url="https://github.com/ninja-build/ninja/releases/download/v1.7.2/${ninja_binary}";
+ninja_hash="cccab9281b274c564f9ad77a2115be1f19be67d7b2ee14a55d1db1b27f3b68db8e76076e4f804b61eb8e573e26a8ecc9985675a8dcf03fd7a77b7f57234f1393"
+
+
+if [ "$msgloader" = "icu" ] || [ "$transcoder" = icu ]; then
+    cd "$AV_XERCES_CYG_DOWNLOAD"
+    download_file "$icu_url" "$icu_source" "$icu_hash"
+fi
+
+if [ "$msgloader" = "icu" ] || [ "$transcoder" = icu ]; then
+    cd "$AV_PROJECTS"
+    rm -rf icu
+    7z x "${AV_XERCES_DOWNLOAD}\\$icu_source"
+fi
+
+if [ "$generator" = "Ninja" ]; then
+    cd "$AV_XERCES_CYG_DOWNLOAD"
+    download_file "$ninja_url" "$ninja_binary" "$ninja_hash"
+    cd "$AV_XERCES_CYG_TOOLS"
+    rm -f ninja
+    7z e "${AV_XERCES_DOWNLOAD}\\$ninja_binary"
+fi

Propchange: xerces/c/trunk/scripts/ci-appveyor-setup
------------------------------------------------------------------------------
    svn:executable = *



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to