forked from pgRouting/pgrouting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
150 lines (131 loc) · 4.77 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
143
144
145
146
147
148
149
# ------------------------------------------------------------------------------
# Travis CI scripts
# Copyright(c) pgRouting Contributors
#
# Main configuration
# ------------------------------------------------------------------------------
dist: xenial
sudo: required
language: cpp
compiler:
- g++
python:
- "3.5"
- "pypy3.5"
matrix:
include:
- os: linux
env: POSTGRESQL_VERSION=10 DOCUMENTATION=OFF BUILD_TYPE=Debug
addons:
postgresql: 10
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-10-postgis-2.4
- postgresql-10-postgis-2.4-scripts
- postgresql-10-pgtap
- postgresql-server-dev-10
- libboost-graph-dev
- libtap-parser-sourcehandler-pgtap-perl
- os: linux
env: POSTGRESQL_VERSION=9.6 DOCUMENTATION=OFF BUILD_TYPE=Debug
addons:
postgresql: 9.6
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-9.6-postgis-2.4
- postgresql-9.6-postgis-2.4-scripts
- postgresql-9.6-pgtap
- postgresql-server-dev-9.6
- libboost-graph-dev
- libtap-parser-sourcehandler-pgtap-perl
- os: linux
env: POSTGRESQL_VERSION=9.5 DOCUMENTATION=OFF BUILD_TYPE=Debug
addons:
postgresql: 9.5
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-9.5-postgis-2.4
- postgresql-9.5-postgis-2.4-scripts
- postgresql-9.5-pgtap
- postgresql-server-dev-9.5
- libboost-graph-dev
- libtap-parser-sourcehandler-pgtap-perl
- os: linux
env: POSTGRESQL_VERSION=9.4 DOCUMENTATION=OFF BUILD_TYPE=Debug
addons:
postgresql: 9.4
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-9.4-postgis-2.4
- postgresql-9.4-postgis-2.4-scripts
- postgresql-9.4-pgtap
- postgresql-server-dev-9.4
- libboost-graph-dev
- libtap-parser-sourcehandler-pgtap-perl
- os: linux
env: POSTGRESQL_VERSION=9.6 DOCUMENTATION=OFF BUILD_TYPE=Release
addons:
postgresql: 9.6
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-9.6-postgis-2.4
- postgresql-9.6-postgis-2.4-scripts
- postgresql-9.6-pgtap
- postgresql-server-dev-9.6
- libboost-graph-dev
- libtap-parser-sourcehandler-pgtap-perl
- os: linux
env: POSTGRESQL_VERSION=9.6 DOCUMENTATION=ON BUILD_TYPE=Release
addons:
postgresql: 9.6
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-server-dev-9.6
- libboost-graph-dev
- python-sphinx
before_install:
- sudo updatedb
- locate pg_config
- PGR_VERSION=$(grep -Po '(?<=project\(PGROUTING VERSION )[^;]+' CMakeLists.txt)
- echo "Building for $PGR_VERSION"
- sudo service postgresql stop
- sed -e 's/^port.*/port = 5432/' /etc/postgresql/$POSTGRESQL_VERSION/main/postgresql.conf > postgresql.conf
- sudo chown postgres postgresql.conf
- sudo mv postgresql.conf /etc/postgresql/$POSTGRESQL_VERSION/main
- sudo service postgresql start
install:
- if [ "$DOCUMENTATION" == "ON" ]; then sphinx-build --version; fi
before_script:
- export PATH=/usr/lib/postgresql/$POSTGRESQL_VERSION/bin:$PATH
- if [ "$DOCUMENTATION" == "OFF" ]; then /usr/lib/postgresql/$POSTGRESQL_VERSION/bin/psql -p 5432 -U postgres -c "CREATE EXTENSION postgis"; fi
# initialize databases
- createdb -U postgres ___pgr___test___
- createdb -U postgres pgr_test__db__test
- mkdir build
- cd build
- cmake -DPOSTGRESQL_VERSION=$POSTGRESQL_VERSION -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWITH_DOC=$DOCUMENTATION ..
script:
- if [ "$DOCUMENTATION" == "OFF" ]; then make; sudo make install; sudo cp /usr/lib/postgresql/11/lib/libpgrouting-3.0.so /usr/lib/postgresql/$POSTGRESQL_VERSION/lib/libpgrouting-3.0.so; sudo cp /usr/share/postgresql/11/extension/pgrouting* /usr/share/postgresql/$POSTGRESQL_VERSION/extension; fi
- if [ "$DOCUMENTATION" == "ON" ]; then make doc; fi
# tests as part of script so if a test fails the build fails
- cd ..
- if [ "$DOCUMENTATION" == "OFF" ]; then bash ./tools/testers/pg_prove_tests.sh postgres 5432 $BUILD_TYPE; fi
- if [ "$DOCUMENTATION" == "OFF" ] && [ "$BUILD_TYPE" == "Debug" ]; then bash ./ci/travis/doc-quieries_test.sh $POSTGRESQL_VERSION postgres; fi