mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 02:43:43 +03:00
Build/Test against newer PostgreSQL/OpenSSL
Test against PostgreSQL 9.6 and build against newer libraries: OpenSSL: 1.0.2l PostgreSQL: 9.6.3
This commit is contained in:
parent
c837261ac1
commit
63cc9ea24b
|
@ -73,7 +73,7 @@ matrix:
|
||||||
fast_finish: false
|
fast_finish: false
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- postgresql95
|
- postgresql96
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
# Rebuild cache if following file changes
|
# Rebuild cache if following file changes
|
||||||
|
@ -115,7 +115,7 @@ init:
|
||||||
|
|
||||||
# Change PostgreSQL config before service starts to allow > 1 prepared
|
# Change PostgreSQL config before service starts to allow > 1 prepared
|
||||||
# transactions for test cases
|
# transactions for test cases
|
||||||
- ECHO max_prepared_transactions = 10 >> "C:\\Program Files\\PostgreSQL\\9.5\\data\\postgresql.conf"
|
- ECHO max_prepared_transactions = 10 >> "C:\\Program Files\\PostgreSQL\\9.6\\data\\postgresql.conf"
|
||||||
|
|
||||||
|
|
||||||
# Repository gets cloned, Cache is restored
|
# Repository gets cloned, Cache is restored
|
||||||
|
@ -154,8 +154,8 @@ install:
|
||||||
}
|
}
|
||||||
# Download OpenSSL source
|
# Download OpenSSL source
|
||||||
- CD C:\Others
|
- CD C:\Others
|
||||||
- IF NOT EXIST OpenSSL_1_0_2k.zip (
|
- IF NOT EXIST OpenSSL_1_0_2l.zip (
|
||||||
curl -fsSL -o OpenSSL_1_0_2k.zip https://github.com/openssl/openssl/archive/OpenSSL_1_0_2k.zip
|
curl -fsSL -o OpenSSL_1_0_2l.zip https://github.com/openssl/openssl/archive/OpenSSL_1_0_2l.zip
|
||||||
)
|
)
|
||||||
|
|
||||||
# To use OpenSSL >= 1.1.0, both libpq and psycopg build environments have
|
# To use OpenSSL >= 1.1.0, both libpq and psycopg build environments have
|
||||||
|
@ -167,15 +167,15 @@ install:
|
||||||
# - nmake build_libs install_dev
|
# - nmake build_libs install_dev
|
||||||
- IF NOT EXIST %OPENSSLTOP%\lib\ssleay32.lib (
|
- IF NOT EXIST %OPENSSLTOP%\lib\ssleay32.lib (
|
||||||
CD %BUILD_DIR% &&
|
CD %BUILD_DIR% &&
|
||||||
7z x C:\Others\OpenSSL_1_0_2k.zip &&
|
7z x C:\Others\OpenSSL_1_0_2l.zip &&
|
||||||
CD openssl-OpenSSL_1_0_2k &&
|
CD openssl-OpenSSL_1_0_2l &&
|
||||||
perl Configure %TARGET% no-asm no-shared no-zlib --prefix=%OPENSSLTOP% --openssldir=%OPENSSLTOP% &&
|
perl Configure %TARGET% no-asm no-shared no-zlib --prefix=%OPENSSLTOP% --openssldir=%OPENSSLTOP% &&
|
||||||
CALL ms\%DO% &&
|
CALL ms\%DO% &&
|
||||||
nmake -f ms\nt.mak init headers lib &&
|
nmake -f ms\nt.mak init headers lib &&
|
||||||
COPY inc32\openssl\*.h %OPENSSLTOP%\include\openssl &&
|
COPY inc32\openssl\*.h %OPENSSLTOP%\include\openssl &&
|
||||||
COPY out32\*.lib %OPENSSLTOP%\lib &&
|
COPY out32\*.lib %OPENSSLTOP%\lib &&
|
||||||
CD %BASE_DIR% &&
|
CD %BASE_DIR% &&
|
||||||
RMDIR /S /Q %BUILD_DIR%\openssl-OpenSSL_1_0_2k
|
RMDIR /S /Q %BUILD_DIR%\openssl-OpenSSL_1_0_2l
|
||||||
)
|
)
|
||||||
|
|
||||||
# Setup directories for building PostgreSQL librarires
|
# Setup directories for building PostgreSQL librarires
|
||||||
|
@ -187,19 +187,19 @@ install:
|
||||||
- IF NOT EXIST %PGTOP%\lib MKDIR %PGTOP%\lib
|
- IF NOT EXIST %PGTOP%\lib MKDIR %PGTOP%\lib
|
||||||
# Download PostgreSQL source
|
# Download PostgreSQL source
|
||||||
- CD C:\Others
|
- CD C:\Others
|
||||||
- IF NOT EXIST postgres-REL9_6_2.zip (
|
- IF NOT EXIST postgres-REL9_6_3.zip (
|
||||||
curl -fsSL -o postgres-REL9_6_2.zip https://github.com/postgres/postgres/archive/REL9_6_2.zip
|
curl -fsSL -o postgres-REL9_6_3.zip https://github.com/postgres/postgres/archive/REL9_6_3.zip
|
||||||
)
|
)
|
||||||
|
|
||||||
# Setup build config file (config.pl)
|
# Setup build config file (config.pl)
|
||||||
# Build libpgport first
|
# Build libpgport first
|
||||||
# Build libpq
|
# Build libpq
|
||||||
# NOTE: Cannot set and use the same variable inside an IF
|
# NOTE: Cannot set and use the same variable inside an IF
|
||||||
- SET PGBUILD=%BUILD_DIR%\postgres-REL9_6_2
|
- SET PGBUILD=%BUILD_DIR%\postgres-REL9_6_3
|
||||||
- IF NOT EXIST %PGTOP%\lib\libpq.lib (
|
- IF NOT EXIST %PGTOP%\lib\libpq.lib (
|
||||||
CD %BUILD_DIR% &&
|
CD %BUILD_DIR% &&
|
||||||
7z x C:\Others\postgres-REL9_6_2.zip &&
|
7z x C:\Others\postgres-REL9_6_3.zip &&
|
||||||
CD postgres-REL9_6_2\src\tools\msvc &&
|
CD postgres-REL9_6_3\src\tools\msvc &&
|
||||||
ECHO $config-^>{ldap} = 0; > config.pl &&
|
ECHO $config-^>{ldap} = 0; > config.pl &&
|
||||||
ECHO $config-^>{openssl} = "%OPENSSLTOP:\=\\%"; >> config.pl &&
|
ECHO $config-^>{openssl} = "%OPENSSLTOP:\=\\%"; >> config.pl &&
|
||||||
ECHO.>> config.pl &&
|
ECHO.>> config.pl &&
|
||||||
|
@ -221,7 +221,7 @@ build: off
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
# Add PostgreSQL binaries to the path
|
# Add PostgreSQL binaries to the path
|
||||||
- PATH=C:\Program Files\PostgreSQL\9.5\bin\;%PATH%
|
- PATH=C:\Program Files\PostgreSQL\9.6\bin\;%PATH%
|
||||||
- CD C:\Project
|
- CD C:\Project
|
||||||
- "%PYTHON%\\python.exe setup.py build_ext --have-ssl -l libpgcommon -L %OPENSSLTOP%\\lib;%PGTOP%\\lib -I %OPENSSLTOP%\\include;%PGTOP%\\include"
|
- "%PYTHON%\\python.exe setup.py build_ext --have-ssl -l libpgcommon -L %OPENSSLTOP%\\lib;%PGTOP%\\lib -I %OPENSSLTOP%\\include;%PGTOP%\\include"
|
||||||
- "%PYTHON%\\python.exe setup.py build"
|
- "%PYTHON%\\python.exe setup.py build"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user