0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 06:41:03 +08:00

Problem: no CI for cygwin

Solution: add cygwin build
This commit is contained in:
Simon Giesecke 2018-05-24 14:05:22 +02:00
parent d07ddb1bce
commit c5d422c02b

View File

@ -65,6 +65,10 @@ environment:
CMAKE_GENERATOR: "Visual Studio 15 2017"
MSVCVERSION: "v141"
MSVCYEAR: "vs2017"
- platform: cygwin64
WITH_LIBSODIUM: OFF
ENABLE_CURVE: ON
CMAKE_GENERATOR: "Unix Makefiles"
matrix:
fast_finish: false
@ -83,8 +87,11 @@ init:
cache:
- C:\projects\libsodium
- C:\cygwin64\var\cache\setup
install:
- cmd: if "%Platform%"=="cygwin64" C:\cygwin64\setup-x86_64.exe --quiet-mode --no-shortcuts --upgrade-also --packages cmake,cygwin-devel,gcc-g++,libncurses-devel,make,pkg-config
- cmd: if "%Platform%"=="cygwin64" set PATH=C:\cygwin64\bin;%PATH%
- cmd: if "%Platform%"=="x64" set "CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64"
- cmd: echo "Generator='%CMAKE_GENERATOR%'"
- cmd: echo "Platform='%Platform%'"
@ -113,15 +120,26 @@ before_build:
# - cmd: set BUILDLOG="%LIBZMQ_SRCDIR%\build.log"
- cmd: md "%LIBZMQ_BUILDDIR%"
- cd "%LIBZMQ_BUILDDIR%"
- cmd: cmake -D CMAKE_INCLUDE_PATH="%SODIUM_INCLUDE_DIR%" -D CMAKE_LIBRARY_PATH="%SODIUM_LIBRARY_DIR%" -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D ENABLE_DRAFTS="%ENABLE_DRAFTS%" -D ENABLE_ANALYSIS="%ENABLE_ANALYSIS%" -D ENABLE_CURVE="%ENABLE_CURVE%" -D API_POLLER="%API_POLLER%" -D POLLER="%POLLER%" -D CMAKE_C_FLAGS_RELEASE="/MT" -D CMAKE_C_FLAGS_DEBUG="/MTd" -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -G "%CMAKE_GENERATOR%" "%APPVEYOR_BUILD_FOLDER%"
- cmd: if "%PLATFORM%" == "cygwin64" set APPVEYOR_BUILD_FOLDER=/cygdrive/C/projects/libzmq
- cmd: if "%PLATFORM%" NEQ "cygwin64" set EXTRA_FLAGS='-D CMAKE_C_FLAGS_RELEASE="/MT" -D CMAKE_C_FLAGS_DEBUG="/MTd"'
- cmd: cmake -D CMAKE_INCLUDE_PATH="%SODIUM_INCLUDE_DIR%" -D CMAKE_LIBRARY_PATH="%SODIUM_LIBRARY_DIR%" -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D ENABLE_DRAFTS="%ENABLE_DRAFTS%" -D ENABLE_ANALYSIS="%ENABLE_ANALYSIS%" -D ENABLE_CURVE="%ENABLE_CURVE%" -D API_POLLER="%API_POLLER%" -D POLLER="%POLLER%" %EXTRA_FLAGS% -D WITH_LIBSODIUM="%WITH_LIBSODIUM%" -D LIBZMQ_WERROR="ON" -G "%CMAKE_GENERATOR%" "%APPVEYOR_BUILD_FOLDER%"
- cmd: cd "%LIBZMQ_SRCDIR%"
build_script:
- cmd: if "%MSVCYEAR%"=="vs2008" (
cmake --build %LIBZMQ_BUILDDIR% --config %configuration% --target install
) else (
cmake --build %LIBZMQ_BUILDDIR% --config %configuration% --target install -- -verbosity:Minimal -maxcpucount -logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- cmd: set verbosity=Minimal
- cmd: if "%MSVCYEAR%"=="vs2008" set verbosity=Normal
- cmd: if "%MSVCYEAR%"=="vs2008" set path=C:\Windows\Microsoft.NET\Framework\v3.5;%path%
- cmd: cd "%LIBZMQ_BUILDDIR%"
- cmd: if "%PLATFORM%" NEQ "cygwin64" (
if "%MSVCYEAR%"=="vs2008" (
cmake --build %LIBZMQ_BUILDDIR% --config %configuration% --target install
) else (
cmake --build %LIBZMQ_BUILDDIR% --config %configuration% --target install -- -verbosity:Minimal -maxcpucount -logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
)
)
- cmd: if "%PLATFORM%" == "cygwin64" cmake --build . -- -j5
# TODO this is definitely not the optimal place&way to do this
- cmd: if "%PLATFORM%" == "cygwin64" cp lib/libzmq-5.dll bin
# TODO this does not work with sonarcloud.io, as it misses the sonar-cxx plugin
# build_script: