diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2020-02-11 15:26:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-11 15:26:32 +0100 |
| commit | a10b5edfad805b1e09d88b31b953707412440b09 (patch) | |
| tree | 442423e8d1a7710fd2263e28f6a3396b769fb5e9 | |
| parent | 3767adabe2aadcaa053a11e4f8c2993486242d32 (diff) | |
| parent | 888e1b1553d4ee19172474f946503fa38885fc60 (diff) | |
| download | PROJ-a10b5edfad805b1e09d88b31b953707412440b09.tar.gz PROJ-a10b5edfad805b1e09d88b31b953707412440b09.zip | |
Merge pull request #1920 from rouault/travis_i386
Travis: change linux_gcc7 / x86_64 config to linux_gcc8 / i386
| -rw-r--r-- | .travis.yml | 19 | ||||
| -rwxr-xr-x | scripts/dump_exported_symbols.sh | 12 | ||||
| -rwxr-xr-x | travis/install.sh | 186 | ||||
| -rwxr-xr-x | travis/linux_gcc8/after_success.sh (renamed from travis/linux_gcc7/after_success.sh) | 0 | ||||
| -rwxr-xr-x | travis/linux_gcc8/before_install.sh (renamed from travis/linux_gcc7/before_install.sh) | 4 | ||||
| -rwxr-xr-x | travis/linux_gcc8/install.sh (renamed from travis/linux_gcc7/install.sh) | 0 |
6 files changed, 123 insertions, 98 deletions
diff --git a/.travis.yml b/.travis.yml index 4f15edd4..8ebf6127 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,17 +29,24 @@ matrix: services: - docker env: - - BUILD_NAME=linux_gcc7 - - DETAILS="linux, gcc7" - - CC=gcc-7 - - CXX=g++-7 - - CXXFLAGS='-g -D_GLIBCXX_ASSERTIONS' + - BUILD_NAME=linux_gcc8 + - DETAILS="linux, gcc8, i386" + - ARCH=i386 + - CC=gcc-8 + - CXX=g++-8 + - CXXFLAGS='-g -O2 -m32 -D_GLIBCXX_ASSERTIONS' + - CFLAGS='-g -O2 -m32' + - TIFF_CFLAGS=-I/usr/include/i386-linux-gnu + - TIFF_LIBS="-L/usr/lib/i386-linux-gnu -ltiff" + - SQLITE3_CFLAGS=-I/usr/include/i386-linux-gnu + - SQLITE3_LIBS="-L/usr/lib/i386-linux-gnu -lsqlite3" + - SKIP_BUILDS_WITHOUT_GRID=yes addons: apt: sources: - ubuntu-toolchain-r-test packages: - - g++-7 + - g++-8-multilib - make - autoconf - automake diff --git a/scripts/dump_exported_symbols.sh b/scripts/dump_exported_symbols.sh index b03d711a..4bd23d64 100755 --- a/scripts/dump_exported_symbols.sh +++ b/scripts/dump_exported_symbols.sh @@ -1,2 +1,12 @@ #!/bin/sh -objdump -TC "$1" | grep " g DF .text" | cut -b 62- | grep -v "thunk to" | sed "s/internal_//" | grep -v "Java_" | sed "s/std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >/std::string/g" | sed "s/std::string >/std::string>/g" | sed "s/\[abi:cxx11\]//g" | sort -u
\ No newline at end of file + +if objdump -TC "$1" | grep "elf64-x86-64">/dev/null; then + COLUMN=62 +#elif objdump -TC "$1" | grep "elf32-i386">/dev/null; then +# COLUMN=46 +else + echo "Unsupported architecture" + exit 1 +fi + +objdump -TC "$1" | grep " g DF .text" | cut -b "${COLUMN}-" | grep -v "thunk to" | sed "s/internal_//" | grep -v "Java_" | sed "s/std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >/std::string/g" | sed "s/std::string >/std::string>/g" | sed "s/\[abi:cxx11\]//g" | sort -u diff --git a/travis/install.sh b/travis/install.sh index a8b98f98..953a7f0b 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -21,76 +21,81 @@ wget "https://github.com/OSGeo/proj-datumgrid/blob/master/north-america/ntv2_0.g ./autogen.sh TOP_DIR=$PWD -# autoconf build -mkdir build_autoconf -cd build_autoconf -../configure -make dist-all -# Check consistency of generated tarball -TAR_FILENAME=`ls *.tar.gz` -TAR_DIRECTORY=`basename $TAR_FILENAME .tar.gz` -tar xvzf $TAR_FILENAME -cd $TAR_DIRECTORY - -# There's a nasty #define CS in a Solaris system header. Avoid being caught about that again -CXXFLAGS="-DCS=do_not_use_CS_for_solaris_compat $CXXFLAGS" - -# autoconf build from generated tarball -mkdir build_autoconf -cd build_autoconf -../configure --prefix=/tmp/proj_autoconf_install_from_dist_all - -make -j${NPROC} +if [ "$SKIP_BUILDS_WITHOUT_GRID" != "yes" ]; then + + # autoconf build + mkdir build_autoconf + cd build_autoconf + ../configure + make dist-all + # Check consistency of generated tarball + TAR_FILENAME=`ls *.tar.gz` + TAR_DIRECTORY=`basename $TAR_FILENAME .tar.gz` + tar xvzf $TAR_FILENAME + cd $TAR_DIRECTORY + + # There's a nasty #define CS in a Solaris system header. Avoid being caught about that again + CXXFLAGS="-DCS=do_not_use_CS_for_solaris_compat $CXXFLAGS" + + # autoconf build from generated tarball + mkdir build_autoconf + cd build_autoconf + ../configure --prefix=/tmp/proj_autoconf_install_from_dist_all + + make -j${NPROC} + + if [ "$(uname)" == "Linux" -a -f src/.libs/libproj.so ]; then + if objdump -TC "$1" | grep "elf64-x86-64">/dev/null; then + echo "Checking exported symbols..." + ${TOP_DIR}/scripts/dump_exported_symbols.sh src/.libs/libproj.so > /tmp/got_symbols.txt + diff -u ${TOP_DIR}/scripts/reference_exported_symbols.txt /tmp/got_symbols.txt || (echo "Difference(s) found in exported symbols. If intended, refresh scripts/reference_exported_symbols.txt with 'scripts/dump_exported_symbols.sh src/.libs/libproj.so > scripts/reference_exported_symbols.txt'"; exit 1) + fi + fi -if [ "$(uname)" == "Linux" -a -f src/.libs/libproj.so ]; then - echo "Checking exported symbols..." - ${TOP_DIR}/scripts/dump_exported_symbols.sh src/.libs/libproj.so > /tmp/got_symbols.txt - diff -u ${TOP_DIR}/scripts/reference_exported_symbols.txt /tmp/got_symbols.txt || (echo "Difference(s) found in exported symbols. If intended, refresh scripts/reference_exported_symbols.txt with 'scripts/dump_exported_symbols.sh src/.libs/libproj.so > scripts/reference_exported_symbols.txt'"; exit 1) + make check + make install + find /tmp/proj_autoconf_install_from_dist_all + + /tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:32631 -o PROJJSON -q > out.json + cat out.json + echo "Validating JSON" + jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" + + /tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:4326+3855 -o PROJJSON -q > out.json + cat out.json + echo "Validating JSON" + jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" + + /tmp/proj_autoconf_install_from_dist_all/bin/projinfo "+proj=longlat +ellps=GRS80 +nadgrids=@foo +type=crs" -o PROJJSON -q > out.json + cat out.json + echo "Validating JSON" + jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" + /tmp/proj_autoconf_install_from_dist_all/bin/projinfo @out.json -o PROJJSON -q > out2.json + diff -u out.json out2.json + + /tmp/proj_autoconf_install_from_dist_all/bin/projinfo -s EPSG:3111 -t GDA2020 -o PROJJSON -o PROJJSON -q > out.json + cat out.json + echo "Validating JSON" + jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" + /tmp/proj_autoconf_install_from_dist_all/bin/projinfo @out.json -o PROJJSON -q > out2.json + diff -u out.json out2.json + + cd .. + + # cmake build from generated tarball + mkdir build_cmake + cd build_cmake + cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/proj_cmake_install + VERBOSE=1 make -j${NPROC} + make install + ctest + find /tmp/proj_cmake_install + cd .. + + # return to root + cd ../.. fi -make check -make install -find /tmp/proj_autoconf_install_from_dist_all - -/tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:32631 -o PROJJSON -q > out.json -cat out.json -echo "Validating JSON" -jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" - -/tmp/proj_autoconf_install_from_dist_all/bin/projinfo EPSG:4326+3855 -o PROJJSON -q > out.json -cat out.json -echo "Validating JSON" -jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" - -/tmp/proj_autoconf_install_from_dist_all/bin/projinfo "+proj=longlat +ellps=GRS80 +nadgrids=@foo +type=crs" -o PROJJSON -q > out.json -cat out.json -echo "Validating JSON" -jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" -/tmp/proj_autoconf_install_from_dist_all/bin/projinfo @out.json -o PROJJSON -q > out2.json -diff -u out.json out2.json - -/tmp/proj_autoconf_install_from_dist_all/bin/projinfo -s EPSG:3111 -t GDA2020 -o PROJJSON -o PROJJSON -q > out.json -cat out.json -echo "Validating JSON" -jsonschema -i out.json /tmp/proj_autoconf_install_from_dist_all/share/proj/projjson.schema.json && echo "Valid !" -/tmp/proj_autoconf_install_from_dist_all/bin/projinfo @out.json -o PROJJSON -q > out2.json -diff -u out.json out2.json - -cd .. - -# cmake build from generated tarball -mkdir build_cmake -cd build_cmake -cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/proj_cmake_install -VERBOSE=1 make -j${NPROC} -make install -ctest -find /tmp/proj_cmake_install -cd .. - -# return to root -cd ../.. - # Install grid files (cd data && unzip -o ../proj-datumgrid-1.8.zip && cp ../ntv2_0.gsb . ) @@ -110,28 +115,31 @@ make clean find /tmp/proj_autoconf_install_grids cd .. -# There's an issue with the clang on Travis + coverage + cpp code -if [ "$BUILD_NAME" != "linux_clang" ]; then - # autoconf build with grids and coverage - if [ $TRAVIS_OS_NAME == "osx" ]; then - CFLAGS="--coverage" CXXFLAGS="--coverage" ./configure; +if [ "$SKIP_BUILDS_WITHOUT_GRID" != "yes" ]; then + + # There's an issue with the clang on Travis + coverage + cpp code + if [ "$BUILD_NAME" != "linux_clang" ]; then + # autoconf build with grids and coverage + if [ "$TRAVIS_OS_NAME" == "osx" ]; then + CFLAGS="--coverage" CXXFLAGS="--coverage" ./configure; + else + CFLAGS="$CFLAGS --coverage" CXXFLAGS="$CXXFLAGS --coverage" LDFLAGS="$LDFLAGS -lgcov" ./configure; + fi else - CFLAGS="$CFLAGS --coverage" CXXFLAGS="$CXXCFLAGS --coverage" LDFLAGS="$LDFLAGS -lgcov" ./configure; + ./configure + fi + make -j${NPROC} + make check + + # Rerun tests without grids not included in proj-datumgrid + rm -v data/egm96_15.gtx + make check + + if [ "$BUILD_NAME" != "linux_clang" ]; then + mv src/.libs/*.gc* src + mv src/conversions/.libs/*.gc* src/conversions + mv src/iso19111/.libs/*.gc* src/iso19111 + mv src/projections/.libs/*.gc* src/projections + mv src/transformations/.libs/*.gc* src/transformations fi -else - ./configure -fi -make -j${NPROC} -make check - -# Rerun tests without grids not included in proj-datumgrid -rm -v data/egm96_15.gtx -make check - -if [ "$BUILD_NAME" != "linux_clang" ]; then - mv src/.libs/*.gc* src - mv src/conversions/.libs/*.gc* src/conversions - mv src/iso19111/.libs/*.gc* src/iso19111 - mv src/projections/.libs/*.gc* src/projections - mv src/transformations/.libs/*.gc* src/transformations fi diff --git a/travis/linux_gcc7/after_success.sh b/travis/linux_gcc8/after_success.sh index 70c6f5cb..70c6f5cb 100755 --- a/travis/linux_gcc7/after_success.sh +++ b/travis/linux_gcc8/after_success.sh diff --git a/travis/linux_gcc7/before_install.sh b/travis/linux_gcc8/before_install.sh index 2ef2feee..424bc10e 100755 --- a/travis/linux_gcc7/before_install.sh +++ b/travis/linux_gcc8/before_install.sh @@ -8,8 +8,8 @@ set -e sudo apt-get install -qq \ lcov \ doxygen graphviz \ - sqlite3 libsqlite3-dev \ - libtiff-dev libcurl4-openssl-dev + sqlite3 libsqlite3-dev:$ARCH \ + libtiff-dev:$ARCH libcurl4-openssl-dev:$ARCH #scripts/cppcheck.sh #scripts/doxygen.sh diff --git a/travis/linux_gcc7/install.sh b/travis/linux_gcc8/install.sh index 7fa8cfa4..7fa8cfa4 100755 --- a/travis/linux_gcc7/install.sh +++ b/travis/linux_gcc8/install.sh |
