2016-03-07 07:25:13 +01:00
|
|
|
version: build {branch}-{build}
|
|
|
|
|
|
|
|
cache:
|
2016-04-01 16:52:05 +02:00
|
|
|
- C:\mysql-5.7.11-win32
|
2016-03-07 07:25:13 +01:00
|
|
|
- C:\ProgramData\chocolatey
|
|
|
|
- C:\OpenSSL-Win32
|
|
|
|
- C:\OpenSSL-Win64
|
2016-03-10 17:50:16 +01:00
|
|
|
- C:\Program Files (x86)\PostgreSQL\9.4
|
2016-03-15 09:24:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
- /.*ravis.*/
|
|
|
|
|
|
|
|
|
|
|
|
skip_commits:
|
|
|
|
message: /Merge pull request.*/
|
|
|
|
|
|
|
|
|
2016-03-07 07:25:13 +01:00
|
|
|
hosts:
|
|
|
|
localhost: 127.0.0.1
|
|
|
|
db.server.com: 127.0.0.2
|
|
|
|
|
2016-03-07 15:13:05 +01:00
|
|
|
services:
|
2016-03-07 07:25:13 +01:00
|
|
|
# mysql : server: localhost, port: 3306
|
|
|
|
# mysql : user : root, password: Password12!
|
2016-03-07 15:13:05 +01:00
|
|
|
- mysql
|
2016-03-07 07:25:13 +01:00
|
|
|
|
|
|
|
# mongodb config : C:\mongodb\mongod.cfg
|
|
|
|
# mongodb database: C:\mongodb\data\db
|
2016-03-07 15:13:05 +01:00
|
|
|
- mongodb
|
2016-03-07 07:25:13 +01:00
|
|
|
|
|
|
|
# Server name: localhost
|
|
|
|
# Server port: 5432
|
|
|
|
# postgres account password: Password12!
|
|
|
|
- postgresql94
|
|
|
|
|
|
|
|
|
|
|
|
platform:
|
2016-03-20 13:16:43 +01:00
|
|
|
- Win32
|
2016-03-23 15:24:15 +01:00
|
|
|
- x64
|
2016-03-07 07:25:13 +01:00
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
# building debug configuration doubles the round time and isn't so useful.
|
|
|
|
# tests are run only in release & shared.
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
configuration:
|
|
|
|
- release
|
|
|
|
# - debug
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
environment:
|
|
|
|
bundling: bundled
|
2016-03-30 20:53:46 +02:00
|
|
|
MYSQL32: C:\mysql-5.7.11-win32
|
2016-03-09 15:10:13 +01:00
|
|
|
MYSQL64: C:\Program Files\MySql\MySQL Server 5.6
|
|
|
|
POSTGRES32: C:\Program Files (x86)\PostgreSQL\9.4
|
|
|
|
POSTGRES64: C:\Program Files\PostgreSQL\9.4
|
2016-03-07 07:25:13 +01:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
|
2016-04-01 16:52:05 +02:00
|
|
|
- builder: cygwin
|
|
|
|
|
2016-03-07 07:25:13 +01:00
|
|
|
- builder: msbuild
|
|
|
|
vsver: 120
|
|
|
|
linkmode: shared
|
|
|
|
|
2016-04-05 00:02:28 +02:00
|
|
|
# - builder: msbuild
|
|
|
|
# vsver: 120
|
|
|
|
# linkmode: static_md
|
2016-03-07 07:25:13 +01:00
|
|
|
|
2016-04-05 00:02:28 +02:00
|
|
|
# - builder: msbuild
|
|
|
|
# vsver: 120
|
|
|
|
# linkmode: static_mt
|
2016-03-07 07:25:13 +01:00
|
|
|
|
2016-03-29 23:19:04 +02:00
|
|
|
- builder: msbuild
|
|
|
|
vsver: 140
|
|
|
|
linkmode: shared
|
2016-03-07 07:25:13 +01:00
|
|
|
|
2016-04-05 00:02:28 +02:00
|
|
|
# - builder: msbuild
|
|
|
|
# vsver: 140
|
|
|
|
# linkmode: static_md
|
2016-03-07 07:25:13 +01:00
|
|
|
|
2016-04-05 00:02:28 +02:00
|
|
|
# - builder: msbuild
|
|
|
|
# vsver: 140
|
|
|
|
# linkmode: static_mt
|
2016-03-07 07:25:13 +01:00
|
|
|
|
|
|
|
- builder: cmake
|
|
|
|
vsver: 120
|
|
|
|
|
2016-03-30 11:21:10 +02:00
|
|
|
- builder: cmake
|
|
|
|
vsver: 140
|
|
|
|
|
|
|
|
|
2016-03-07 07:25:13 +01:00
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
|
|
|
|
install:
|
2016-03-30 09:59:48 +02:00
|
|
|
- if "%builder%"=="cygwin" (
|
|
|
|
if "%platform%"=="Win32" (
|
|
|
|
C:\cygwin\setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P openssl-devel -P libiodbc-devel -P libiodbc2 -P odbc-mysql -P odbc-pgsql -P odbc-sqlite3 -P libmysqlclient-devel -P libsqlite3-devel -P libcrypt-devel))
|
2016-03-30 09:27:27 +02:00
|
|
|
|
2016-03-30 09:59:48 +02:00
|
|
|
- if "%builder%"=="cygwin" (
|
|
|
|
if "%platform%"=="x64" (
|
|
|
|
C:\cygwin64\setup-x86_64.exe -qnNdO -R C:/cygwin64 -s http://cygwin.mirror.constant.com -l C:/cygwin64/var/cache/setup -P openssl-devel -P libiodbc-devel -P libiodbc2 -P odbc-mysql -P odbc-pgsql -P odbc-sqlite3 -P libmysqlclient-devel -P libsqlite3-devel -P libcrypt-devel))
|
2016-03-15 14:05:22 +01:00
|
|
|
|
2016-03-07 07:25:13 +01:00
|
|
|
- set POCO_BASE=%CD%
|
|
|
|
- set PATH=C:\ProgramData\chocolatey\bin;%PATH%
|
2016-03-15 13:45:33 +01:00
|
|
|
- ps: |
|
|
|
|
if ($env:builder -eq "cygwin")
|
|
|
|
{
|
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
2016-03-17 12:19:49 +01:00
|
|
|
$env:PATH = "C:\cygwin\bin;" + $env:PATH
|
2016-03-17 12:12:55 +01:00
|
|
|
}
|
2016-03-15 13:45:33 +01:00
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
|
|
|
$env:PATH = "c:\cygwin64\bin;" + $env:PATH
|
|
|
|
}
|
|
|
|
}
|
2016-03-17 09:54:05 +01:00
|
|
|
- uname -a
|
2016-03-15 08:45:13 +01:00
|
|
|
- cat /proc/cpuinfo
|
|
|
|
- cat /proc/meminfo
|
2016-03-07 07:25:13 +01:00
|
|
|
- ps: |
|
2016-03-12 11:55:36 +01:00
|
|
|
if ($env:builder -eq "cmake")
|
|
|
|
{
|
|
|
|
if (Test-Path "$env:ChocolateyInstall\bin\jom.exe") {
|
|
|
|
echo "using jom from cache"
|
|
|
|
} else {
|
|
|
|
choco install jom
|
|
|
|
}
|
|
|
|
if (Test-Path "$env:ChocolateyInstall\bin\cmake.exe") {
|
|
|
|
echo "using cmake from cache"
|
|
|
|
} else {
|
|
|
|
choco install cmake
|
2016-03-07 07:25:13 +01:00
|
|
|
}
|
2016-03-12 11:55:36 +01:00
|
|
|
}
|
2016-03-07 07:25:13 +01:00
|
|
|
- set
|
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
# chocolatey brokes jom, here's workaround
|
|
|
|
# see https://github.com/jcfr/qt-easy-build/commit/6366f4275562bdaf4f686838600f46894579c41e)
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
- ps: |
|
|
|
|
if ($env:builder -eq "cmake")
|
|
|
|
{
|
2016-03-15 13:45:33 +01:00
|
|
|
$env:PATH = $env:ChocolateyInstall + "\bin;" + $env:PATH
|
|
|
|
$env:PATH = $env:ChocolateyInstall + "\lib\jom\content;" + $env:PATH
|
2016-03-07 07:25:13 +01:00
|
|
|
}
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
# OpenSSL-Win32 & OpenSSL-Win64
|
|
|
|
# Download & use OpenSSL from Shining Light Productions for CMake
|
|
|
|
# until CMake use implicitly the embedded openssl from the Poco repo. See issue #1093
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
- ps: |
|
2016-03-15 14:26:22 +01:00
|
|
|
if ($env:builder -eq "cmake")
|
2016-03-07 07:25:13 +01:00
|
|
|
{
|
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
|
|
|
if (Test-Path "C:\OpenSSL-Win32") {
|
|
|
|
echo "using C:\OpenSSL-Win32 from cache"
|
|
|
|
} else {
|
|
|
|
echo "downloading OpenSSL-Win32"
|
|
|
|
Start-FileDownload 'http://slproweb.com/download/Win32OpenSSL-1_0_2e.exe'
|
|
|
|
echo "installing C:\OpenSSL-Win32"
|
|
|
|
Start-Process "Win32OpenSSL-1_0_2e.exe" -Args "/silent /verysilent /sp- /suppressmsgboxes" -Wait
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
|
|
|
if (Test-Path "C:\OpenSSL-Win64") {
|
|
|
|
echo "using C:\OpenSSL-Win64 from cache"
|
|
|
|
} else {
|
|
|
|
echo "downloading OpenSSL-Win64"
|
|
|
|
Start-FileDownload 'http://slproweb.com/download/Win64OpenSSL-1_0_2e.exe'
|
|
|
|
echo "installing C:\OpenSSL-Win64"
|
|
|
|
Start-Process "Win64OpenSSL-1_0_2e.exe" -Args "/silent /verysilent /sp- /suppressmsgboxes" -Wait
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
# MySQL 32 bit is not available by default on AppVeyor
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
- ps: |
|
2016-03-15 13:21:26 +01:00
|
|
|
if (($env:platform -eq "Win32") -and !($env:builder -eq "cygwin"))
|
2016-03-07 15:05:39 +01:00
|
|
|
{
|
2016-03-09 15:10:13 +01:00
|
|
|
if (Test-Path $env:MYSQL32) {
|
|
|
|
echo "using $env:MYSQL32 from cache"
|
2016-03-08 19:04:50 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-03-09 15:10:13 +01:00
|
|
|
echo "downloading $env:MYSQL32"
|
2016-03-30 20:53:46 +02:00
|
|
|
Invoke-WebRequest "http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.11-win32.zip" -OutFile mysql-5.7.11-win32.zip
|
2016-03-09 15:10:13 +01:00
|
|
|
echo "installing $env:MYSQL32"
|
2016-03-30 20:53:46 +02:00
|
|
|
7z x -y mysql-5.7.11-win32.zip -oc:\
|
2016-03-09 15:10:13 +01:00
|
|
|
}
|
|
|
|
}
|
2016-03-07 15:05:39 +01:00
|
|
|
# -------------------------------------------------------------------------------------------
|
2016-03-08 16:20:12 +01:00
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
# PostgreSQL 32 bit is not available by default on AppVeyor
|
2016-03-08 19:04:50 +01:00
|
|
|
# http://www.enterprisedb.com/products-services-training/pgdownload#windows
|
2016-03-08 16:20:12 +01:00
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
- ps: |
|
2016-03-15 13:21:26 +01:00
|
|
|
if (($env:platform -eq "Win32") -and !($env:builder -eq "cygwin"))
|
2016-03-08 19:04:50 +01:00
|
|
|
{
|
2016-03-09 15:10:13 +01:00
|
|
|
if (Test-Path $env:POSTGRES32) {
|
2016-03-09 15:35:04 +01:00
|
|
|
echo "using $env:POSTGRES32 from cache"
|
2016-03-09 11:04:45 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-03-09 15:10:13 +01:00
|
|
|
Write-Host "Installing $env:POSTGRES32 ..." -ForegroundColor Cyan
|
2016-03-09 11:04:45 +01:00
|
|
|
Write-Host "Downloading..."
|
|
|
|
$exePath = "$($env:USERPROFILE)\postgresql-9.4.5-1-windows.exe"
|
|
|
|
(New-Object Net.WebClient).DownloadFile('http://get.enterprisedb.com/postgresql/postgresql-9.4.5-1-windows.exe', $exePath)
|
|
|
|
Write-Host "Installing..."
|
|
|
|
cmd /c start /wait $exePath --mode unattended --superpassword Password12!
|
|
|
|
del $exePath
|
|
|
|
Write-Host "Setting up services..."
|
|
|
|
Stop-Service postgresql-9.4
|
|
|
|
Set-Service -Name postgresql-9.4 -StartupType Manual
|
2016-03-08 16:28:30 +01:00
|
|
|
|
2016-03-09 15:10:13 +01:00
|
|
|
Write-Host "$env:POSTGRES32 installed" -ForegroundColor Green
|
2016-03-09 11:04:45 +01:00
|
|
|
}
|
2016-03-08 19:04:50 +01:00
|
|
|
}
|
2016-03-08 16:28:30 +01:00
|
|
|
# -------------------------------------------------------------------------------------------
|
2016-03-08 16:20:12 +01:00
|
|
|
|
2016-03-07 07:25:13 +01:00
|
|
|
|
|
|
|
before_build:
|
|
|
|
- ps: |
|
2016-03-12 11:55:36 +01:00
|
|
|
if ($env:builder -eq "cmake")
|
2016-03-08 19:04:50 +01:00
|
|
|
{
|
2016-03-12 11:55:36 +01:00
|
|
|
if ($env:vsver -eq "110")
|
|
|
|
{
|
|
|
|
$vspath= convert-path $env:VS110COMNTOOLS\..\..\VC\bin; $yyyy='2010'
|
|
|
|
if($env:platform -eq 'Win32') { $vctool='';}
|
|
|
|
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
|
|
|
}
|
|
|
|
if ($env:vsver -eq "120")
|
|
|
|
{
|
|
|
|
$vspath= convert-path $env:VS120COMNTOOLS\..\..\VC\bin;$yyyy='2013'
|
|
|
|
if($env:platform -eq 'Win32') { $vctool='';}
|
|
|
|
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
2016-03-07 07:25:13 +01:00
|
|
|
}
|
2016-03-12 11:55:36 +01:00
|
|
|
if ($env:vsver -eq "140")
|
|
|
|
{
|
|
|
|
$vspath= convert-path $env:VS140COMNTOOLS\..\..\VC\bin; $yyyy='2015'
|
|
|
|
if($env:platform -eq 'Win32') { $vctool='';}
|
|
|
|
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
|
|
|
}
|
|
|
|
pushd $vspath;
|
|
|
|
$tool= if($vctool -eq '') {'32'} else {$vctool}
|
|
|
|
cmd /c "vcvars$tool.bat&set" |
|
|
|
|
foreach {
|
|
|
|
if ($_ -match "=") {
|
|
|
|
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
popd
|
|
|
|
write-host "`nVisual Studio $yyyy CLI variables set." -ForegroundColor Yellow
|
2016-03-08 19:04:50 +01:00
|
|
|
}
|
2016-03-07 07:25:13 +01:00
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
# MySQL
|
2016-03-12 16:28:19 +01:00
|
|
|
# & C:\cygwin\bin\ls -lR $env:MYSQL32
|
|
|
|
# & C:\cygwin\bin\ls -lR $env:MYSQL64
|
2016-03-07 07:25:13 +01:00
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
- ps: |
|
2016-03-15 13:21:26 +01:00
|
|
|
if (!($env:builder -eq "cygwin"))
|
2016-03-07 07:25:13 +01:00
|
|
|
{
|
2016-03-15 13:21:26 +01:00
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
|
|
|
$env:INCLUDE = $env:MYSQL32 + "\include;" + $env:INCLUDE
|
|
|
|
$env:LIB = $env:MYSQL32 + "\lib;" + $env:LIB
|
|
|
|
$env:PATH = $env:MYSQL32 + "\bin;" + $env:PATH
|
|
|
|
if (Test-Path ($env:MYSQL32 + "\lib\libmysql.dll")) {
|
|
|
|
$from = $env:MYSQL32 + "\lib\libmysql.dll";
|
|
|
|
$to = $env:MYSQL32 + "\bin\libmysql.dll"
|
|
|
|
copy $from $to
|
|
|
|
}
|
2016-03-09 11:18:14 +01:00
|
|
|
}
|
2016-03-15 13:21:26 +01:00
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
|
|
|
$env:INCLUDE = $env:MYSQL64 + "\include;" + $env:INCLUDE
|
|
|
|
$env:LIB = $env:MYSQL64 + "\lib;" + $env:LIB
|
|
|
|
$env:PATH = $env:MYSQL64 + "\bin;" + $env:PATH
|
|
|
|
if (Test-Path ($env:MYSQL64 + "\lib\libmysql.dll")) {
|
|
|
|
$from = $env:MYSQL64 + "\lib\libmysql.dll";
|
|
|
|
$to = $env:MYSQL64 + "\bin\libmysql.dll"
|
|
|
|
copy $from $to
|
|
|
|
}
|
2016-03-09 11:18:14 +01:00
|
|
|
}
|
2016-03-15 13:45:33 +01:00
|
|
|
$env:MYSQL_PWD="Password12!"
|
|
|
|
$cmd = 'mysql -e "create database pocotestdb;" --user=root';
|
|
|
|
iex "& $cmd"
|
2016-03-07 07:25:13 +01:00
|
|
|
}
|
2016-03-12 16:28:19 +01:00
|
|
|
# -------------------------------------------------------------------------------------------
|
2016-03-07 07:25:13 +01:00
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
# PostgreSQL
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
- ps: |
|
2016-03-15 13:21:26 +01:00
|
|
|
if (!($env:builder -eq "cygwin"))
|
2016-03-07 07:25:13 +01:00
|
|
|
{
|
2016-03-15 13:21:26 +01:00
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
|
|
|
$env:INCLUDE = $env:POSTGRES32 + "\include;" + $env:INCLUDE
|
|
|
|
$env:LIB = $env:POSTGRES32 + "\lib;" + $env:LIB
|
|
|
|
$env:PATH = $env:POSTGRES32 + "\bin;" + $env:PATH
|
|
|
|
}
|
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
|
|
|
$env:INCLUDE = $env:POSTGRES64 + "\include;" + $env:INCLUDE
|
|
|
|
$env:LIB = $env:POSTGRES64 + "\lib;" + $env:LIB
|
|
|
|
$env:PATH = $env:POSTGRES64 + "\bin;" + $env:PATH
|
|
|
|
}
|
2016-03-07 07:25:13 +01:00
|
|
|
}
|
2016-03-12 16:28:19 +01:00
|
|
|
# -------------------------------------------------------------------------------------------
|
2016-03-07 07:25:13 +01:00
|
|
|
|
|
|
|
after_build:
|
|
|
|
- ps: |
|
|
|
|
$line='-------------------------------------------------------------------------------------';
|
2016-03-30 20:53:46 +02:00
|
|
|
$find='C:\Cygwin\bin\find.exe';
|
2016-03-30 10:10:59 +02:00
|
|
|
$arg1="$env:POCO_BASE -type f -name '*.cpp' -exec grep -n -H ";
|
2016-03-07 07:25:13 +01:00
|
|
|
$arg2=" {} ;"
|
|
|
|
|
|
|
|
$word='FIXME'
|
|
|
|
Write-Host -ForegroundColor Yellow $word;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
Start-Process -nnw -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr;
|
|
|
|
gc cout; gc cerr;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
Write-Host;Write-Host;
|
|
|
|
|
|
|
|
$word='TODO'
|
|
|
|
Write-Host -ForegroundColor Yellow $word;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
Start-Process -nnw -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr;
|
|
|
|
gc cout; gc cerr;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
Write-Host;Write-Host;
|
|
|
|
|
|
|
|
$word='HACK'
|
|
|
|
Write-Host -ForegroundColor Yellow $word;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
Start-Process -nnw -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr;
|
|
|
|
gc cout; gc cerr;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
Write-Host;Write-Host;
|
|
|
|
|
|
|
|
|
|
|
|
build_script:
|
|
|
|
# -------------------------------------------------------------------------------------------
|
|
|
|
# When building with cmake, it remains one exception reported below
|
|
|
|
# Once this problem be fixed, a fix from Microsoft about mc.exe outputing informative
|
|
|
|
# message on stderr: https://connect.microsoft.com/VisualStudio/Feedback/Details/2161572
|
|
|
|
# the try/catch around the cmake builder can be removed
|
|
|
|
#
|
|
|
|
# [ 1%] Generating pocomsg.h
|
|
|
|
# cmake : MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc
|
|
|
|
# At line:16 char:3
|
|
|
|
# + cmake --build . --config $env:configuration
|
|
|
|
# + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
# + CategoryInfo : NotSpecified: (MC: Compiling C.../src/pocomsg.mc:String) [], RemoteException
|
|
|
|
# + FullyQualifiedErrorId : NativeCommandError
|
|
|
|
#
|
|
|
|
# Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc
|
2016-03-30 07:59:08 +02:00
|
|
|
# -------------------------------------------------------------------------------------------
|
2016-03-07 07:25:13 +01:00
|
|
|
- ps: |
|
2016-04-05 08:10:03 +02:00
|
|
|
if ($env:builder -eq "cygwin")
|
|
|
|
{
|
2016-04-09 11:52:47 +02:00
|
|
|
$LastExitCode=0;
|
|
|
|
$cmd='bash.exe configure --everything';iex "& $cmd"
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "$cmd failed with exit code $LastExitCode."
|
|
|
|
}
|
|
|
|
$LastExitCode=0;
|
|
|
|
$cmd='make.exe -s';iex "& $cmd"
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
|
throw "$cmd failed with exit code $LastExitCode."
|
|
|
|
}
|
2016-04-05 08:10:03 +02:00
|
|
|
}
|
2016-03-07 07:25:13 +01:00
|
|
|
if ($env:builder -eq "msbuild")
|
|
|
|
{
|
|
|
|
$logger='"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"';
|
|
|
|
$verbosity='minimal';
|
|
|
|
|
|
|
|
$process = Start-Process -PassThru -nnw -Wait -FilePath "$env:poco_base\buildwin.cmd" -RSO cout -RSE cerr `
|
2016-03-30 20:53:46 +02:00
|
|
|
-EA Stop -Args "$env:vsver build $env:linkmode $env:configuration $env:platform samples tests msbuild $verbosity $logger";
|
2016-03-07 07:25:13 +01:00
|
|
|
gc cout; gc cerr;
|
|
|
|
Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path;
|
|
|
|
}
|
2016-03-30 11:21:10 +02:00
|
|
|
|
2016-03-07 07:25:13 +01:00
|
|
|
if ($env:builder -eq "cmake")
|
|
|
|
{
|
|
|
|
mkdir cmake-build | out-null;pushd cmake-build;
|
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
|
|
|
$opensslrootdir = 'C:\OpenSSL-Win32'
|
|
|
|
}
|
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
|
|
|
$opensslrootdir = 'C:\OpenSSL-Win64'
|
|
|
|
}
|
|
|
|
$defs =' -G"NMake Makefiles"';
|
|
|
|
$defs+=" -DCMAKE_BUILD_TYPE=$env:configuration";
|
|
|
|
$defs+=" -DOPENSSL_ROOT_DIR=$opensslrootdir";
|
|
|
|
$defs+=" -DENABLE_NETSSL=OFF";
|
|
|
|
$defs+=" -DENABLE_NETSSL_WIN=ON";
|
|
|
|
$defs+=" -DENABLE_DATA_MYSQL=OFF";
|
|
|
|
$defs+=" -DENABLE_REDIS=OFF";
|
|
|
|
$defs+=" -DENABLE_SAMPLES=ON";
|
|
|
|
$defs+=" -DENABLE_TESTS=ON";
|
|
|
|
$defs+=" ..";
|
|
|
|
Write-Host -ForegroundColor Yellow cmake $defs
|
|
|
|
$process = Start-Process -PassThru -nnw -Wait -FilePath "cmake" -RSO cout -RSE cerr -Args $defs;
|
|
|
|
gc cout; gc cerr;
|
|
|
|
try {
|
|
|
|
$ErrorActionPreference = 'Continue';
|
|
|
|
Write-Host -ForegroundColor Yellow cmake `-`-build .
|
|
|
|
cmake `-`-build .
|
|
|
|
} catch {
|
|
|
|
Write-Warning "Oops: $_"
|
|
|
|
}
|
|
|
|
popd
|
|
|
|
Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path;
|
|
|
|
$ErrorActionPreference = 'Stop';
|
|
|
|
}
|
|
|
|
|
2016-03-30 11:21:10 +02:00
|
|
|
|
2016-03-07 07:25:13 +01:00
|
|
|
before_test:
|
2016-03-08 19:04:50 +01:00
|
|
|
- ps: |
|
2016-03-07 07:25:13 +01:00
|
|
|
$line='-------------------------------------------------------------------------------------';
|
|
|
|
$CPPUNIT_IGNORE='';
|
|
|
|
$CPPUNIT_IGNORE+='class CppUnit::TestCaller<class NTPClientTest>.testTimeSync';
|
|
|
|
$CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class RawSocketTest>.testEchoIPv4';
|
|
|
|
$CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class RawSocketTest>.testSendToReceiveFromIPv4';
|
|
|
|
$CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class ICMPClientTest>.testPing';
|
|
|
|
$CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class HTTPSClientSessionTest>.testProxy';
|
|
|
|
$CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class HTTPSStreamFactoryTest>.testProxy';
|
2016-05-31 14:36:44 +02:00
|
|
|
$CPPUNIT_IGNORE+=', class CppUnit::TestCaller<class TCPServerTest>.testReuseSocket';
|
2016-03-07 07:25:13 +01:00
|
|
|
set-item -force -path "ENV:CPPUNIT_IGNORE" -value $CPPUNIT_IGNORE
|
|
|
|
Write-Host -ForegroundColor Yellow 'CPPUNIT_IGNORE'
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
foreach($t in $CPPUNIT_IGNORE.split(",")) { Write-Host -ForegroundColor Yellow $t.trim() }
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
|
2016-03-30 11:21:10 +02:00
|
|
|
|
2016-03-07 07:25:13 +01:00
|
|
|
after_test:
|
|
|
|
|
2016-03-07 08:16:48 +01:00
|
|
|
|
2016-03-07 07:25:13 +01:00
|
|
|
test_script:
|
|
|
|
- ps: |
|
|
|
|
$runs=0;$fails=0;$failedTests='';$status=0;$tab="`t";
|
|
|
|
$line='-------------------------------------------------------------------------------------';
|
|
|
|
if ($env:configuration -eq "release")
|
|
|
|
{
|
2016-03-29 23:19:04 +02:00
|
|
|
if ($env:builder -eq "cygwin")
|
2016-03-17 10:06:30 +01:00
|
|
|
{
|
2016-04-09 11:52:47 +02:00
|
|
|
$LastExitCode=0;
|
2016-03-28 10:32:31 +02:00
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
|
|
|
$cmd = 'C:\cygwin\usr\sbin\cygserver.exe "&"';iex "& $cmd"
|
|
|
|
}
|
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
|
|
|
$cmd = 'C:\cygwin64\usr\sbin\cygserver.exe "&"';iex "& $cmd"
|
|
|
|
}
|
2016-04-05 08:10:03 +02:00
|
|
|
$cmd = 'bash.exe -c "appveyor/Cygwin/runtests.sh"';iex "& $cmd";
|
2016-04-09 11:52:47 +02:00
|
|
|
Write-Host -ForegroundColor Yellow $cmd ': LastExitCode=' $lastExitCode;
|
|
|
|
}
|
2016-03-07 07:25:13 +01:00
|
|
|
if ($env:builder -eq "msbuild" -and $env:linkmode -eq "shared")
|
|
|
|
{
|
|
|
|
$suffix = '';
|
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
|
|
|
$env:PATH = "$env:POCO_BASE\bin;" + $env:PATH;$suffix = '';
|
2016-03-12 11:55:36 +01:00
|
|
|
$excluded = @('Data', 'Data/ODBC', 'Redis', 'PDF')
|
2016-03-07 07:25:13 +01:00
|
|
|
}
|
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
|
|
|
$env:PATH = "$env:POCO_BASE\bin64;" + $env:PATH;$suffix = 64;
|
2016-03-12 11:55:36 +01:00
|
|
|
$excluded = @('Data', 'Data/ODBC', 'Redis', 'PDF')
|
2016-03-07 07:25:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path;
|
|
|
|
|
|
|
|
$components = gc $env:poco_base\components;
|
|
|
|
Write-Host components;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
$components;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
|
|
|
|
|
|
|
|
Write-Host excluded;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
$excluded
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
|
|
|
|
foreach ($component in $components) {
|
|
|
|
if ($excluded -notcontains $component) {
|
|
|
|
$path = "$env:poco_base\" + $component + "\testsuite\bin$suffix\TestSuite.exe";
|
|
|
|
|
|
|
|
if (Test-Path -Path $path) {
|
|
|
|
$runs += 1;
|
|
|
|
Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Running'
|
|
|
|
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
Write-Host -ForegroundColor Yellow '|' $env:APPVEYOR_BUILD_VERSION $env:vs$vsver $env:Platform $env:Configuration $env:linkmode '|' $tab $tab $component;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
|
|
|
|
$started = Get-Date
|
|
|
|
$process = Start-Process -PassThru -nnw -Wait -FilePath "$path" -Args "-all" -RSO cout -RSE cerr;
|
|
|
|
$ended = Get-Date
|
|
|
|
$millisec = ($ended - $started).totalmilliseconds
|
|
|
|
|
|
|
|
gc cout; gc cerr;
|
|
|
|
|
|
|
|
if ($process.ExitCode -gt 0) {
|
|
|
|
$fails += 1;$failedTests += $component + ', ';
|
|
|
|
Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Failed' -Duration $millisec
|
|
|
|
} else {
|
|
|
|
Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Passed' -Duration $millisec
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'NotFound'
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Skipped'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-03-30 20:56:38 +02:00
|
|
|
if ($env:builder -eq "cmake")
|
2016-03-07 07:25:13 +01:00
|
|
|
{
|
|
|
|
pushd cmake-build;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
ctest -N
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
|
|
|
|
Write-Host -ForegroundColor Yellow 'ctest -VV -E Data*'
|
|
|
|
ctest -VV -E Data*
|
|
|
|
popd
|
|
|
|
}
|
|
|
|
Write-Host $runs' runs, ' $fails' fails'
|
|
|
|
if ($fails -gt 0)
|
|
|
|
{
|
|
|
|
Write-Host 'Failed: ' $failedTests
|
|
|
|
$host.SetShouldExit($fails);
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
$host.SetShouldExit(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
on_success:
|
|
|
|
- echo success
|
|
|
|
|
|
|
|
on_failure:
|
|
|
|
- echo failure
|
|
|
|
|
|
|
|
on_finish:
|
|
|
|
- echo finish
|
|
|
|
|
|
|
|
notifications:
|
|
|
|
- provider: Email
|
|
|
|
on_build_success: false
|
|
|
|
on_build_failure: false
|
|
|
|
on_build_status_changed: false
|
|
|
|
|
|
|
|
- provider: Slack
|
|
|
|
incoming_webhook: https://hooks.slack.com/services/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
|
|
|
|
auth_token:
|
|
|
|
secure: Xsss/K3VV9wZI9Ffwvafa67kyohNA437xJ3WA9fVI4w=
|
|
|
|
channel: appveyor
|
|
|
|
on_build_success: false
|
|
|
|
on_build_failure: true
|
|
|
|
on_build_status_changed: true
|
|
|
|
|
|
|
|
|