forked from osm2pgsql-dev/osm2pgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
150 lines (133 loc) · 4.89 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
language: generic
sudo: required
git:
depth: 1
addons:
# Here we install only packages that are the same for all builds on ubuntu.
apt:
packages: ['python3-psycopg2', 'libexpat1-dev', 'libpq-dev', 'libbz2-dev',
'libproj-dev', 'libluajit-5.1-dev',
'libboost-dev', 'libboost-system-dev', 'libboost-filesystem-dev']
# env: T="...." // please set an unique test id (T="..")
matrix:
include:
# ---- Release build against all postgresql versions
- os: linux
dist: bionic
compiler: gcc-8
env: T="bionic_gcc8_all_luajit_release"
PG_VERSIONS="9.3 9.4 9.5 9.6 10 11 12"
LUA_VERSION=5.3
BUILD_TYPE="Release" LUAJIT_OPTION="ON"
CXXFLAGS="-pedantic -Wextra -Werror"
CC=gcc-8 CXX=g++-8 CPPVERSION=14
# ---- Linux + CLANG ---------------------------
- os: linux
dist: xenial
compiler: "clang-3.5"
env: T="xenial_clang35_pg95_luajit"
PG_VERSIONS=9.5
POSTGIS_VERSION=2.3
LUA_VERSION=5.1
BUILD_TYPE="Debug" LUAJIT_OPTION="ON"
CXXFLAGS="-pedantic -Wextra -Werror"
CC=clang-3.5 CXX=clang++-3.5 CPPVERSION=11
- os: linux
dist: bionic
compiler: "clang-7"
env: T="bionic_clang7_pg10"
PG_VERSIONS=10
POSTGIS_VERSION=2.5
LUA_VERSION=5.3
BUILD_TYPE="Debug" LUAJIT_OPTION="OFF"
CXXFLAGS="-pedantic -Wextra -Werror"
CC=clang-7 CXX=clang++-7 CPPVERSION=14
# ---- OSX + CLANG ---------------------------
# - os: osx
# compiler: clang
# env: T="osx_clang_NoDB"
# BUILD_TYPE="Debug" LUAJIT_OPTION="OFF" TEST_NODB=1
# CXXFLAGS="-pedantic -Wextra -Werror" CPPVERSION=11
# before_install:
# - brew install lua; brew install lua
# before_script:
# - proj | head -n1
# - lua -v
# ---- Linux + GCC ---------------------------
- os: linux
dist: xenial
compiler: "gcc-5"
env: T="xenial_gcc5_pg94"
PG_VERSIONS=9.4
POSTGIS_VERSION=2.2
LUA_VERSION=5.3
BUILD_TYPE="Debug" LUAJIT_OPTION="OFF"
CXXFLAGS="-pedantic -Wextra -Werror"
CC=gcc-5 CXX=g++-5 CPPVERSION=11
- os: linux
dist: bionic
compiler: gcc-7
env: T="bionic_gcc7_pg12"
PG_VERSIONS=12
POSTGIS_VERSION=3
LUA_VERSION=5.1
BUILD_TYPE="Debug" LUAJIT_OPTION="OFF"
CXXFLAGS="-pedantic -Wextra -Werror"
CC=gcc-7 CXX=g++-7 CPPVERSION=11
- os: linux
dist: bionic
compiler: gcc-8
env: T="bionic_gcc8_pg10_luajit"
PG_VERSIONS=10
POSTGIS_VERSION=2.4
LUA_VERSION=5.2
BUILD_TYPE="Debug" LUAJIT_OPTION="ON"
CXXFLAGS="-pedantic -Wextra -Werror"
CC=gcc-8 CXX=g++-8 CPPVERSION=11
- os: linux
dist: focal
compiler: gcc-9
env: T="focal_gcc9_pg12_luajit"
PG_VERSIONS=12
POSTGIS_VERSION=3
LUA_VERSION=5.2
BUILD_TYPE="Debug" LUAJIT_OPTION="ON"
CXXFLAGS="-pedantic -Wextra -Werror"
CC=gcc-9 CXX=g++-9 CPPVERSION=11
before_install:
- dpkg -l | grep -E 'lua|proj|bz2|postgresql|postgis|zlib|boost|expat' # checking available versions
- sudo apt-get remove -yq postgresql-.*-postgis-.*
- apt-cache search --names-only postgresql-.*-postgis
- apt-cache search --names-only postgresql-.*
- for PG_VERSION in $PG_VERSIONS; do
if [[ "a$POSTGIS_VERSION" = "a" ]]; then
PPG=`apt-cache search --names-only postgresql-$PG_VERSION-postgis-[0-9.]*$ | tail -n1 | cut -d ' ' -f 1`;
else
PPG=postgresql-$PG_VERSION-postgis-$POSTGIS_VERSION;
fi;
export POSTGIS_PKG="$POSTGIS_PKG $PPG $PPG-scripts";
done
- echo $POSTGIS_PKG
- sudo -E apt-get install -yq --no-install-suggests --no-install-recommends $CC $POSTGIS_PKG liblua$LUA_VERSION-dev lua$LUA_VERSION
# g++ needs extra install, clang doesn't, so ignore errors here
- sudo -E apt-get install -yq --no-install-suggests --no-install-recommends $CXX || true
before_script:
- for PG_VERSION in $PG_VERSIONS; do PAGER= pg_virtualenv -v $PG_VERSION psql -ena -c "select * from pg_available_extensions where name = 'postgis'" -c "SELECT version()" -c "CREATE EXTENSION postgis" -c "CREATE EXTENSION hstore" -c "SELECT PostGIS_Full_Version()"; done
- $CXX --version
- proj | head -n1
script:
- mkdir build && cd build
- cmake .. -LA -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_STANDARD=${CPPVERSION} -DWITH_LUAJIT=${LUAJIT_OPTION}
- make -j2
- echo "Running tests ... "
- if [[ $TEST_NODB ]]; then
ctest -VV -L NoDB;
else
for PG_VERSION in $PG_VERSIONS; do
pg_virtualenv -v $PG_VERSION ctest -VV;
if [[ $? -ne "0" ]]; then exit 2; fi
done
fi
after_failure:
- # rerun make, but verbosely
make VERBOSE=1