mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
33ba7e14b3
Solution: disabled parallel testing for these VS versions
184 lines
7.3 KiB
YAML
184 lines
7.3 KiB
YAML
version: build-{build}
|
|
|
|
shallow_clone: true
|
|
|
|
skip_tags: true
|
|
|
|
os: Visual Studio 2013
|
|
|
|
environment:
|
|
CMAKE_GENERATOR: "Visual Studio 12 2013"
|
|
MSVCVERSION: "v120"
|
|
MSVCYEAR: "vs2013"
|
|
matrix:
|
|
- platform: Win32
|
|
configuration: Release
|
|
WITH_LIBSODIUM: OFF # unavailable build files for VS2008
|
|
ENABLE_CURVE: ON
|
|
CMAKE_GENERATOR: "Visual Studio 9 2008"
|
|
MSVCVERSION: "v90"
|
|
MSVCYEAR: "vs2008"
|
|
- platform: Win32
|
|
configuration: Release
|
|
WITH_LIBSODIUM: ON
|
|
ENABLE_CURVE: ON
|
|
CMAKE_GENERATOR: "Visual Studio 10 2010"
|
|
MSVCVERSION: "v100"
|
|
MSVCYEAR: "vs2010"
|
|
- platform: Win32
|
|
configuration: Release
|
|
WITH_LIBSODIUM: ON
|
|
ENABLE_CURVE: ON
|
|
- platform: Win32
|
|
configuration: Release
|
|
API_POLLER: poll
|
|
WITH_LIBSODIUM: ON
|
|
ENABLE_CURVE: ON
|
|
- platform: Win32
|
|
configuration: Release
|
|
POLLER: epoll
|
|
WITH_LIBSODIUM: ON
|
|
ENABLE_CURVE: ON
|
|
- platform: Win32
|
|
configuration: Debug
|
|
WITH_LIBSODIUM: ON
|
|
ENABLE_CURVE: ON
|
|
- platform: x64
|
|
configuration: Release
|
|
WITH_LIBSODIUM: ON
|
|
ENABLE_CURVE: ON
|
|
- platform: x64
|
|
configuration: Debug
|
|
WITH_LIBSODIUM: ON
|
|
ENABLE_CURVE: ON
|
|
- platform: Win32
|
|
configuration: Release
|
|
WITH_LIBSODIUM: OFF
|
|
ENABLE_CURVE: OFF
|
|
- platform: Win32
|
|
configuration: Release
|
|
WITH_LIBSODIUM: OFF
|
|
ENABLE_CURVE: ON
|
|
- platform: Win32
|
|
configuration: Release
|
|
WITH_LIBSODIUM: ON
|
|
ENABLE_CURVE: ON
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
|
CMAKE_GENERATOR: "Visual Studio 14 2015"
|
|
MSVCVERSION: "v140"
|
|
MSVCYEAR: "vs2015"
|
|
- platform: Win32
|
|
configuration: Release
|
|
WITH_LIBSODIUM: ON
|
|
ENABLE_CURVE: ON
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
|
CMAKE_GENERATOR: "Visual Studio 15 2017"
|
|
MSVCVERSION: "v141"
|
|
MSVCYEAR: "vs2017"
|
|
|
|
matrix:
|
|
fast_finish: false
|
|
|
|
init:
|
|
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
|
- cmake --version
|
|
- msbuild /version
|
|
- cmd: reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f
|
|
|
|
cache:
|
|
- C:\projects\libsodium
|
|
|
|
install:
|
|
- cmd: if "%ENABLE_ANALYSIS%"=="ON" ( if "%APPVEYOR_PULL_REQUEST_NUMBER%" NEQ "" appveyor exit )
|
|
- cmd: if "%Platform%"=="x64" set "CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64"
|
|
- cmd: echo "Generator='%CMAKE_GENERATOR%'"
|
|
- cmd: echo "Platform='%Platform%'"
|
|
- cmd: if "%WITH_LIBSODIUM%"=="ON" set LIBSODIUMDIR=C:\projects\libsodium
|
|
- if "%WITH_LIBSODIUM%"=="ON" (
|
|
if not exist "%LIBSODIUMDIR%" (
|
|
git clone --branch stable --depth 1 --quiet "https://github.com/jedisct1/libsodium.git" %LIBSODIUMDIR%
|
|
) else (
|
|
cd "%LIBSODIUMDIR%" &&
|
|
git pull
|
|
)
|
|
)
|
|
- cmd: if "%WITH_LIBSODIUM%"=="ON" msbuild /v:minimal /maxcpucount:%NUMBER_OF_PROCESSORS% /p:Configuration=%Configuration%DLL %LIBSODIUMDIR%\builds\msvc\%MSVCYEAR%\libsodium\libsodium.vcxproj
|
|
- cmd: if "%WITH_LIBSODIUM%"=="ON" set SODIUM_LIBRARY_DIR="%LIBSODIUMDIR%\bin\%Platform%\%Configuration%\%MSVCVERSION%\dynamic"
|
|
- cmd: if "%WITH_LIBSODIUM%"=="ON" set SODIUM_INCLUDE_DIR="%LIBSODIUMDIR%\src\libsodium\include"
|
|
- ps: if (${env:WITH_LIBSODIUM} -eq "ON") { Copy-Item "C:\projects\libsodium\bin\${env:Platform}\${env:Configuration}\${env:MSVCVERSION}\dynamic\libsodium.lib" -Destination "C:\projects\libsodium\bin\${env:Platform}\${env:Configuration}\${env:MSVCVERSION}\dynamic\sodium.lib" }
|
|
|
|
clone_folder: C:\projects\libzmq
|
|
|
|
before_build:
|
|
- cmd: set LIBZMQ_SRCDIR=%cd%
|
|
- cmd: set LIBZMQ_BUILDDIR=C:\projects\build_libzmq
|
|
# TODO this does not work with sonarcloud.io, as it misses the sonar-cxx plugin
|
|
# - cmd: curl -L https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.1.0.1141-windows.zip -o sonar-scanner-cli-3.1.0.1141-windows.zip
|
|
# - cmd: unzip sonar-scanner-cli-3.1.0.1141-windows.zip
|
|
# - 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="ON" -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: cd "%LIBZMQ_SRCDIR%"
|
|
|
|
build_script:
|
|
- 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: msbuild C:\projects\build_libzmq\ZeroMQ.sln /verbosity:%verbosity% /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
|
|
|
# TODO this does not work with sonarcloud.io, as it misses the sonar-cxx plugin
|
|
# build_script:
|
|
# - cmd: msbuild %LIBZMQ_BUILDDIR%\ZeroMQ.sln /verbosity:detailed >%BUILDLOG%
|
|
|
|
after_build:
|
|
# TODO this does not work with sonarcloud.io, as it misses the sonar-cxx plugin
|
|
# - cmd: cd "%LIBZMQ_SRCDIR%"
|
|
# - cmd: dir
|
|
# - cmd: sonar-scanner-3.1.0.1141-windows\bin\sonar-scanner
|
|
# -Dsonar.scm.provider=git
|
|
# -Dsonar.projectKey=libzmq-msvc
|
|
# -Dsonar.organization=sigiesec-github
|
|
# -Dsonar.sources=include,src,tests,unittests
|
|
# -Dsonar.host.url=https://sonarcloud.io
|
|
# -Dsonar.login=%SONARQUBE_TOKEN%
|
|
# -Dsonar.cxx.compiler.parser="Visual C++"
|
|
# -Dsonar.cxx.compiler.reportPath=build.log
|
|
# -Dsonar.cxx.compiler.charset=UTF-8
|
|
# -Dsonar.cxx.compiler.regex=^(?<filename>.*)\\((?<line>[0-9]+)\\):\\x20warning\\x20(?<id>C\\d\\d\\d\\d):(?<message>.*)$
|
|
- cmd: cd %LIBZMQ_BUILDDIR%\bin\%Configuration%"
|
|
- cmd: if "%WITH_LIBSODIUM%"=="ON" copy "%SODIUM_LIBRARY_DIR%\libsodium.dll" .
|
|
- cmd: 7z a -y -bd -mx=9 libzmq.zip *.exe *.dll
|
|
- ps: Push-AppveyorArtifact "libzmq.zip" -Filename "libzmq-${env:Platform}-${env:Configuration}.zip"
|
|
|
|
test_script:
|
|
- cmd: cd "%LIBZMQ_BUILDDIR%"
|
|
# TODO run tests in parallel only on selected platforms, since they fail on others, see https://github.com/zeromq/libzmq/issues/3123
|
|
- cmd: if "%CMAKE_GENERATOR%"=="Visual Studio 12 2013" set PARALLELIZE=ON
|
|
- cmd: if "%CMAKE_GENERATOR%"=="Visual Studio 14 2015" set PARALLELIZE=ON
|
|
- cmd: if "%CMAKE_GENERATOR%"=="Visual Studio 12 2013 Win64" set PARALLELIZE=ON
|
|
- cmd: if "%CMAKE_GENERATOR%"=="Visual Studio 14 2015 Win64" set PARALLELIZE=ON
|
|
- cmd: if "%PARALLELIZE%"=="ON" (
|
|
echo "Running tests in parallel" &&
|
|
set TEST_OPTIONS=-j5
|
|
)
|
|
- cmd: ctest -C "%Configuration%" -V %TEST_OPTIONS%
|
|
|
|
for:
|
|
-
|
|
branches:
|
|
only:
|
|
- master
|
|
- /.*analyze$/
|
|
environment:
|
|
matrix:
|
|
- platform: Win32
|
|
configuration: Release
|
|
WITH_LIBSODIUM: ON
|
|
ENABLE_CURVE: ON
|
|
ENABLE_ANALYSIS: ON
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
|
CMAKE_GENERATOR: "Visual Studio 15 2017"
|
|
MSVCVERSION: "v141"
|
|
MSVCYEAR: "vs2017"
|