mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-17 20:06:52 +01:00
1c89dc5c97
Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
307 lines
8.6 KiB
YAML
307 lines
8.6 KiB
YAML
version: poco-1.7.0 {branch}-{build}
|
|
|
|
cache:
|
|
- c:\mysql-5.7.9-win32
|
|
|
|
hosts:
|
|
localhost: 127.0.0.1
|
|
db.server.com: 127.0.0.2
|
|
|
|
services:
|
|
# - mysql
|
|
- mongodb
|
|
|
|
platform:
|
|
- Win32
|
|
- x64
|
|
|
|
configuration:
|
|
- release
|
|
- debug
|
|
|
|
environment:
|
|
bundling: bundled
|
|
logger: 'C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'
|
|
samples: samples
|
|
tests: tests
|
|
verbosity: minimal
|
|
|
|
matrix:
|
|
- builder: cmake
|
|
vsver: 120
|
|
|
|
- builder: msbuild
|
|
vsver: 120
|
|
linkmode: shared
|
|
|
|
# - builder: msbuild
|
|
# vsver: 120
|
|
# linkmode: static_md
|
|
|
|
# - builder: msbuild
|
|
# vsver: 120
|
|
# linkmode: static_mt
|
|
|
|
- builder: msbuild
|
|
vsver: 140
|
|
linkmode: shared
|
|
|
|
# - builder: msbuild
|
|
# vsver: 140
|
|
# linkmode: static_md
|
|
|
|
# - builder: msbuild
|
|
# vsver: 140
|
|
# linkmode: static_mt
|
|
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
|
|
install:
|
|
- set PATH=C:\ProgramData\chocolatey\bin;%PATH%
|
|
- systeminfo
|
|
- c:\cygwin\bin\uname -a
|
|
- c:\cygwin\bin\cat /proc/cpuinfo
|
|
- c:\cygwin\bin\cat /proc/meminfo
|
|
- ps: |
|
|
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
|
|
}
|
|
- where cmake
|
|
- set
|
|
|
|
# chocolatey brokes jom, here's workaround
|
|
# see https://github.com/jcfr/qt-easy-build/commit/6366f4275562bdaf4f686838600f46894579c41e)
|
|
- ps: |
|
|
if ($env:builder -eq "cmake")
|
|
{
|
|
$env:PATH = $env:ChocolateyInstall + "\bin" + ";" + $env:PATH
|
|
$env:PATH = $env:ChocolateyInstall + "\lib\jom\content" + ";" + $env:PATH
|
|
}
|
|
|
|
# MySQL 32 bit is not available by default on AppVeyor
|
|
# - ps: |
|
|
# if ($env:platform -eq "Win32")
|
|
# {
|
|
# 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:\
|
|
# }
|
|
# }
|
|
|
|
before_build:
|
|
- ps: |
|
|
if ($env:vsver -eq "120")
|
|
{
|
|
pushd $env:VS120COMNTOOLS
|
|
}
|
|
if ($env:vsver -eq "140")
|
|
{
|
|
pushd $env:VS140COMNTOOLS
|
|
}
|
|
cmd /c "vsvars32.bat&set" |
|
|
foreach {
|
|
if ($_ -match "=") {
|
|
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
|
|
}
|
|
}
|
|
popd
|
|
write-host "`nVisual Studio $env:vsver Command Prompt variables set." -ForegroundColor Yellow
|
|
- where cl
|
|
|
|
# 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
|
|
}
|
|
|
|
after_build:
|
|
- ps: |
|
|
$line='-------------------------------------------------------------------------------------';
|
|
$find='c:\cygwin\bin\find.exe';
|
|
$arg1=". -type f -name '*.cpp' -exec c:\cygwin\bin\grep -n -H ";
|
|
$arg2=" {} ;"
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
$word='FIXME'
|
|
Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr;
|
|
gc cout; gc cerr;
|
|
Write-Host;Write-Host;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
$word='TODO'
|
|
Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr;
|
|
gc cout; gc cerr;
|
|
Write-Host;Write-Host;
|
|
|
|
Write-Host -ForegroundColor Yellow $line;
|
|
$word='HACK'
|
|
Start-Process -NoNewWindow -Wait -FilePath $find -Args "$arg1 $word $arg2" -RSO cout -RSE cerr;
|
|
gc cout; gc cerr;
|
|
Write-Host;Write-Host;
|
|
|
|
|
|
build_script:
|
|
- ps: |
|
|
if ($env:builder -eq "msbuild")
|
|
{
|
|
$process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "buildwin.cmd"
|
|
-Args "$env:vsver build $env:linkmode $env:configuration $env:platform $env:samples $env:tests msbuild $env:verbosity $env:logger"
|
|
-RSO cout -RSE cerr;
|
|
gc cout; gc cerr;
|
|
}
|
|
if ($env:builder -eq "cmake")
|
|
{
|
|
mkdir cmake-build | out-null;cd cmake-build;
|
|
cmake ../. -G"NMake Makefiles JOM" -DENABLE_TESTS=ON -DENABLE_NETSSL=OFF -DENABLE_NETSSL_WIN=ON -DENABLE_DATA_MYSQL=OFF -DENABLE_REDIS=OFF;
|
|
jom
|
|
}
|
|
# cmake --build . --config $env:configuration -- /nologo;
|
|
|
|
|
|
|
|
before_test:
|
|
- set PATH=%CD%\bin;%PATH%
|
|
- set PATH=%CD%\bin64;%PATH%
|
|
- set CPPUNIT_IGNORE="class CppUnit::TestCaller<class NTPClientTest>.testTimeSync"
|
|
- set POCO_BASE=%CD%
|
|
|
|
after_test:
|
|
|
|
test_script:
|
|
- ps: |
|
|
|
|
$excluded = @('Data', 'Data/MySQL', 'Data/ODBC','Redis', 'PDF')
|
|
|
|
$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;
|
|
|
|
if ($env:configuration -eq "release")
|
|
{
|
|
$suffix = '';
|
|
if ($env:platform -eq "Win32")
|
|
{
|
|
$env:PATH = "$env:CD\bin;" + $env:PATH;$suffix = '';
|
|
}
|
|
if ($env:platform -eq "x64")
|
|
{
|
|
$env:PATH = "$env:CD\bin64;" + $env:PATH;$suffix = 64;
|
|
}
|
|
foreach ($component in $components) {
|
|
if ($excluded -notcontains $component)
|
|
{
|
|
if ($env:msbuild -eq "msbuild")
|
|
{
|
|
[string]$path = $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 -NoNewWindow -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
|
|
{
|
|
Write-Host -ForegroundColor Yellow 'using cmake'
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Add-AppveyorTest -Framework 'CppUnit' -Name $component -Outcome 'Skipped'
|
|
}
|
|
}
|
|
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
|
|
auth_token:
|
|
secure: xoOlP1UHshqjvh/INwMcNhZ5UHsTVKLGY5maTSjaxDc0fvRwoWIdYvY/CofQEuy2wOIBQK4eLD+tA0xG78ZgqQ==
|
|
channel: poco
|
|
on_build_success: false
|
|
on_build_status_changed: true
|
|
|
|
- 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
|
|
|
|
|