aboutsummaryrefslogtreecommitdiff
path: root/travis/install.sh
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2016-12-18 15:54:05 +0100
committerEven Rouault <even.rouault@spatialys.com>2017-01-19 13:15:13 +0100
commite2ee995cefd255ca6ab0c36027e405a4696260dd (patch)
treec95c26e888eff2ab89ff8cf8e81e8257c79068c7 /travis/install.sh
parent3e564829151f9fbbae7af052a8099ef50f2db3a7 (diff)
downloadPROJ-e2ee995cefd255ca6ab0c36027e405a4696260dd.tar.gz
PROJ-e2ee995cefd255ca6ab0c36027e405a4696260dd.zip
.travis.yml: add multi config setup
Setup 4 configs: Linux/GCC, Linux/CLang, OSX CLang and mingw32 OSX allowed to fail, since it fails in the proj -VC step.
Diffstat (limited to 'travis/install.sh')
-rwxr-xr-xtravis/install.sh99
1 files changed, 99 insertions, 0 deletions
diff --git a/travis/install.sh b/travis/install.sh
new file mode 100755
index 00000000..17280451
--- /dev/null
+++ b/travis/install.sh
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+set -e
+
+# prepare build files
+./autogen.sh
+# cmake build
+mkdir build_cmake
+cd build_cmake
+cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/proj_cmake_install
+make -j3
+make install
+find /tmp/proj_cmake_install
+cd ..
+# autoconf build
+mkdir build_autoconf
+cd build_autoconf
+../configure --prefix=/tmp/proj_autoconf_install
+make -j3
+make install
+make dist-all
+find /tmp/proj_autoconf_install
+make check
+# Check consistency of generated tarball
+TAR_FILENAME=`ls *.tar.gz`
+TAR_DIRECTORY=`basename $TAR_FILENAME .tar.gz`
+tar xvzf $TAR_FILENAME
+cd $TAR_DIRECTORY
+./configure --prefix=/tmp/proj_autoconf_install_from_dist_all
+make -j3
+make install
+make dist-all
+make check
+CURRENT_PWD=`pwd`
+cd /tmp/proj_autoconf_install
+find | sort > /tmp/list_proj_autoconf_install.txt
+cd /tmp/proj_autoconf_install_from_dist_all
+find | sort > /tmp/list_proj_autoconf_install_from_dist_all.txt
+cd $CURRENT_PWD
+# The list of file is not identical. See http://lists.maptools.org/pipermail/proj/2015-September/007231.html
+#diff -u /tmp/list_proj_autoconf_install.txt /tmp/list_proj_autoconf_install_from_dist_all.txt
+cd ..
+#
+cd ..
+# Now with grids
+wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip
+cd nad
+unzip -o ../proj-datumgrid-1.5.zip
+cd ..
+# cmake build with grids
+mkdir build_cmake_nad
+cd build_cmake_nad
+cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/proj_cmake_install_nad
+make -j3
+make install
+find /tmp/proj_cmake_install_nad
+cd ..
+# autoconf build with grids
+mkdir build_autoconf_nad
+cd build_autoconf_nad
+../configure --prefix=/tmp/proj_autoconf_install_nad
+make -j3
+make install
+find /tmp/proj_autoconf_install_nad
+make check
+cd src
+make multistresstest
+make test228
+cd ..
+PROJ_LIB=../nad src/multistresstest
+cd ..
+# autoconf build with grids and coverage
+if [ $TRAVIS_OS_NAME == "osx" ]; then
+ CFLAGS="-DPJ_SELFTEST --coverage" ./configure;
+ else
+ CFLAGS="-DPJ_SELFTEST --coverage" LDFLAGS="-lgcov" ./configure;
+ fi
+make -j3
+make check
+./src/proj -VC
+
+# install & run the working GIGS test
+ # create locations that pyproj understands
+python3 --version
+ln -s src include
+ln -s src/.libs lib
+mkdir share
+ln -s nad share/proj
+pwd
+ # install pyproj
+PROJ_DIR=`pwd` pip3 install -v --user pyproj
+
+cd test/gigs
+ # run test_json.py
+PROJ_LIB=../../nad python3 test_json.py --test conversion 5101.1-jhs.json 5101.4-jhs-etmerc.json 5105.2.json 5106.json 5108.json 5110.json 5111.1.json
+PROJ_LIB=../../nad python3 test_json.py 5101.2-jhs.json 5101.3-jhs.json 5102.1.json 5103.1.json 5103.2.json 5103.3.json 5107.json 5109.json 5112.json 5113.json 5201.json 5208.json
+cd ../..
+
+mv src/.libs/*.gc* src