forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
152 lines (143 loc) · 7.05 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
150
151
# This is the config file for building GDAL and running its autotest suite
# with Travis-ci.org
language: cpp
# We use clang, --without-libtool and --with-debug for faster build
compiler:
- clang
# remove libogdi3.2-dev : it pulls projects.h from PROJ.4 which no longer exists
before_install:
- sudo mv /etc/apt/sources.list.d/pgdg-source.list* /tmp
- sudo apt-get remove postgis libpq5 libpq-dev postgresql-9.1-postgis postgresql-9.2-postgis postgresql-9.3-postgis postgresql-9.1 postgresql-9.2 postgresql-9.3 libgdal1
- sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
- sudo add-apt-repository -y ppa:marlam/gta
- sudo apt-get update -qq
- sudo apt-get install python-numpy postgis postgresql-9.1 postgresql-client-9.1 postgresql-9.1-postgis-2.1 postgresql-9.1-postgis-2.1-scripts libpq-dev libpng12-dev libjpeg-dev libgif-dev liblzma-dev libgeos-dev libcurl4-gnutls-dev libproj-dev libxml2-dev libexpat-dev libxerces-c-dev libnetcdf-dev netcdf-bin libpoppler-dev libspatialite-dev gpsbabel swig libhdf4-alt-dev libhdf5-serial-dev libpodofo-dev poppler-utils libfreexl-dev unixodbc-dev libwebp-dev openjdk-7-jdk libepsilon-dev libgta-dev liblcms2-2 libpcre3-dev mercurial cmake libcrypto++-dev
- sudo apt-get install python-lxml
- sudo apt-get install python-pip
# Boost for Mongo
- sudo apt-get install libboost-regex-dev libboost-system-dev libboost-thread-dev
- sudo pip install pyflakes
- pyflakes autotest
- pyflakes gdal/swig/python/scripts
- pyflakes gdal/swig/python/samples
- psql -c "drop database if exists autotest" -U postgres
- psql -c "create database autotest" -U postgres
- psql -c "create extension postgis" -d autotest -U postgres
- mysql -e "create database autotest;"
- mysql -e "GRANT ALL ON autotest.* TO 'root'@'localhost';" -u root
- mysql -e "GRANT ALL ON autotest.* TO 'travis'@'localhost';" -u root
- wget http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/FileGDB_API_1_2-64.tar.gz
- wget http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44.tar.gz
- wget http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/install-libecwj2-ubuntu12.04-64bit.tar.gz
- wget http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/install-libkml-r864-64bit.tar.gz
- wget http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/install-openjpeg-2.0.0-ubuntu12.04-64bit.tar.gz
- wget http://even.rouault.free.fr/mongo-cxx-1.0.2-install-ubuntu12.04-64bit.tar.gz
- tar xzf MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44.tar.gz
- sudo cp -r MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44/Raster_DSDK/include/* /usr/local/include
- sudo cp -r MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44/Raster_DSDK/lib/* /usr/local/lib
- sudo cp -r MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44/Lidar_DSDK/include/* /usr/local/include
- sudo cp -r MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44/Lidar_DSDK/lib/* /usr/local/lib
- tar xzf FileGDB_API_1_2-64.tar.gz
- sudo cp -r FileGDB_API/include/* /usr/local/include
- sudo cp -r FileGDB_API/lib/* /usr/local/lib
- tar xzf install-libecwj2-ubuntu12.04-64bit.tar.gz
- sudo cp -r install-libecwj2/include/* /usr/local/include
- sudo cp -r install-libecwj2/lib/* /usr/local/lib
- tar xzf install-libkml-r864-64bit.tar.gz
- sudo cp -r install-libkml/include/* /usr/local/include
- sudo cp -r install-libkml/lib/* /usr/local/lib
- tar xzf install-openjpeg-2.0.0-ubuntu12.04-64bit.tar.gz
- sudo cp -r install-openjpeg/include/* /usr/local/include
- sudo cp -r install-openjpeg/lib/* /usr/local/lib
- tar xzf mongo-cxx-1.0.2-install-ubuntu12.04-64bit.tar.gz
- sudo cp -r mongo-cxx-1.0.2-install/include/* /usr/local/include
- sudo cp -r mongo-cxx-1.0.2-install/lib/* /usr/local/lib
- wget https://bitbucket.org/chchrsc/kealib/get/c6d36f3db5e4.zip
- unzip c6d36f3db5e4.zip
- cd chchrsc-kealib-c6d36f3db5e4/trunk
- cmake . -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DHDF5_INCLUDE_DIR=/usr/include -DHDF5_LIB_PATH=/usr/lib -DLIBKEA_WITH_GDAL=OFF
- make -j4
- sudo make install
- cd ../..
- sudo ldconfig
# installing PostGIS 2 from Ubuntu PPA draws libgdal1.9 dependency. We must install ourselves
# in /usr too to avoid gdal version conflict. Might be fragile however
install:
- cd gdal
- ./configure --prefix=/usr --without-libtool --enable-debug --with-jpeg12 --with-python --with-poppler --with-podofo --with-spatialite --with-mysql --with-liblzma --with-webp --with-java --with-mdb --with-jvm-lib-add-rpath --with-epsilon --with-gta --with-ecw=/usr/local --with-mrsid=/usr/local --with-mrsid-lidar=/usr/local --with-fgdb=/usr/local --with-libkml --with-openjpeg=/usr/local --with-mongocxx=/usr/local
- make USER_DEFS="-Wextra -Werror" -j3
- cd apps
- make USER_DEFS="-Wextra -Werror" test_ogrsf
- cd ..
- cd swig/java
- cat java.opt | sed "s/JAVA_HOME =.*/JAVA_HOME = \/usr\/lib\/jvm\/java-7-openjdk-amd64\//" > java.opt.tmp
- mv java.opt.tmp java.opt
- make
- cd ../..
- cd swig/perl
- make generate
- make
- cd ../..
- sudo rm -f /usr/lib/libgdal.so*
- sudo make install
- sudo ldconfig
- cd ../autotest/cpp
- make -j3
- cd ../../gdal
- wget http://mdb-sqlite.googlecode.com/files/mdb-sqlite-1.0.2.tar.bz2
- tar xjvf mdb-sqlite-1.0.2.tar.bz2
- sudo cp mdb-sqlite-1.0.2/lib/*.jar /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext
# When run in the same process after ogr_pgeo.py (with the MDB driver), FileGDB tests fail.
# Run it in isolation
script:
# Perl unit tests
- cd swig/perl
- make test
- cd ../..
# Java unit tests
- cd swig/java
- make test
- cd ../..
# CPP unit tests
- cd ../autotest
- cd cpp
- GDAL_SKIP=JP2ECW make quick_test
# Compile and test vsipreload
- make vsipreload.so
- LD_PRELOAD=./vsipreload.so gdalinfo /vsicurl/http://download.osgeo.org/gdal/data/ecw/spif83.ecw
- LD_PRELOAD=./vsipreload.so sqlite3 /vsicurl/http://download.osgeo.org/gdal/data/sqlite3/polygon.db "select * from polygon limit 10"
- cd ..
# Download a sample file
- mkdir -p ogr/tmp/cache/
- cd ogr/tmp/cache/
- wget http://download.osgeo.org/gdal/data/pgeo/PGeoTest.zip
- unzip PGeoTest.zip
- cd ../../..
# Run ogr_fgdb.py in isolation from the rest
- cd ogr
- python ogr_fgdb.py
- mkdir disabled
- mv ogr_fgdb.* disabled
- cd ..
# Run ogr_pgeo.py in isolation from the rest
- cd ogr
- python ogr_pgeo.py
- mv ogr_pgeo.* disabled
- cd ..
# Run all the Python autotests
- GDAL_SKIP="JP2ECW ECW" python run_all.py
# A bit messy, but force testing with libspatialite 4.0dev (that has been patched a bit to remove any hard-coded SRS definition so it is very small)
- cd ogr
- wget http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/libspatialite4.0dev_ubuntu12.04-64bit_srs_stripped.tar.gz
- tar xzf libspatialite4.0dev_ubuntu12.04-64bit_srs_stripped.tar.gz
- ln -s install-libspatialite-4.0dev/lib/libspatialite.so.5.0.1 libspatialite.so.3
- LD_LIBRARY_PATH=$PWD python ogr_sqlite.py
- cd ..
notifications:
email:
recipients:
irc:
channels:
- "irc.freenode.org#gdal"
use_notice: true