mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 18:55:10 +01:00
Merge pull request #3156 from sigiesec/add-cygwin64-ci
Add cygwin64 CI on Appveyor
This commit is contained in:
commit
7e6792ca74
@ -227,7 +227,11 @@ include (CMakeDependentOption)
|
||||
include (CheckCXXSymbolExists)
|
||||
include (CheckSymbolExists)
|
||||
|
||||
check_include_files (windows.h ZMQ_HAVE_WINDOWS)
|
||||
if (NOT CYGWIN)
|
||||
# TODO cannot we simply do 'if (WIN32) set(ZMQ_HAVE_WINDOWS ON)' or similar?
|
||||
check_include_files (windows.h ZMQ_HAVE_WINDOWS)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_SYSTEM_VERSION STREQUAL "10.0")
|
||||
SET(ZMQ_HAVE_WINDOWS_UWP ON)
|
||||
ADD_DEFINITIONS(-D_WIN32_WINNT=_WIN32_WINNT_WIN10)
|
||||
|
30
appveyor.yml
30
appveyor.yml
@ -65,9 +65,15 @@ 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
|
||||
allow_failures:
|
||||
- platform: cygwin64 # TODO allow failures until tests are fixed
|
||||
|
||||
init:
|
||||
- cmd: if "%NO_PR%"=="TRUE" (
|
||||
@ -83,8 +89,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 +122,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:
|
||||
|
Loading…
Reference in New Issue
Block a user