2017-02-16 18:43:11 +03:00
|
|
|
version : 2.x.{build}
|
|
|
|
|
|
|
|
clone_folder: C:\Project
|
|
|
|
|
|
|
|
environment:
|
|
|
|
global:
|
|
|
|
# MSVC Express 2008's setenv.cmd failes if /E:ON and /V:ON are not
|
|
|
|
# enabled in the batch script interpreter
|
|
|
|
CMD_IN_ENV: cmd /E:ON /V:ON /C .\appveyor\run_with_env.cmd
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
# For Python versions available on Appveyor, see
|
2018-09-23 04:54:55 +03:00
|
|
|
# https://www.appveyor.com/docs/build-environment/
|
2018-01-29 04:56:10 +03:00
|
|
|
- {PYVER: "27", PYTHON_ARCH: "32"}
|
|
|
|
- {PYVER: "27", PYTHON_ARCH: "64"}
|
2018-06-28 16:28:50 +03:00
|
|
|
- {PYVER: "37", PYTHON_ARCH: "32"}
|
|
|
|
- {PYVER: "37", PYTHON_ARCH: "64"}
|
2019-03-18 03:33:31 +03:00
|
|
|
- {PYVER: "36", PYTHON_ARCH: "32"}
|
|
|
|
- {PYVER: "36", PYTHON_ARCH: "64"}
|
|
|
|
- {PYVER: "35", PYTHON_ARCH: "32"}
|
|
|
|
- {PYVER: "35", PYTHON_ARCH: "64"}
|
|
|
|
- {PYVER: "34", PYTHON_ARCH: "32"}
|
|
|
|
- {PYVER: "34", PYTHON_ARCH: "64"}
|
2018-06-28 16:28:50 +03:00
|
|
|
|
2019-04-11 01:46:05 +03:00
|
|
|
OPENSSL_VERSION: "1_1_1b"
|
2019-03-18 04:09:12 +03:00
|
|
|
POSTGRES_VERSION: "11_2"
|
2018-01-29 04:57:17 +03:00
|
|
|
|
2017-02-16 18:43:11 +03:00
|
|
|
PSYCOPG2_TESTDB: psycopg2_test
|
|
|
|
PSYCOPG2_TESTDB_USER: postgres
|
|
|
|
PSYCOPG2_TESTDB_HOST: localhost
|
|
|
|
|
|
|
|
PGUSER: postgres
|
|
|
|
PGPASSWORD: Password12!
|
|
|
|
|
2019-04-14 22:10:51 +03:00
|
|
|
# The python used in the build process, not the one packages are built for
|
|
|
|
PYEXE: C:\Python36\python.exe
|
|
|
|
|
2017-02-16 18:43:11 +03:00
|
|
|
matrix:
|
|
|
|
fast_finish: false
|
|
|
|
|
|
|
|
services:
|
2017-10-24 13:03:14 +03:00
|
|
|
# Note: if you change this service also change the paths to match
|
|
|
|
# (see where Program Files\Postgres\9.6 is used)
|
2017-06-08 23:21:30 +03:00
|
|
|
- postgresql96
|
2017-02-16 18:43:11 +03:00
|
|
|
|
|
|
|
cache:
|
|
|
|
# Rebuild cache if following file changes
|
2017-10-24 13:03:14 +03:00
|
|
|
# (See the file to zap the cache manually)
|
2017-02-16 18:43:11 +03:00
|
|
|
- C:\Others -> scripts\appveyor.cache_rebuild
|
|
|
|
|
|
|
|
# Script called before repo cloning
|
|
|
|
init:
|
2019-04-14 22:10:51 +03:00
|
|
|
# TODO: move functionalities out of init to drop this fetch problem
|
|
|
|
- curl -fsSL -o "C:\\appveyor.py" https://raw.githubusercontent.com/psycopg/psycopg2/%APPVEYOR_REPO_COMMIT%/scripts/appveyor.py
|
|
|
|
- "%PYEXE% C:\\appveyor.py init"
|
|
|
|
|
|
|
|
# TODO: exporting variables below to be dropped once all the steps are
|
|
|
|
# moved to the appveyor.py script.
|
2018-01-29 04:56:10 +03:00
|
|
|
|
|
|
|
# Set env variable according to the build environment
|
|
|
|
- SET PYTHON=C:\Python%PYVER%
|
|
|
|
- IF "%PYTHON_ARCH%"=="64" SET PYTHON=%PYTHON%-x64
|
|
|
|
|
|
|
|
# Py 2.7 = VS Ver. 9.0 (VS 2008)
|
2018-12-01 20:08:10 +03:00
|
|
|
# Py 3.4 = VS Ver. 10.0 (VS 2010)
|
|
|
|
# Py 3.5, 3.6, 3.7 = VS Ver. 14.0 (VS 2015)
|
2018-01-29 04:56:10 +03:00
|
|
|
- IF "%PYVER%"=="27" SET VS_VER=9.0
|
|
|
|
- IF "%PYVER%"=="34" SET VS_VER=10.0
|
|
|
|
- IF "%PYVER%"=="35" SET VS_VER=14.0
|
|
|
|
- IF "%PYVER%"=="36" SET VS_VER=14.0
|
2018-06-28 16:28:50 +03:00
|
|
|
- IF "%PYVER%"=="37" SET VS_VER=14.0
|
2018-01-29 04:56:10 +03:00
|
|
|
|
|
|
|
- IF "%VS_VER%"=="10.0" IF "%PYTHON_ARCH%"=="64" SET DISTUTILS_USE_SDK=1
|
|
|
|
|
2017-02-16 18:43:11 +03:00
|
|
|
# Set Python to the path
|
2017-03-22 06:50:04 +03:00
|
|
|
- SET PATH=%PYTHON%;%PYTHON%\Scripts;C:\Program Files\Git\mingw64\bin;%PATH%
|
2017-02-16 18:43:11 +03:00
|
|
|
|
|
|
|
# Setup the compiler based upon version and architecture
|
|
|
|
- ECHO Configuring Compiler
|
|
|
|
- IF "%PYTHON_ARCH%"=="32" (CALL "C:\\Program Files (x86)\\Microsoft Visual Studio %VS_VER%\\VC\\vcvarsall.bat" x86)
|
|
|
|
- IF "%PYTHON_ARCH%"=="64" (CALL "C:\\Program Files (x86)\\Microsoft Visual Studio %VS_VER%\\VC\\vcvarsall.bat" amd64)
|
|
|
|
|
|
|
|
|
|
|
|
# Repository gets cloned, Cache is restored
|
2019-04-15 04:07:03 +03:00
|
|
|
|
2017-02-16 18:43:11 +03:00
|
|
|
install:
|
2019-04-15 00:43:28 +03:00
|
|
|
- "%PYEXE% C:\\appveyor.py install"
|
2017-02-16 18:43:11 +03:00
|
|
|
|
2019-04-15 04:07:03 +03:00
|
|
|
# PostgreSQL server starts now
|
2017-02-16 18:43:11 +03:00
|
|
|
|
2019-04-15 04:07:03 +03:00
|
|
|
build: off
|
2017-02-16 18:43:11 +03:00
|
|
|
|
|
|
|
build_script:
|
2019-04-15 04:07:03 +03:00
|
|
|
- "%PYEXE% C:\\appveyor.py build_script"
|
|
|
|
|
2017-02-16 18:43:11 +03:00
|
|
|
|
|
|
|
before_test:
|
|
|
|
# Create and setup PostgreSQL database for the tests
|
|
|
|
- createdb %PSYCOPG2_TESTDB%
|
2017-02-16 18:59:37 +03:00
|
|
|
- psql -d %PSYCOPG2_TESTDB% -c "CREATE EXTENSION HSTORE;"
|
2017-02-16 18:43:11 +03:00
|
|
|
|
|
|
|
test_script:
|
2017-10-24 13:03:14 +03:00
|
|
|
# Print psycopg and libpq versions
|
2017-02-16 18:43:11 +03:00
|
|
|
- "%PYTHON%\\python.exe -c \"import psycopg2; print(psycopg2.__version__)\""
|
2017-10-24 13:03:14 +03:00
|
|
|
- "%PYTHON%\\python.exe -c \"import psycopg2; print(psycopg2.__libpq_version__)\""
|
|
|
|
- "%PYTHON%\\python.exe -c \"import psycopg2; print(psycopg2.extensions.libpq_version())\""
|
2017-12-04 05:47:19 +03:00
|
|
|
- "%PYTHON%\\python.exe -c \"import tests; tests.unittest.main(defaultTest='tests.test_suite')\" --verbose"
|
2019-04-14 22:10:51 +03:00
|
|
|
|
|
|
|
|
|
|
|
# vim: set ts=4 sts=4 sw=4:
|