forked from blue-yonder/turbodbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
142 lines (130 loc) · 4.31 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
dist: trusty
sudo: required
matrix:
include:
- os: osx
osx_image: xcode6.4
language: generic
env:
- TRAVIS_PYTHON_VERSION="2.7.12"
- TURBODBC_TEST_CONFIGURATION_FILES="query_fixtures_postgresql.json"
- ODBC_DIR=odbc_osx
# Disable for now until a workaround for the detection of pyenv versions by pybind11
# is found
# - os: osx
# language: generic
# env:
# - TRAVIS_PYTHON_VERSION="3.6.0"
# - TURBODBC_TEST_CONFIGURATION_FILES="query_fixtures_postgresql.json"
# - ODBC_DIR=odbc_osx
- os: linux
language: python
python: "2.7"
env:
- TURBODBC_TEST_CONFIGURATION_FILES="query_fixtures_postgresql.json,query_fixtures_mysql.json"
- ODBC_DIR=odbc
- os: linux
language: python
python: "3.4"
env:
- TURBODBC_TEST_CONFIGURATION_FILES="query_fixtures_postgresql.json,query_fixtures_mysql.json"
- ODBC_DIR=odbc
- os: linux
language: python
python: "3.5"
env:
- TURBODBC_TEST_CONFIGURATION_FILES="query_fixtures_postgresql.json,query_fixtures_mysql.json"
- ODBC_DIR=odbc
- os: linux
language: python
python: "3.6"
env:
- TURBODBC_TEST_CONFIGURATION_FILES="query_fixtures_postgresql.json,query_fixtures_mysql.json"
- ODBC_DIR=odbc
services:
- mysql
- postgresql
addons:
apt:
packages:
- unixodbc
- unixodbc-dev
- libboost-date-time-dev
- libboost-locale-dev
- libboost-system-dev
- libmyodbc
- odbc-postgresql=1:09.02.0100-2ubuntu1
before_install: |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
brew outdated pyenv || brew upgrade pyenv
brew install unixodbc
brew install pyenv-virtualenv
brew install psqlodbc
eval "$(pyenv init -)"
pyenv install ${TRAVIS_PYTHON_VERSION}
pyenv virtualenv ${TRAVIS_PYTHON_VERSION} turbodbc
pyenv activate turbodbc
python --version
pip install pytest mock
echo "Setting up preinstalled PostgreSQL database"
rm -rf /usr/local/var/postgres
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -w start
createuser -s postgres
psql -U postgres -c 'CREATE DATABASE test_db;'
psql -U postgres -c "ALTER USER postgres WITH PASSWORD 'password';"
fi
install:
- pip install numpy==1.10.4 pyarrow==0.8.0 six twine pytest-cov coveralls pandas
before_script: |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
$TRAVIS_BUILD_DIR/travis/setup_test_dbs.sh
fi
script:
- export ODBCSYSINI=${PWD}/travis/${ODBC_DIR}
- mkdir build && cd build
- cmake -DBUILD_COVERAGE=ON -DCMAKE_INSTALL_PREFIX=./dist -DPYBIND11_PYTHON_VERSION=${TRAVIS_PYTHON_VERSION} ..
- make -j4
- pip install numpy==1.10.4
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
ctest -E turbodbc_arrow_unit_test --verbose
else
ctest --verbose
fi
- cd ..
- mkdir gcov
- cd gcov
- gcov -l -p `find ../build -name "*.gcda"` > /dev/null
- echo "Removing coverage for boost and C++ standard library"
- find . -name "*#boost#*" | xargs rm
- find . -name "*#c++#*" | xargs rm
- cd ..
- cd python/turbodbc_test/
- echo "Uploading Python coverage"
- bash <(curl -s https://codecov.io/bash) -s $PWD/gcov/ -s $PWD -X gcov
- cd ../..
- echo "Uploading C++ coverage"
- bash <(curl -s https://codecov.io/bash) -s $PWD/gcov/ -X coveragepy -X gcov
- cd build
- make install
- cd dist
- python setup.py sdist
- cd dist
- pip install *.tar.gz
- cd ..
- rm -rf dist
deploy:
skip_cleanup: true
provider: pypi
server: "https://upload.pypi.org/legacy/"
user: MathMagic
password:
secure: "A0Xv0/7EXcDUzevO3lLVr6OUg1wy1NrFKGwruHr0rUfdBBRmDHVm2njvuiRkPgMH0IiWw/HscxNvHYs1U1CpGsWLJ+/TLOc5UQEKl9kkopEAPrwgQeIg7jOiC6bUDgXbZ5iYU8PIl7ygpBNoGJ2sdIP4nwH1COtntSdVr3oy7VwcVge0QhvccYTt4b49YcaJ6rBMntBWo2UhFZ1PGGWrCbPJB+lhwOv1OkbIyV8jXQ3FrENJGIDQiVMoTdWdoYDPP05lFVrsADwD+TRxEdM7z+cIyFhTTUuabRbPDyRiUd69it2WfCRUb4r+fNeF1abh8GRkk5jE4RQWt/DJiZG/yqZU3SKvIf4/pxZywpmqIZr6CEAJ3iriHHN0Khv1fPnyJ6LJ+paOHcrkDKFTbOb32pOjOdDr9UVN5z7tHdN1MmrrMAbzaIcldLcHq69iocXfUWWR5H/CR43Tm422z0ILbMsdQ+z2epTG+l/qLs8ZxSjWeleMIff5n2x3k6U4QXcdwM8x8axYYgq9WoutI90/97zpvf0h8J8K5+Mr7ucNRLbsPU0OKMZknBOT0SRtJFxokDYZU0OCFLIukIlUYCRuh4es/9w30+kPExfhB5i7LKnpvILtPqIU6KDiUQe8mW1+GnnW/hk3WCdkLT6gwOBNBLVPoIJEuCcYjKdHksMrCnY="
on:
tags: true
os: linux
python: "2.7"
branch: master
repo: blue-yonder/turbodbc