2015-12-17 09:15:21 +01:00
|
|
|
version: poco-1.7.0@{branch}-{build}
|
2015-01-19 11:25:09 +01:00
|
|
|
|
2015-12-09 09:26:51 +01:00
|
|
|
cache:
|
|
|
|
- c:\mysql-5.7.9-win32
|
|
|
|
|
2015-12-17 18:59:02 +01:00
|
|
|
hosts:
|
|
|
|
localhost: 127.0.0.1
|
|
|
|
db.server.com: 127.0.0.2
|
|
|
|
|
2015-12-09 11:05:46 +01:00
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
- mongodb
|
|
|
|
|
2015-12-14 16:40:37 +01:00
|
|
|
platform:
|
|
|
|
- Win32
|
|
|
|
- x64
|
|
|
|
|
2015-12-09 09:26:51 +01:00
|
|
|
configuration:
|
2015-12-14 16:40:37 +01:00
|
|
|
- release
|
|
|
|
- debug
|
2015-12-09 09:26:51 +01:00
|
|
|
|
2015-01-19 11:25:09 +01:00
|
|
|
install:
|
2015-12-09 09:26:51 +01:00
|
|
|
- systeminfo
|
|
|
|
- c:\cygwin\bin\uname -a
|
|
|
|
- c:\cygwin\bin\cat /proc/cpuinfo
|
|
|
|
- c:\cygwin\bin\cat /proc/meminfo
|
2015-12-09 09:38:29 +01:00
|
|
|
- set
|
2015-12-18 07:03:01 +01:00
|
|
|
|
2015-12-14 17:17:21 +01:00
|
|
|
# MySQL 32 bit is not available by default on AppVeyor
|
|
|
|
- ps: |
|
2015-12-15 00:25:11 +01:00
|
|
|
if ($env:platform -eq "Win32")
|
2015-12-14 17:17:21 +01:00
|
|
|
{
|
|
|
|
if (Test-Path "c:\mysql-5.7.9-win32") {
|
|
|
|
echo "using mysql-5.7.9-win32 from cache"
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
echo "downloading mysql-5.7.9-win32"
|
|
|
|
Invoke-WebRequest "http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.9-win32.zip" -OutFile mysql-5.7.9-win32.zip
|
|
|
|
echo "installing mysql-5.7.9-win32"
|
|
|
|
7z x -y mysql-5.7.9-win32.zip -oc:\
|
|
|
|
}
|
|
|
|
}
|
2015-12-09 09:26:51 +01:00
|
|
|
|
|
|
|
environment:
|
|
|
|
bundling: bundled
|
2015-12-16 10:26:10 +01:00
|
|
|
logger: 'C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'
|
2015-12-15 21:23:11 +01:00
|
|
|
samples: samples
|
|
|
|
tests: tests
|
2015-12-16 14:42:53 +01:00
|
|
|
verbosity: minimal
|
2015-12-09 09:26:51 +01:00
|
|
|
|
|
|
|
matrix:
|
2015-12-14 17:17:21 +01:00
|
|
|
- builder: 120
|
2015-12-14 16:40:37 +01:00
|
|
|
linkmode: shared
|
|
|
|
|
2015-12-16 12:33:41 +01:00
|
|
|
# - builder: 120
|
|
|
|
# linkmode: static_md
|
|
|
|
|
|
|
|
# - builder: 120
|
|
|
|
# linkmode: static_mt
|
|
|
|
|
2015-12-15 00:25:11 +01:00
|
|
|
- builder: 140
|
|
|
|
linkmode: shared
|
|
|
|
|
2015-12-16 12:33:41 +01:00
|
|
|
# - builder: 140
|
2015-12-15 00:25:11 +01:00
|
|
|
# linkmode: static_md
|
|
|
|
|
2015-12-16 12:33:41 +01:00
|
|
|
# - builder: 140
|
2015-12-15 00:25:11 +01:00
|
|
|
# linkmode: static_mt
|
|
|
|
|
2015-12-14 17:48:54 +01:00
|
|
|
|
2015-12-18 07:03:01 +01:00
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
|
2015-12-14 17:48:54 +01:00
|
|
|
|
2015-12-09 09:26:51 +01:00
|
|
|
before_build:
|
2015-12-14 17:17:21 +01:00
|
|
|
- ps: |
|
|
|
|
if ($env:builder -eq "120")
|
|
|
|
{
|
2015-12-14 17:48:54 +01:00
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
|
|
|
& "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
|
2015-12-15 00:02:01 +01:00
|
|
|
$env:suffix = ""
|
2015-12-14 17:48:54 +01:00
|
|
|
}
|
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
|
|
|
& "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
|
2015-12-15 00:02:01 +01:00
|
|
|
$env:suffix = 64
|
2015-12-14 17:48:54 +01:00
|
|
|
}
|
2015-12-14 17:17:21 +01:00
|
|
|
}
|
|
|
|
if ($env:builder -eq "140")
|
|
|
|
{
|
2015-12-14 17:48:54 +01:00
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
|
|
|
& "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
|
2015-12-15 00:02:01 +01:00
|
|
|
$env:suffix = ""
|
2015-12-14 17:48:54 +01:00
|
|
|
}
|
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
|
|
|
& "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
|
2015-12-15 00:02:01 +01:00
|
|
|
$env:suffix = 64
|
2015-12-14 17:48:54 +01:00
|
|
|
}
|
2015-12-14 17:17:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# MySQL
|
|
|
|
- ps: |
|
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
|
|
|
$env:INCLUDE = "C:\mysql-5.7.9-win32\include;" + $env:INCLUDE
|
|
|
|
$env:LIB = "C:\mysql-5.7.9-win32\lib;" + $env:LIB
|
|
|
|
}
|
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
|
|
|
$env:INCLUDE = "C:\Program Files\MySql\MySQL Server 5.6\include;" + $env:INCLUDE
|
|
|
|
$env:LIB = "C:\Program Files\MySql\MySQL Server 5.6\lib;" + $env:LIB
|
|
|
|
}
|
2015-12-09 09:26:51 +01:00
|
|
|
|
|
|
|
after_build:
|
2015-12-18 07:03:01 +01:00
|
|
|
- ps: |
|
|
|
|
$line='-------------------------------------------------------------------------------------';
|
|
|
|
$find='c:\cygwin\bin\find.exe';
|
2015-12-18 07:59:12 +01:00
|
|
|
$arg1=". -type f -name '*.cpp' -exec c:\cygwin\bin\grep -n -H ";
|
|
|
|
$arg2=" {} ;"
|
|
|
|
|
2015-12-18 07:03:01 +01:00
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
$word='FIXME'
|
2015-12-18 07:59:12 +01:00
|
|
|
Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO "cout" -RSE "cerr";
|
2015-12-18 07:03:01 +01:00
|
|
|
Get-Content cout; Get-Content cerr;
|
|
|
|
Write-Host;Write-Host;
|
|
|
|
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
$word='TODO'
|
2015-12-18 07:59:12 +01:00
|
|
|
Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO "cout" -RSE "cerr";
|
2015-12-18 07:03:01 +01:00
|
|
|
Get-Content cout; Get-Content cerr;
|
|
|
|
Write-Host;Write-Host;
|
|
|
|
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
$word='HACK'
|
2015-12-18 07:59:12 +01:00
|
|
|
Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO "cout" -RSE "cerr";
|
2015-12-18 07:03:01 +01:00
|
|
|
Get-Content cout; Get-Content cerr;
|
|
|
|
Write-Host;Write-Host;
|
|
|
|
|
2015-01-19 11:25:09 +01:00
|
|
|
|
|
|
|
build_script:
|
2015-12-16 14:42:53 +01:00
|
|
|
- buildwin %builder% build %linkmode% %configuration% %platform% %samples% %tests% msbuild %verbosity% %logger%
|
2015-12-16 23:25:35 +01:00
|
|
|
|
|
|
|
|
2015-12-09 09:26:51 +01:00
|
|
|
before_test:
|
2015-12-14 16:40:37 +01:00
|
|
|
- set PATH=%CD%\bin;%PATH%
|
2015-12-15 12:15:15 +01:00
|
|
|
- set PATH=%CD%\bin64;%PATH%
|
2015-12-16 03:20:06 +01:00
|
|
|
- set EXCLUDE_TESTS=Data,Data/ODBC,Data/MySQL,PDF
|
2015-12-18 07:03:01 +01:00
|
|
|
- set POCO_BASE=%CD%
|
2015-12-09 09:26:51 +01:00
|
|
|
|
|
|
|
after_test:
|
|
|
|
|
|
|
|
test_script:
|
2015-12-16 14:42:53 +01:00
|
|
|
- ps: |
|
2015-12-18 07:03:01 +01:00
|
|
|
|
|
|
|
$excluded = @('Data', 'Data/ODBC','Redis', 'PDF')
|
|
|
|
|
2015-12-17 08:07:20 +01:00
|
|
|
$runs=0;$fails=0;$failedTests='';$status=0;$tab="`t";
|
|
|
|
$line='-------------------------------------------------------------------------------------';
|
|
|
|
$components = gc 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;
|
|
|
|
|
2015-12-16 14:42:53 +01:00
|
|
|
if ($env:configuration -eq "release")
|
|
|
|
{
|
2015-12-17 06:39:42 +01:00
|
|
|
$suffix = '';
|
2015-12-16 14:42:53 +01:00
|
|
|
if ($env:platform -eq "Win32")
|
|
|
|
{
|
2015-12-17 07:00:48 +01:00
|
|
|
$env:PATH = "$env:CD\bin;" + $env:PATH;$suffix = '';
|
2015-12-16 14:42:53 +01:00
|
|
|
}
|
|
|
|
if ($env:platform -eq "x64")
|
|
|
|
{
|
2015-12-17 07:00:48 +01:00
|
|
|
$env:PATH = "$env:CD\bin64;" + $env:PATH;$suffix = 64;
|
2015-12-17 06:39:42 +01:00
|
|
|
}
|
|
|
|
foreach ($component in $components) {
|
2015-12-17 08:07:20 +01:00
|
|
|
if ($excluded -notcontains $component)
|
2015-12-17 06:39:42 +01:00
|
|
|
{
|
|
|
|
[string]$path = $component + "\testsuite\bin$suffix\TestSuite.exe";
|
2015-12-18 07:03:01 +01:00
|
|
|
|
2015-12-17 06:39:42 +01:00
|
|
|
if (Test-Path -Path $path) {
|
2015-12-16 21:09:27 +01:00
|
|
|
$runs += 1;
|
2015-12-18 07:59:12 +01:00
|
|
|
Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Running'
|
2015-12-18 07:03:01 +01:00
|
|
|
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
2015-12-17 08:07:20 +01:00
|
|
|
Write-Host -ForegroundColor Yellow '|' $env:APPVEYOR_BUILD_VERSION $env:vs$builder $env:Platform $env:Configuration $env:linkmode '|' $tab $tab $component;
|
2015-12-18 07:03:01 +01:00
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
|
|
|
2015-12-18 07:59:12 +01:00
|
|
|
$started = Get-Date
|
|
|
|
$process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$path" -Args "-all" -RSO "cout" -RSE "cerr";
|
|
|
|
$ended = Get-Date
|
|
|
|
$millisec = (stoped -started).milliseconds
|
|
|
|
|
2015-12-16 19:14:10 +01:00
|
|
|
Get-Content cout; Get-Content cerr;
|
2015-12-18 07:03:01 +01:00
|
|
|
|
2015-12-16 21:09:27 +01:00
|
|
|
if ($process.ExitCode -gt 0)
|
|
|
|
{
|
2015-12-17 22:56:10 +01:00
|
|
|
$fails += 1;$failedTests += $component + ', ';
|
2015-12-18 07:59:12 +01:00
|
|
|
Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Failed' -Duration $millisec
|
2015-12-16 21:09:27 +01:00
|
|
|
}
|
2015-12-17 22:56:10 +01:00
|
|
|
else
|
|
|
|
{
|
2015-12-18 07:59:12 +01:00
|
|
|
Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Passed' -Duration $millisec
|
2015-12-17 22:56:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-12-18 07:59:12 +01:00
|
|
|
Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Skipped'
|
2015-12-17 06:39:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Write-Host $runs' runs, ' $fails' fails'
|
|
|
|
if ($fails -gt 0)
|
|
|
|
{
|
2015-12-16 21:09:27 +01:00
|
|
|
Write-Host 'Failed: ' $failedTests
|
2015-12-17 18:59:02 +01:00
|
|
|
$host.SetShouldExit($fails);
|
|
|
|
} else
|
2015-12-17 06:39:42 +01:00
|
|
|
{
|
2015-12-17 19:04:52 +01:00
|
|
|
$host.SetShouldExit(0);
|
|
|
|
}
|
|
|
|
}
|
2015-12-16 14:42:53 +01:00
|
|
|
|
2015-12-17 19:04:52 +01:00
|
|
|
on_success:
|
2015-12-09 09:26:51 +01:00
|
|
|
- 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
|
|
|
|
auth_token:
|
|
|
|
secure: xoOlP1UHshqjvh/INwMcNhZ5UHsTVKLGY5maTSjaxDc0fvRwoWIdYvY/CofQEuy2wOIBQK4eLD+tA0xG78ZgqQ==
|
|
|
|
channel: poco
|
|
|
|
on_build_success: false
|
2015-12-15 12:15:15 +01:00
|
|
|
on_build_status_changed: true
|
2015-12-13 12:11:35 +01:00
|
|
|
|
|
|
|
- provider: Slack
|
|
|
|
incoming_webhook: https://hooks.slack.com/services/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
|
2015-12-15 12:15:15 +01:00
|
|
|
auth_token:
|
|
|
|
secure: Xsss/K3VV9wZI9Ffwvafa67kyohNA437xJ3WA9fVI4w=
|
2015-12-16 03:20:06 +01:00
|
|
|
channel: appveyor
|
2015-12-15 12:15:15 +01:00
|
|
|
on_build_success: false
|
2015-12-15 08:27:50 +01:00
|
|
|
on_build_failure: true
|
2015-12-15 12:15:15 +01:00
|
|
|
on_build_status_changed: true
|
2015-12-16 18:35:16 +01:00
|
|
|
|
|
|
|
|