mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 08:31:43 +02:00
Merge pull request #1193 from Kampbell/AppVeyorAndTravis
AppVeyor and Travis: finalization for Data/MySQL & Data/PostgreSQL
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
@@ -43,12 +43,12 @@ env:
|
|||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- echo ${TEST_NAME}
|
- echo ${TEST_NAME}
|
||||||
- sqlite3 -version
|
|
||||||
- chmod 755 ./travis/Linux/runtests.sh
|
- chmod 755 ./travis/Linux/runtests.sh
|
||||||
- chmod 755 ./travis/OSX/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 -u root -e 'create database pocotestdb;'; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mysql --version; fi
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mysql --version; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then postgres --version; fi
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then postgres --version; fi
|
||||||
|
- sqlite3 -version
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
@@ -61,7 +61,7 @@ matrix:
|
|||||||
- export CC="clang"
|
- export CC="clang"
|
||||||
- export CXX="clang++"
|
- export CXX="clang++"
|
||||||
- clang++ -x c++ /dev/null -dM -E
|
- 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
|
- ./travis/OSX/runtests.sh
|
||||||
|
|
||||||
- env: TEST_NAME="Linux gcc 4.6 (make) bundled"
|
- env: TEST_NAME="Linux gcc 4.6 (make) bundled"
|
||||||
|
@@ -27,10 +27,14 @@
|
|||||||
#include "Poco/Data/MySQL/Connector.h"
|
#include "Poco/Data/MySQL/Connector.h"
|
||||||
#include "Poco/Data/MySQL/MySQLException.h"
|
#include "Poco/Data/MySQL/MySQLException.h"
|
||||||
|
|
||||||
|
#include <my_global.h>
|
||||||
#include <mysql.h>
|
#include <mysql.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
#ifdef max
|
||||||
|
#undef max
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace Poco::Data;
|
using namespace Poco::Data;
|
||||||
using namespace Poco::Data::Keywords;
|
using namespace Poco::Data::Keywords;
|
||||||
|
22
Makefile
22
Makefile
@@ -79,11 +79,8 @@ all: libexecs tests samples
|
|||||||
|
|
||||||
INSTALLDIR = $(DESTDIR)$(POCO_PREFIX)
|
INSTALLDIR = $(DESTDIR)$(POCO_PREFIX)
|
||||||
|
|
||||||
COMPONENTS = CppUnit Foundation XML JSON Util Net Crypto NetSSL_OpenSSL
|
COMPONENTS = CppUnit Foundation XML JSON Util Net Crypto NetSSL_OpenSSL
|
||||||
COMPONENTS += Data Data/SQLite Data/ODBC Data/MySQL
|
COMPONENTS += Data Data/ODBC Data/SQLite Data/MySQL Data/PostgreSQL
|
||||||
ifneq ($(OSNAME), Cygwin)
|
|
||||||
COMPONENTS += Data/PostgreSQL
|
|
||||||
endif
|
|
||||||
COMPONENTS += MongoDB Redis Zip PageCompiler PageCompiler/File2Page CppParser PDF
|
COMPONENTS += MongoDB Redis Zip PageCompiler PageCompiler/File2Page CppParser PDF
|
||||||
|
|
||||||
cppunit:
|
cppunit:
|
||||||
@@ -113,18 +110,12 @@ endif
|
|||||||
|
|
||||||
# -------------------------------------------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------------------------------------------
|
||||||
libexecs = Foundation-libexec XML-libexec JSON-libexec Util-libexec Net-libexec Crypto-libexec NetSSL_OpenSSL-libexec
|
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
|
libexecs += Data-libexec Data/ODBC-libexec Data/SQLite-libexec Data/MySQL-libexec Data/PostgreSQL-libexec
|
||||||
ifneq ($(OSNAME), Cygwin)
|
|
||||||
libexecs += Data/PostgreSQL-libexec
|
|
||||||
endif
|
|
||||||
libexecs += MongoDB-libexec Redis-libexec Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec CppParser-libexec PDF-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 = 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
|
tests += Data-tests Data/ODBC-tests Data/SQLite-tests Data/MySQL-tests Data/PostgreSQL-tests
|
||||||
ifneq ($(OSNAME), Cygwin)
|
|
||||||
tests += Data/PostgreSQL-tests
|
|
||||||
endif
|
|
||||||
tests += MongoDB-tests Redis-tests Zip-tests CppParser-tests PDF-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 = 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
|
cleans += Data-clean Data/ODBC-clean Data/SQLite-clean Data/MySQL-clean Data/PostgreSQL-clean
|
||||||
ifneq ($(OSNAME), Cygwin)
|
|
||||||
cleans += Data/PostgreSQL-clean
|
|
||||||
endif
|
|
||||||
cleans += MongoDB-clean Redis-clean Zip-clean PageCompiler-clean PageCompiler/File2Page-clean CppParser-clean PDF-clean
|
cleans += MongoDB-clean Redis-clean Zip-clean PageCompiler-clean PageCompiler/File2Page-clean CppParser-clean PDF-clean
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
89
appveyor.yml
89
appveyor.yml
@@ -6,7 +6,6 @@ cache:
|
|||||||
- C:\OpenSSL-Win32
|
- C:\OpenSSL-Win32
|
||||||
- C:\OpenSSL-Win64
|
- C:\OpenSSL-Win64
|
||||||
- C:\Program Files (x86)\PostgreSQL\9.4
|
- C:\Program Files (x86)\PostgreSQL\9.4
|
||||||
- C:\Program Files\PostgreSQL\9.4
|
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
localhost: 127.0.0.1
|
localhost: 127.0.0.1
|
||||||
@@ -98,19 +97,19 @@ install:
|
|||||||
- c:\cygwin\bin\cat /proc/cpuinfo
|
- c:\cygwin\bin\cat /proc/cpuinfo
|
||||||
- c:\cygwin\bin\cat /proc/meminfo
|
- c:\cygwin\bin\cat /proc/meminfo
|
||||||
- ps: |
|
- ps: |
|
||||||
if ($env:builder -eq "cmake")
|
if ($env:builder -eq "cmake")
|
||||||
{
|
{
|
||||||
if (Test-Path "$env:ChocolateyInstall\bin\jom.exe") {
|
if (Test-Path "$env:ChocolateyInstall\bin\jom.exe") {
|
||||||
echo "using jom from cache"
|
echo "using jom from cache"
|
||||||
} else {
|
} else {
|
||||||
choco install jom
|
choco install jom
|
||||||
}
|
|
||||||
if (Test-Path "$env:ChocolateyInstall\bin\cmake.exe") {
|
|
||||||
echo "using cmake from cache"
|
|
||||||
} else {
|
|
||||||
choco install cmake
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (Test-Path "$env:ChocolateyInstall\bin\cmake.exe") {
|
||||||
|
echo "using cmake from cache"
|
||||||
|
} else {
|
||||||
|
choco install cmake
|
||||||
|
}
|
||||||
|
}
|
||||||
- set
|
- set
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
@@ -207,37 +206,42 @@ install:
|
|||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
- ps: |
|
- ps: |
|
||||||
if ($env:vsver -eq "110")
|
if ($env:builder -eq "cmake")
|
||||||
{
|
{
|
||||||
$vspath= convert-path $env:VS110COMNTOOLS\..\..\VC\bin; $yyyy='2010'
|
if ($env:vsver -eq "110")
|
||||||
if($env:platform -eq 'Win32') { $vctool='';}
|
{
|
||||||
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
$vspath= convert-path $env:VS110COMNTOOLS\..\..\VC\bin; $yyyy='2010'
|
||||||
}
|
if($env:platform -eq 'Win32') { $vctool='';}
|
||||||
if ($env:vsver -eq "120")
|
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
||||||
{
|
|
||||||
$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 "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
|
# MySQL
|
||||||
|
# & C:\cygwin\bin\ls -lR $env:MYSQL32
|
||||||
|
# & C:\cygwin\bin\ls -lR $env:MYSQL64
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
- ps: |
|
- ps: |
|
||||||
if ($env:platform -eq "Win32")
|
if ($env:platform -eq "Win32")
|
||||||
@@ -250,7 +254,6 @@ before_build:
|
|||||||
$to = $env:MYSQL32 + "\bin\libmysql.dll"
|
$to = $env:MYSQL32 + "\bin\libmysql.dll"
|
||||||
copy $from $to
|
copy $from $to
|
||||||
}
|
}
|
||||||
& C:\cygwin\bin\ls -lR $env:MYSQL32
|
|
||||||
}
|
}
|
||||||
if ($env:platform -eq "x64")
|
if ($env:platform -eq "x64")
|
||||||
{
|
{
|
||||||
@@ -262,12 +265,11 @@ before_build:
|
|||||||
$to = $env:MYSQL64 + "\bin\libmysql.dll"
|
$to = $env:MYSQL64 + "\bin\libmysql.dll"
|
||||||
copy $from $to
|
copy $from $to
|
||||||
}
|
}
|
||||||
& C:\cygwin\bin\ls -lR $env:MYSQL64
|
|
||||||
}
|
}
|
||||||
$env:MYSQL_PWD="Password12!"
|
$env:MYSQL_PWD="Password12!"
|
||||||
$cmd = 'mysql -e "create database pocotestdb;" --user=root';
|
$cmd = 'mysql -e "create database pocotestdb;" --user=root';
|
||||||
iex "& $cmd"
|
iex "& $cmd"
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
# PostgreSQL
|
# PostgreSQL
|
||||||
@@ -285,6 +287,7 @@ before_build:
|
|||||||
$env:LIB = $env:POSTGRES64 + "\lib;" + $env:LIB
|
$env:LIB = $env:POSTGRES64 + "\lib;" + $env:LIB
|
||||||
$env:PATH = $env:POSTGRES64 + "\bin;" + $env:PATH
|
$env:PATH = $env:POSTGRES64 + "\bin;" + $env:PATH
|
||||||
}
|
}
|
||||||
|
# -------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
- ps: |
|
- ps: |
|
||||||
@@ -413,12 +416,12 @@ test_script:
|
|||||||
if ($env:platform -eq "Win32")
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
$env:PATH = "$env:POCO_BASE\bin;" + $env:PATH;$suffix = '';
|
$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")
|
if ($env:platform -eq "x64")
|
||||||
{
|
{
|
||||||
$env:PATH = "$env:POCO_BASE\bin64;" + $env:PATH;$suffix = 64;
|
$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;
|
Write-Host -ForegroundColor Yellow '>>> current directory is ' $(get-location).Path;
|
||||||
|
@@ -12,6 +12,8 @@
|
|||||||
#
|
#
|
||||||
LINKMODE ?= SHARED
|
LINKMODE ?= SHARED
|
||||||
|
|
||||||
|
OMIT = Data/PostgreSQL
|
||||||
|
|
||||||
#
|
#
|
||||||
# Define Tools
|
# Define Tools
|
||||||
#
|
#
|
||||||
|
@@ -9,8 +9,9 @@ Crypto
|
|||||||
NetSSL_OpenSSL
|
NetSSL_OpenSSL
|
||||||
NetSSL_Win
|
NetSSL_Win
|
||||||
Data
|
Data
|
||||||
Data/SQLite
|
|
||||||
Data/ODBC
|
Data/ODBC
|
||||||
|
Data/SQLite
|
||||||
|
Data/MySQL
|
||||||
Data/PostgreSQL
|
Data/PostgreSQL
|
||||||
Zip
|
Zip
|
||||||
PageCompiler
|
PageCompiler
|
||||||
@@ -21,4 +22,3 @@ MongoDB
|
|||||||
Redis
|
Redis
|
||||||
PocoDoc
|
PocoDoc
|
||||||
ProGen
|
ProGen
|
||||||
Data/MySQL
|
|
||||||
|
@@ -293,7 +293,7 @@ cppunit:
|
|||||||
$(MAKE) -C $(POCO_BASE)/CppUnit
|
$(MAKE) -C $(POCO_BASE)/CppUnit
|
||||||
|
|
||||||
CppUnit-clean:
|
CppUnit-clean:
|
||||||
$(MAKE) -C \$(POCO_BASE)/CppUnit clean
|
$(MAKE) -C $(POCO_BASE)/CppUnit clean
|
||||||
|
|
||||||
install: libexecs
|
install: libexecs
|
||||||
mkdir -p $(INSTALLDIR)/include/Poco
|
mkdir -p $(INSTALLDIR)/include/Poco
|
||||||
|
@@ -3,5 +3,5 @@
|
|||||||
# should be restored later on when the OSX environment would have
|
# should be restored later on when the OSX environment would have
|
||||||
# been fixed by Travis
|
# 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"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user