Merge pull request #1193 from Kampbell/AppVeyorAndTravis

AppVeyor and Travis: finalization for Data/MySQL & Data/PostgreSQL
This commit is contained in:
Aleksandar Fabijanic 2016-03-13 21:37:36 -07:00
commit cf137839cb
8 changed files with 64 additions and 67 deletions

View File

@ -1,7 +1,7 @@
language: cpp
cache:
- apt
- apt
branches:
except:
@ -43,12 +43,12 @@ env:
before_script:
- echo ${TEST_NAME}
- sqlite3 -version
- chmod 755 ./travis/Linux/runtests.sh
- chmod 755 ./travis/OSX/runtests.sh
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mysql -u root -e 'create database pocotestdb;'; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mysql --version; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then postgres --version; fi
- sqlite3 -version
matrix:
fast_finish: true
@ -61,7 +61,7 @@ matrix:
- export CC="clang"
- export CXX="clang++"
- clang++ -x c++ /dev/null -dM -E
- ./configure --everything --omit=Data/ODBC,Data/MySQL,Data/SQLite,Data/PostgreSQL && make -s -j2 && sudo make install
- ./configure --everything --omit=Data/ODBC,Data/MySQL,Data/PostgreSQL && make -s -j2 && sudo make install
- ./travis/OSX/runtests.sh
- env: TEST_NAME="Linux gcc 4.6 (make) bundled"

View File

@ -27,10 +27,14 @@
#include "Poco/Data/MySQL/Connector.h"
#include "Poco/Data/MySQL/MySQLException.h"
#include <my_global.h>
#include <mysql.h>
#include <iostream>
#include <limits>
#ifdef max
#undef max
#endif
using namespace Poco::Data;
using namespace Poco::Data::Keywords;

View File

@ -79,11 +79,8 @@ all: libexecs tests samples
INSTALLDIR = $(DESTDIR)$(POCO_PREFIX)
COMPONENTS = CppUnit Foundation XML JSON Util Net Crypto NetSSL_OpenSSL
COMPONENTS += Data Data/SQLite Data/ODBC Data/MySQL
ifneq ($(OSNAME), Cygwin)
COMPONENTS += Data/PostgreSQL
endif
COMPONENTS = CppUnit Foundation XML JSON Util Net Crypto NetSSL_OpenSSL
COMPONENTS += Data Data/ODBC Data/SQLite Data/MySQL Data/PostgreSQL
COMPONENTS += MongoDB Redis Zip PageCompiler PageCompiler/File2Page CppParser PDF
cppunit:
@ -113,18 +110,12 @@ endif
# -------------------------------------------------------------------------------------------------------------------------------------
libexecs = Foundation-libexec XML-libexec JSON-libexec Util-libexec Net-libexec Crypto-libexec NetSSL_OpenSSL-libexec
libexecs += Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec
ifneq ($(OSNAME), Cygwin)
libexecs += Data/PostgreSQL-libexec
endif
libexecs += Data-libexec Data/ODBC-libexec Data/SQLite-libexec Data/MySQL-libexec Data/PostgreSQL-libexec
libexecs += MongoDB-libexec Redis-libexec Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec CppParser-libexec PDF-libexec
# -------------------------------------------------------------------------------------------------------------------------------------
tests = Foundation-tests XML-tests JSON-tests Util-tests Net-tests Crypto-tests NetSSL_OpenSSL-tests
tests += Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests
ifneq ($(OSNAME), Cygwin)
tests += Data/PostgreSQL-tests
endif
tests += Data-tests Data/ODBC-tests Data/SQLite-tests Data/MySQL-tests Data/PostgreSQL-tests
tests += MongoDB-tests Redis-tests Zip-tests CppParser-tests PDF-tests
# -------------------------------------------------------------------------------------------------------------------------------------
@ -134,10 +125,7 @@ samples += MongoDB-samples Zip-samples PageCompiler-samples PDF-samples
# -------------------------------------------------------------------------------------------------------------------------------------
cleans = Foundation-clean XML-clean JSON-clean Util-clean Net-clean Crypto-clean NetSSL_OpenSSL-clean
cleans += Data-clean Data/SQLite-clean Data/ODBC-clean Data/MySQL-clean
ifneq ($(OSNAME), Cygwin)
cleans += Data/PostgreSQL-clean
endif
cleans += Data-clean Data/ODBC-clean Data/SQLite-clean Data/MySQL-clean Data/PostgreSQL-clean
cleans += MongoDB-clean Redis-clean Zip-clean PageCompiler-clean PageCompiler/File2Page-clean CppParser-clean PDF-clean
# -------------------------------------------------------------------------------------------------------------------------------------

