aboutsummaryrefslogtreecommitdiff
path: root/travis
diff options
context:
space:
mode:
Diffstat (limited to 'travis')
-rwxr-xr-xtravis/install.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/travis/install.sh b/travis/install.sh
index 1b0cc759..334dcda3 100755
--- a/travis/install.sh
+++ b/travis/install.sh
@@ -2,6 +2,17 @@
set -e
+UNAME="$(uname)" || UNAME=""
+if test "${UNAME}" = "Linux" ; then
+ NPROC=$(nproc);
+elif test "${UNAME}" = "Darwin" ; then
+ NPROC=$(sysctl -n hw.ncpu);
+fi
+if test "x${NPROC}" = "x"; then
+ NPROC=2;
+fi
+echo "NPROC=${NPROC}"
+
# Download grid files
wget http://download.osgeo.org/proj/proj-datumgrid-1.8.zip
@@ -28,7 +39,8 @@ if [ -f /usr/lib/jvm/java-7-openjdk-amd64/include/jni.h ]; then
else
../configure --prefix=/tmp/proj_autoconf_install_from_dist_all
fi
-make -j2
+
+make -j${NPROC}
if [ "$(uname)" == "Linux" -a -f src/.libs/libproj.so ]; then
echo "Checking exported symbols..."
@@ -45,7 +57,7 @@ cd ..
mkdir build_cmake
cd build_cmake
cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/proj_cmake_install
-VERBOSE=1 make -j2
+VERBOSE=1 make -j${NPROC}
make install
# The cmake build is not able to generate the null file, so copy it at hand
cp /tmp/proj_autoconf_install_from_dist_all/share/proj/null /tmp/proj_cmake_install/share/proj
@@ -63,7 +75,7 @@ cd ../..
mkdir build_autoconf_grids
cd build_autoconf_grids
../configure --prefix=/tmp/proj_autoconf_install_grids
-make -j2
+make -j${NPROC}
make check
(cd src && make multistresstest && make test228)
PROJ_LIB=../data src/multistresstest
@@ -82,7 +94,7 @@ if [ "$BUILD_NAME" != "linux_clang" ]; then
else
./configure
fi
-make -j2
+make -j${NPROC}
make check
# Rerun tests without grids not included in proj-datumgrid