diff options
| -rw-r--r-- | .travis.yml | 153 | ||||
| -rwxr-xr-x | travis/after_success.sh | 13 | ||||
| -rwxr-xr-x | travis/install.sh | 99 | ||||
| -rwxr-xr-x | travis/linux_clang/after_success.sh | 5 | ||||
| -rwxr-xr-x | travis/linux_clang/before_install.sh | 5 | ||||
| -rwxr-xr-x | travis/linux_clang/install.sh | 7 | ||||
| -rwxr-xr-x | travis/linux_gcc/after_success.sh | 5 | ||||
| -rwxr-xr-x | travis/linux_gcc/before_install.sh | 5 | ||||
| -rwxr-xr-x | travis/linux_gcc/install.sh | 7 | ||||
| -rwxr-xr-x | travis/mingw32/after_success.sh | 5 | ||||
| -rwxr-xr-x | travis/mingw32/before_install.sh | 7 | ||||
| -rwxr-xr-x | travis/mingw32/install.sh | 38 | ||||
| -rwxr-xr-x | travis/osx/after_success.sh | 5 | ||||
| -rwxr-xr-x | travis/osx/before_install.sh | 6 | ||||
| -rwxr-xr-x | travis/osx/install.sh | 7 |
15 files changed, 252 insertions, 115 deletions
diff --git a/.travis.yml b/.travis.yml index a4378d9a..31ab75d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,132 +1,55 @@ # This is the config file for building proj.4 and running its test suite # with Travis-ci.org -language: c - -services: - docker - -compiler: - - gcc -# - clang - -os: - - linux -# - osx +cache: + directories: + - $HOME/.ccache matrix: - exclude: + fast_finish: true + include: + - os: linux + compiler: gcc + language: c + sudo: required + services: + - docker + env: + - BUILD_NAME=linux_gcc + - DETAILS="linux, gcc" + - os: linux + compiler: clang + language: c + sudo: required + services: + - docker + env: + - BUILD_NAME=linux_clang + - DETAILS="linux, clang" - os: osx + language: c + env: + - BUILD_NAME=osx + - DETAILS="osx" + - os: linux compiler: gcc + language: c + sudo: required + env: + - BUILD_NAME=mingw32 + - DETAILS="mingw32" -before_install: ./travis/before_install.sh - -install: -# 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 +# allow_failures: +# - os: osx - - 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 ../.. +before_install: ./travis/${BUILD_NAME}/before_install.sh - - mv src/.libs/*.gc* src +install: ./travis/${BUILD_NAME}/install.sh script: - echo "done" -after_success: -# coveralls falsely reports .c-files in the build directories as having 100% coverage so we exclude them - - coveralls --extension .c --exclude build_autoconf --exclude build_cmake - - echo "$TRAVIS_SECURE_ENV_VARS" - - sh -c "./travis/build_docs.sh" - - sh -c 'if test "$TRAVIS_SECURE_ENV_VARS" = "true" -a "$TRAVIS_BRANCH" = "master"; then echo "publish website"; ./travis/add_deploy_key.sh; ./travis/deploy_website.sh $TRAVIS_BUILD_DIR/docs/build /tmp; fi' +after_success: ./travis/${BUILD_NAME}/after_success.sh notifications: #email: diff --git a/travis/after_success.sh b/travis/after_success.sh new file mode 100755 index 00000000..27a0c526 --- /dev/null +++ b/travis/after_success.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +# coveralls falsely reports .c-files in the build directories as having 100% coverage so we exclude them +coveralls --extension .c --exclude build_autoconf --exclude build_cmake +echo "$TRAVIS_SECURE_ENV_VARS" +./travis/build_docs.sh +if test "$TRAVIS_SECURE_ENV_VARS" = "true" -a "$TRAVIS_BRANCH" = "master"; then + echo "publish website"; + ./travis/add_deploy_key.sh; + ./travis/deploy_website.sh $TRAVIS_BUILD_DIR/docs/build /tmp; +fi 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 diff --git a/travis/linux_clang/after_success.sh b/travis/linux_clang/after_success.sh new file mode 100755 index 00000000..9618f673 --- /dev/null +++ b/travis/linux_clang/after_success.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +# nothing diff --git a/travis/linux_clang/before_install.sh b/travis/linux_clang/before_install.sh new file mode 100755 index 00000000..75acd97a --- /dev/null +++ b/travis/linux_clang/before_install.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +# do nothing diff --git a/travis/linux_clang/install.sh b/travis/linux_clang/install.sh new file mode 100755 index 00000000..fad21a16 --- /dev/null +++ b/travis/linux_clang/install.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +export CCACHE_CPP2=yes + +CC="ccache clang" ./travis/install.sh diff --git a/travis/linux_gcc/after_success.sh b/travis/linux_gcc/after_success.sh new file mode 100755 index 00000000..6602f6c3 --- /dev/null +++ b/travis/linux_gcc/after_success.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +./travis/after_success.sh diff --git a/travis/linux_gcc/before_install.sh b/travis/linux_gcc/before_install.sh new file mode 100755 index 00000000..d09c6ef1 --- /dev/null +++ b/travis/linux_gcc/before_install.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +./travis/before_install.sh diff --git a/travis/linux_gcc/install.sh b/travis/linux_gcc/install.sh new file mode 100755 index 00000000..f5e12dbd --- /dev/null +++ b/travis/linux_gcc/install.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +export CCACHE_CPP2=yes + +CC="ccache gcc" ./travis/install.sh diff --git a/travis/mingw32/after_success.sh b/travis/mingw32/after_success.sh new file mode 100755 index 00000000..9618f673 --- /dev/null +++ b/travis/mingw32/after_success.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +# nothing diff --git a/travis/mingw32/before_install.sh b/travis/mingw32/before_install.sh new file mode 100755 index 00000000..18949b75 --- /dev/null +++ b/travis/mingw32/before_install.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +sudo apt-get update -qq +sudo apt-get install -qq wine +sudo apt-get install -qq mingw32 diff --git a/travis/mingw32/install.sh b/travis/mingw32/install.sh new file mode 100755 index 00000000..b1ea07c8 --- /dev/null +++ b/travis/mingw32/install.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +set -e + +export CCACHE_CPP2=yes + +# prepare build files +./autogen.sh +# autoconf build +mkdir build_autoconf +cd build_autoconf +CC="ccache i586-mingw32msvc-gcc" LD=i586-mingw32msvc-ld ../configure --host=i586-mingw32msvc --prefix=/tmp/proj_autoconf_install +make -j3 +make install +make dist-all +find /tmp/proj_autoconf_install +#make check +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 .. +# autoconf build with grids +mkdir build_autoconf_nad +cd build_autoconf_nad +CC="ccache i586-mingw32msvc-gcc" LD=i586-mingw32msvc-ld ../configure --host=i586-mingw32msvc --prefix=/tmp/proj_autoconf_install_nad +make -j3 +make install +find /tmp/proj_autoconf_install_nad +#make check +cd src +make multistresstest.exe +make test228.exe +cd .. +PROJ_LIB=../nad src/multistresstest.exe +cd .. + diff --git a/travis/osx/after_success.sh b/travis/osx/after_success.sh new file mode 100755 index 00000000..9618f673 --- /dev/null +++ b/travis/osx/after_success.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +# nothing diff --git a/travis/osx/before_install.sh b/travis/osx/before_install.sh new file mode 100755 index 00000000..cd553dda --- /dev/null +++ b/travis/osx/before_install.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e + +brew install ccache +brew install python3 diff --git a/travis/osx/install.sh b/travis/osx/install.sh new file mode 100755 index 00000000..fad21a16 --- /dev/null +++ b/travis/osx/install.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +export CCACHE_CPP2=yes + +CC="ccache clang" ./travis/install.sh |
