diff options
| -rw-r--r-- | .travis.yml | 23 | ||||
| -rw-r--r-- | docs/source/community/code_contributions.rst | 13 | ||||
| -rwxr-xr-x | travis/before_install_apt.sh | 2 | ||||
| -rwxr-xr-x | travis/csa/before_install.sh | 2 | ||||
| -rwxr-xr-x | travis/install.sh | 4 | ||||
| -rwxr-xr-x | travis/linux_gcc/before_install.sh | 15 | ||||
| -rwxr-xr-x | travis/linux_gcc7/before_install.sh | 2 | ||||
| -rwxr-xr-x | travis/mingw32/install.sh | 3 |
8 files changed, 30 insertions, 34 deletions
diff --git a/.travis.yml b/.travis.yml index 79a78611..42924cd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# This is the config file for building proj.4 and running its test suite +# This is the config file for building proj and running its test suite # with Travis-ci.org language: cpp @@ -15,9 +15,8 @@ matrix: include: - os: linux - dist: trusty + dist: xenial compiler: gcc - sudo: required services: - docker env: @@ -25,9 +24,8 @@ matrix: - DETAILS="linux, gcc" - os: linux - dist: trusty + dist: xenial compiler: gcc - sudo: required services: - docker env: @@ -40,12 +38,15 @@ matrix: apt: sources: - ubuntu-toolchain-r-test - packages: ['g++-7','make','autoconf','automake'] + packages: + - g++-7 + - make + - autoconf + - automake - os: linux - dist: trusty + dist: xenial compiler: clang - sudo: required services: - docker env: @@ -58,17 +59,15 @@ matrix: - DETAILS="osx" - os: linux - dist: trusty + dist: xenial compiler: gcc - sudo: required env: - BUILD_NAME=mingw32 - DETAILS="mingw32" - os: linux compiler: gcc - dist: trusty - sudo: required + dist: xenial env: - BUILD_NAME=csa - DETAILS="CLang Static Analyzer" diff --git a/docs/source/community/code_contributions.rst b/docs/source/community/code_contributions.rst index 3c8850bd..7e354a70 100644 --- a/docs/source/community/code_contributions.rst +++ b/docs/source/community/code_contributions.rst @@ -88,12 +88,7 @@ cppcheck static analyzer ~~~~~~~~~~~~~~~~~~~~~~~~ You can run locally ``scripts/cppcheck.sh`` that is a wrapper script around the -cppcheck utility. It is known to work with cppcheck 1.61 of Ubuntu Trusty 14.0, -since this is what is currently used on Travis-CI -(``travis/linux_gcc/before_install.sh``). -At the time of writing, this also works with cppcheck 1.72 of Ubuntu Xenial -16.04, and latest cppcheck -master. +cppcheck utility. This tool is used as part of the quality control of the code. cppcheck can have false positives. In general, it is preferable to rework the code a bit to make it more 'obvious' and avoid those false positives. When not @@ -115,9 +110,9 @@ Preliminary step: install clang. For example: :: - wget http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz - tar xJf clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz - mv clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04 clang+llvm-6 + wget http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz + tar xJf clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz + mv clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-16.04 clang+llvm-6 Run configure under the scan-build utility of clang: diff --git a/travis/before_install_apt.sh b/travis/before_install_apt.sh index aea7a8d3..b40f0ced 100755 --- a/travis/before_install_apt.sh +++ b/travis/before_install_apt.sh @@ -4,4 +4,4 @@ # "global" before_install script. sudo apt-get update -qq -sudo apt-get install -qq python3-pip +sudo apt-get install -qq python3-pip python3-setuptools diff --git a/travis/csa/before_install.sh b/travis/csa/before_install.sh index cdd58257..c2e29064 100755 --- a/travis/csa/before_install.sh +++ b/travis/csa/before_install.sh @@ -7,7 +7,7 @@ set -e sudo apt-get install -qq sqlite3 libsqlite3-dev -CLANG_LLVM=clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04 +CLANG_LLVM=clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-16.04 wget http://releases.llvm.org/6.0.0/$CLANG_LLVM.tar.xz tar xJf $CLANG_LLVM.tar.xz mv $CLANG_LLVM clang+llvm-6 diff --git a/travis/install.sh b/travis/install.sh index 2363be43..0eaff801 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -34,8 +34,8 @@ cd $TAR_DIRECTORY # autoconf build from generated tarball mkdir build_autoconf cd build_autoconf -if [ -f /usr/lib/jvm/java-7-openjdk-amd64/include/jni.h ]; then - CXXFLAGS="-I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/include/linux $CXXFLAGS" ../configure --prefix=/tmp/proj_autoconf_install_from_dist_all --with-jni +if [ -f $JAVA_HOME/include/jni.h ]; then + CXXFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux $CXXFLAGS" ../configure --prefix=/tmp/proj_autoconf_install_from_dist_all --with-jni else ../configure --prefix=/tmp/proj_autoconf_install_from_dist_all fi diff --git a/travis/linux_gcc/before_install.sh b/travis/linux_gcc/before_install.sh index 30793e69..4dbd52c3 100755 --- a/travis/linux_gcc/before_install.sh +++ b/travis/linux_gcc/before_install.sh @@ -6,19 +6,22 @@ set -e ./travis/before_install_pip.sh sudo apt-get install -qq \ - cppcheck \ lcov \ doxygen graphviz \ - openjdk-7-jdk \ sqlite3 libsqlite3-dev +# Install Cppcheck to maintain version 1.61 +LIBTINYXML=libtinyxml2-0.0.0_0~git20120518.1.a2ae54e-1_amd64.deb +CPPCHECK=cppcheck_1.61-1_amd64.deb +wget -q http://security.ubuntu.com/ubuntu/pool/universe/t/tinyxml2/$LIBTINYXML +wget -q http://security.ubuntu.com/ubuntu/pool/universe/c/cppcheck/$CPPCHECK +sudo dpkg -i $LIBTINYXML +sudo dpkg -i $CPPCHECK + scripts/cppcheck.sh scripts/doxygen.sh -# Force sphinxcontrib-bibtex version to 0.4.2, because 1.0.0 requires -# sphinx >= 2.0 which is only available on Python >= 3.5, and this config -# has only 3.4 -pip3 install --user sphinxcontrib-bibtex==0.4.2 +pip3 install --user sphinxcontrib-bibtex pip3 install --user cpp-coveralls ./travis/docker.sh diff --git a/travis/linux_gcc7/before_install.sh b/travis/linux_gcc7/before_install.sh index df2bd672..a3f6c8c0 100755 --- a/travis/linux_gcc7/before_install.sh +++ b/travis/linux_gcc7/before_install.sh @@ -6,10 +6,8 @@ set -e ./travis/before_install_pip.sh sudo apt-get install -qq \ - cppcheck \ lcov \ doxygen graphviz \ - openjdk-7-jdk \ sqlite3 libsqlite3-dev #scripts/cppcheck.sh diff --git a/travis/mingw32/install.sh b/travis/mingw32/install.sh index 867ca716..52e4f7a6 100755 --- a/travis/mingw32/install.sh +++ b/travis/mingw32/install.sh @@ -6,12 +6,13 @@ export CCACHE_CPP2=yes export PROJ_DB_CACHE_DIR="$HOME/.ccache" MINGW_ARCH=x86_64-w64-mingw32 -MINGW_PREFIX=/usr/lib/gcc/$MINGW_ARCH/4.8 +MINGW_PREFIX=/usr/lib/gcc/$MINGW_ARCH/5.3-posix # prepare wine environment WINE_SYSDIR=$HOME/.wine/drive_c/windows wine64 cmd /c dir ln -s $MINGW_PREFIX/libstdc++-6.dll $WINE_SYSDIR +ln -s $MINGW_PREFIX/libgcc_s_seh-1.dll $WINE_SYSDIR ln -s $MINGW_PREFIX/libgcc_s_sjlj-1.dll $WINE_SYSDIR ln -s /usr/$MINGW_ARCH/lib/libwinpthread-1.dll $WINE_SYSDIR |
