poco/appveyor.yml

225 lines
6.7 KiB
YAML
Raw Normal View History

version: 1.7.0-{branch}-{build}
cache:
- c:\mysql-5.7.9-win32
services:
- mysql
- mongodb
platform:
- Win32
- x64
configuration:
- release
- debug
install:
- systeminfo
- c:\cygwin\bin\uname -a
- c:\cygwin\bin\cat /proc/cpuinfo
- c:\cygwin\bin\cat /proc/meminfo
- set
# 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:\
}
}
environment:
bundling: bundled
logger: 'C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll'
samples: samples
tests: tests
verbosity: minimal
matrix:
- builder: 120
linkmode: shared
# - builder: 120
# linkmode: static_md
# - builder: 120
# linkmode: static_mt
- builder: 140
linkmode: shared
# - builder: 140
# linkmode: static_md
# - builder: 140
# linkmode: static_mt
before_build:
- ps: |
if ($env:builder -eq "120")
{
if ($env:platform -eq "Win32")
{
& "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
$env:suffix = ""
}
if ($env:platform -eq "x64")
{
& "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
$env:suffix = 64
}
}
if ($env:builder -eq "140")
{
if ($env:platform -eq "Win32")
{
& "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
$env:suffix = ""
}
if ($env:platform -eq "x64")
{
& "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
$env:suffix = 64
}
}
# 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:
build_script:
- buildwin %builder% build %linkmode% %configuration% %platform% %samples% %tests% msbuild %verbosity% %logger%
before_test:
- set PATH=%CD%\bin;%PATH%
- set PATH=%CD%\bin64;%PATH%
- set EXCLUDE_TESTS=Data,Data/ODBC,Data/MySQL,PDF
after_test:
test_script:
# - if %platform%==x64 ( set suffix=64 )
# - if %configuration%==release (build\script\runtests2.cmd !suffix!)
- ps: |
$runs=0
$fails=0
$failedTests=''
$status=0
$env:POCO_BASE = $env:CD
$components = @('Foundation', 'XML', 'JSON', 'Util', 'Net', 'Crypto', 'NetSSL_OpenSSL', 'Data', 'MongoDB', 'Redis', 'Zip', 'PageCompiler', 'PageCompiler/File2Page', 'CppParser')
if ($env:configuration -eq "release")
{
if ($env:platform -eq "Win32")
{
$env:PATH = "$env:CD\bin;" + $env:PATH
foreach ($component in $components) {
[string]$path = $component + "\testsuite\bin\TestSuite.exe";
if (Test-Path -Path $path) {
$runs += 1;
Write-Host -ForegroundColor Yellow '-------------------------------------------------------------------------------------';
Write-Host -ForegroundColor Yellow '|' $env:APPVEYOR_BUILD_VERSION $env:vs$builder $env:Platform $env:Configuration $env:linkmode $component;
Write-Host -ForegroundColor Yellow '-------------------------------------------------------------------------------------';
$process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$path" -Args "-all" -RSO "cout" -RSE "cerr";
Get-Content cout; Get-Content cerr;
if ($process.ExitCode -gt 0)
{
$fails += 1;$failedTests += $component + ', ';
}
}
}
}
if ($env:platform -eq "x64")
{
$env:PATH = "$env:CD\bin64;" + $env:PATH
foreach ($component in $components) {
[string]$path = $component + "\testsuite\bin64\TestSuite.exe";
if (Test-Path -Path $path) {
$runs += 1;
Write-Host -ForegroundColor Yellow '-------------------------------------------------------------------------------------';
Write-Host -ForegroundColor Yellow '|' $env:APPVEYOR_BUILD_VERSION $env:vs$builder $env:Platform $env:Configuration $env:linkmode $component;
Write-Host -ForegroundColor Yellow '-------------------------------------------------------------------------------------';
$process = Start-Process -PassThru -NoNewWindow -Wait -FilePath "$path" -Args "-all" -RSO "cout" -RSE "cerr";
Get-Content cout; Get-Content cerr;
if ($process.ExitCode -gt 0)
{
$fails += 1;$failedTests += $component + ', ';
}
}
}
}
Write-Host $runs' runs, ' $fails' fails'
if ($fails -gt 0)
{
Write-Host 'Failed: ' $failedTests
exit $fails;
}
else
{
exit 0;
}
}
on_success:
- echo success
on_failure:
- echo failure
on_finish:
- echo finish
- c:\cygwin\bin\find . -type f -name "*.cpp" -exec c:\cygwin\bin\grep -i -n -H FIXME {} ;
- c:\cygwin\bin\find . -type f -name "*.cpp" -exec c:\cygwin\bin\grep -i -n -H TODO {} ;
- c:\cygwin\bin\find . -type f -name "*.cpp" -exec c:\cygwin\bin\grep -i -n -H HACK {} ;
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