View File

@ -6,7 +6,6 @@ cache:
- C:\OpenSSL-Win32
- C:\OpenSSL-Win64
- C:\Program Files (x86)\PostgreSQL\9.4
- C:\Program Files\PostgreSQL\9.4
hosts:
localhost: 127.0.0.1
@ -98,19 +97,19 @@ install:
- c:\cygwin\bin\cat /proc/cpuinfo
- c:\cygwin\bin\cat /proc/meminfo
- ps: |
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
}
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
}
}
- set
# -------------------------------------------------------------------------------------------
@ -207,37 +206,42 @@ install:
before_build:
- ps: |
if ($env:vsver -eq "110")
if ($env:builder -eq "cmake")
{
$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 }
}
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])"
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 }
}
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
}
popd
write-host "`nVisual Studio $yyyy CLI variables set." -ForegroundColor Yellow
# -------------------------------------------------------------------------------------------
# MySQL
# & C:\cygwin\bin\ls -lR $env:MYSQL32
# & C:\cygwin\bin\ls -lR $env:MYSQL64
# -------------------------------------------------------------------------------------------
- ps: |
if ($env:platform -eq "Win32")
@ -250,7 +254,6 @@ before_build:
$to = $env:MYSQL32 + "\bin\libmysql.dll"
copy $from $to
}
& C:\cygwin\bin\ls -lR $env:MYSQL32
}
if ($env:platform -eq "x64")
{
@ -262,12 +265,11 @@ before_build:
$to = $env:MYSQL64 + "\bin\libmysql.dll"
copy $from $to
}
& C:\cygwin\bin\ls -lR $env:MYSQL64
}
$env:MYSQL_PWD="Password12!"
$cmd = 'mysql -e "create database pocotestdb;" --user=root';
iex "& $cmd"
# -------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------
# PostgreSQL
@ -285,6 +287,7 @@ before_build:
$env:LIB = $env:POSTGRES64 + "\lib;" + $env:LIB
$env:PATH = $env:POSTGRES64 + "\bin;" + $env:PATH
}
# -------------------------------------------------------------------------------------------
after_build:
- ps: |
@ -413,12 +416,12 @@ test_script:
if ($env:platform -eq "Win32")
{
$env:PATH = "$env:POCO_BASE\bin;" + $env:PATH;$suffix = '';
$excluded = @('Data', 'Data/ODBC', 'Data/MySQL', 'Redis', 'PDF')
$excluded = @('Data', 'Data/ODBC', 'Redis', 'PDF')
}
if ($env:platform -eq "x64")
{
$env:PATH = "$env:POCO_BASE\bin64;" + $env:PATH;$suffix = 64;
$excluded = @('Data', 'Data/ODBC','Redis', 'PDF')
$excluded = @('Data', 'Data/ODBC', 'Redis', 'PDF')
}
Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path;

View File

@ -12,6 +12,8 @@
#
LINKMODE ?= SHARED
OMIT = Data/PostgreSQL
#
# Define Tools
#

View File

@ -9,8 +9,9 @@ Crypto
NetSSL_OpenSSL
NetSSL_Win
Data
Data/SQLite
Data/ODBC
Data/SQLite
Data/MySQL
Data/PostgreSQL
Zip
PageCompiler
@ -21,4 +22,3 @@ MongoDB
Redis
PocoDoc
ProGen
Data/MySQL

View File

@ -293,7 +293,7 @@ cppunit:
$(MAKE) -C $(POCO_BASE)/CppUnit
CppUnit-clean:
$(MAKE) -C \$(POCO_BASE)/CppUnit clean
$(MAKE) -C $(POCO_BASE)/CppUnit clean
install: libexecs
mkdir -p $(INSTALLDIR)/include/Poco

View File

@ -3,5 +3,5 @@
# should be restored later on when the OSX environment would have
# been fixed by Travis
#
export EXCLUDE_TESTS="Data/MySQL Data/ODBC MongoDB Redis PDF"
export EXCLUDE_TESTS="Data/ODBC Data/MySQL Data/PostgreSQL MongoDB Redis PDF"