From 747ca7470c26dd2be0ee472a354e76465a4a8c63 Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 5 Sep 2016 11:39:36 +0200 Subject: [PATCH 1/9] remove duplicate #pragma --- include/mapnik/warning_ignore.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/mapnik/warning_ignore.hpp b/include/mapnik/warning_ignore.hpp index 6be432f0b..ccbf16925 100644 --- a/include/mapnik/warning_ignore.hpp +++ b/include/mapnik/warning_ignore.hpp @@ -47,7 +47,6 @@ #pragma GCC diagnostic ignored "-Wreserved-id-macro" #pragma GCC diagnostic ignored "-Wweak-vtables" #pragma GCC diagnostic ignored "-Wextra-semi" -#pragma GCC diagnostic ignored "-Wc++98-compat-pedantic" #pragma GCC diagnostic ignored "-Wglobal-constructors" #pragma GCC diagnostic ignored "-Wheader-hygiene" #pragma GCC diagnostic ignored "-Wexit-time-destructors" @@ -55,4 +54,3 @@ #pragma GCC diagnostic ignored "-Wmissing-noreturn" #pragma GCC diagnostic ignored "-Wcovered-switch-default" #pragma GCC diagnostic ignored "-Wfloat-equal" - From a79bd73105df332c459e0b223e965abac7deeded Mon Sep 17 00:00:00 2001 From: bergwerkgis Date: Mon, 5 Sep 2016 13:13:24 +0000 Subject: [PATCH 2/9] refs #3509, get boost and icu versions directly from SDK files --- appveyor.yml | 1 - scripts/build-appveyor.bat | 9 ++++++++- scripts/build-local.bat | 5 ----- scripts/get-boost-icu-version-from-sdk.ps1 | 15 +++++++++++++++ scripts/parse-appveyor-yml.ps1 | 7 ------- 5 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 scripts/get-boost-icu-version-from-sdk.ps1 delete mode 100644 scripts/parse-appveyor-yml.ps1 diff --git a/appveyor.yml b/appveyor.yml index d4450d7a4..1511191bd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,5 @@ environment: msvs_toolset: 14 - BOOST_VERSION: 61 FASTBUILD: 1 matrix: - platform: x64 diff --git a/scripts/build-appveyor.bat b/scripts/build-appveyor.bat index 84088d4cb..2ae40dfb6 100644 --- a/scripts/build-appveyor.bat +++ b/scripts/build-appveyor.bat @@ -22,7 +22,6 @@ ECHO msvs_toolset^: %msvs_toolset% SET BUILD_TYPE=%configuration% SET BUILDPLATFORM=%platform% SET TOOLS_VERSION=%msvs_toolset%.0 -SET ICU_VERSION=56.1 ECHO ICU_VERSION^: %ICU_VERSION% IF DEFINED APPVEYOR (ECHO on AppVeyor) ELSE (ECHO NOT on AppVeyor) ECHO ======== @@ -63,6 +62,14 @@ ECHO extracting binary deps IF EXIST mapnik-sdk (ECHO already extracted) ELSE (7z -y x deps.7z | %windir%\system32\FIND "ing archive") IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +ECHO looking for boost and icu versions in SDK ... +FOR /F "tokens=1,2 usebackq" %%i in (`powershell .\scripts\get-boost-icu-version-from-sdk.ps1`) DO SET %%i=%%j +ECHO BOOST_VERSION found in SDK^: %BOOST_VERSION% +ECHO ICU_VERSION found in SDK^: %ICU_VERSION% +ECHO ICU_VERSION2 found in SDK^: %ICU_VERSION2% + + CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 IF %ERRORLEVEL% NEQ 0 GOTO ERROR diff --git a/scripts/build-local.bat b/scripts/build-local.bat index 306e10c86..5a27b9bf8 100644 --- a/scripts/build-local.bat +++ b/scripts/build-local.bat @@ -10,11 +10,6 @@ SET APPVEYOR=true SET LOCAL_BUILD_DONT_SKIP_TESTS=true SET FASTBUILD=1 -FOR /F "tokens=1 usebackq" %%i in (`powershell .\scripts\parse-appveyor-yml.ps1`) DO SET BOOST_VERSION=%%i -ECHO BOOST_VERSION found in appveyor.yml^: %BOOST_VERSION% -IF "%BOOST_VERSION%"=="0" ECHO BOOST_VERSION not valid && SET ERRORLEVEL=1 && GOTO ERROR - - :: OVERRIDE PARAMETERS >>>>>>>> :NEXT-ARG diff --git a/scripts/get-boost-icu-version-from-sdk.ps1 b/scripts/get-boost-icu-version-from-sdk.ps1 new file mode 100644 index 000000000..dc3bd43c5 --- /dev/null +++ b/scripts/get-boost-icu-version-from-sdk.ps1 @@ -0,0 +1,15 @@ +$ErrorActionPreference = 'Stop' +$boost_version='0' +$icu_version='0' + +#get boost and icu versions directly from the files in the SDK + +#boost_python-vc140-mt-1_61.dll +$boost_version=(Get-ChildItem ".\mapnik-gyp\mapnik-sdk\lib" -Filter *boost*.dll)[0].BaseName.split("_")[-1] + +#icuin56.dll +$icu_version=(Get-ChildItem ".\mapnik-gyp\mapnik-sdk\lib" -Filter icuin*.dll)[0].BaseName.split("icuin")[-1] + +Write-Host "BOOST_VERSION" $boost_version +Write-Host "ICU_VERSION" $icu_version".1" +Write-Host "ICU_VERSION2" $icu_version"_1" diff --git a/scripts/parse-appveyor-yml.ps1 b/scripts/parse-appveyor-yml.ps1 deleted file mode 100644 index f87ae7e3a..000000000 --- a/scripts/parse-appveyor-yml.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$ErrorActionPreference = 'Stop' -$boost_version='0' -Get-Content .\appveyor.yml | - foreach { - if ($_ -match "BOOST_VERSION: "){ $boost_version = $_.split()[-1] } - } -Write-Host $boost_version From fc0b57de24497c2f68e0593f2eb94e3c6eb18ada Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 5 Sep 2016 15:38:55 +0200 Subject: [PATCH 3/9] update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b47daba4..a9bd79a81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,8 @@ Released: xx-xx-xx - GeoJSON - exposed `num_features_to_query` as datasource paramer (ref #3495) - Replaced `boost::mpl::vector` with `std::tuple` (ref #3503) - BuildingSymbolizer - fixed closing segment of polygon in building symbolizer (ref #3505) +- Update dependencies versions +- Fixed warnings when compiling with g++5 ## 3.0.11 From 014f98043fd3d20499f17ea4c6937f7dfa898547 Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 5 Sep 2016 15:40:50 +0200 Subject: [PATCH 4/9] add missing include path --- scripts/time-header | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/time-header b/scripts/time-header index 97c3c6977..7561e5e81 100755 --- a/scripts/time-header +++ b/scripts/time-header @@ -6,4 +6,4 @@ set -o pipefail CXXFLAGS="$(./utils/mapnik-config/mapnik-config --cflags)" CXX="$(./utils/mapnik-config/mapnik-config --cxx)" echo "Time taken to compile '$(basename $1)':" -time ${CXX} $1 -I./test -I./deps/agg/include -Ideps -I./include $CXXFLAGS -o /tmp/header.out \ No newline at end of file +time ${CXX} $1 -I./test -I./deps/agg/include -Ideps -I./deps/mapbox/variant/include -I./include $CXXFLAGS -o /tmp/header.out \ No newline at end of file From 66999f1f87347317ab42d8ec0be2610bdaf4bc3e Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 5 Sep 2016 15:54:40 +0200 Subject: [PATCH 5/9] travis up from 35 to 40 min --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e54ffb1b..bc4d5462f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,11 +92,11 @@ script: - export SCONSFLAGS='--debug=time' - configure BENCHMARK=${BENCH} - cat config.log - # we limit the `make` to 35 min + # we limit the `make` to 40 min # to ensure that slow builds still upload their # ccache results and therefore should be faster # (and might work) for the next build - - DURATION=2100 + - DURATION=2400 - scripts/travis-command-wrapper.py -s "date" -i 120 --deadline=$(( $(date +%s) + ${DURATION} )) make - make test - enabled ${COVERAGE} coverage From 28162f072022424255fd9dce925249dce5c9b77f Mon Sep 17 00:00:00 2001 From: bergwerkgis Date: Mon, 5 Sep 2016 14:00:17 +0000 Subject: [PATCH 6/9] [skip travis] fix relative path to get-boost-icu-version-from-sdk.ps1 (differs when called from windows-builds) --- scripts/build-appveyor.bat | 4 +++- scripts/get-boost-icu-version-from-sdk.ps1 | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/build-appveyor.bat b/scripts/build-appveyor.bat index 2ae40dfb6..d1fc084eb 100644 --- a/scripts/build-appveyor.bat +++ b/scripts/build-appveyor.bat @@ -64,7 +64,9 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR ECHO looking for boost and icu versions in SDK ... -FOR /F "tokens=1,2 usebackq" %%i in (`powershell .\scripts\get-boost-icu-version-from-sdk.ps1`) DO SET %%i=%%j +FOR /F "tokens=1,2 usebackq" %%i in (`powershell %APPVEYOR_BUILD_FOLDER%\scripts\get-boost-icu-version-from-sdk.ps1`) DO SET %%i=%%j +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + ECHO BOOST_VERSION found in SDK^: %BOOST_VERSION% ECHO ICU_VERSION found in SDK^: %ICU_VERSION% ECHO ICU_VERSION2 found in SDK^: %ICU_VERSION2% diff --git a/scripts/get-boost-icu-version-from-sdk.ps1 b/scripts/get-boost-icu-version-from-sdk.ps1 index dc3bd43c5..a24c3196c 100644 --- a/scripts/get-boost-icu-version-from-sdk.ps1 +++ b/scripts/get-boost-icu-version-from-sdk.ps1 @@ -1,15 +1,21 @@ $ErrorActionPreference = 'Stop' $boost_version='0' $icu_version='0' +$libdir=$PSScriptRoot+"\..\mapnik-gyp\mapnik-sdk\lib" #get boost and icu versions directly from the files in the SDK #boost_python-vc140-mt-1_61.dll -$boost_version=(Get-ChildItem ".\mapnik-gyp\mapnik-sdk\lib" -Filter *boost*.dll)[0].BaseName.split("_")[-1] +$boost_version=(Get-ChildItem $libdir -Filter *boost*.dll)[0].BaseName.split("_")[-1] #icuin56.dll -$icu_version=(Get-ChildItem ".\mapnik-gyp\mapnik-sdk\lib" -Filter icuin*.dll)[0].BaseName.split("icuin")[-1] +$icu_version=(Get-ChildItem $libdir -Filter icuin*.dll)[0].BaseName.split("icuin")[-1] Write-Host "BOOST_VERSION" $boost_version Write-Host "ICU_VERSION" $icu_version".1" Write-Host "ICU_VERSION2" $icu_version"_1" + +trap { + "Error: $_" + exit 1 +} From 4cc070694025ee5ef102da320fed7304658b893e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 6 Sep 2016 00:00:37 -0700 Subject: [PATCH 7/9] start working on #3335 --- Makefile | 28 +++++++--------------------- scripts/ensure_test_data.sh | 19 +++++++++++++++++++ scripts/publish_release.sh | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 21 deletions(-) create mode 100755 scripts/ensure_test_data.sh create mode 100755 scripts/publish_release.sh diff --git a/Makefile b/Makefile index fd3a2add4..910951d7b 100755 --- a/Makefile +++ b/Makefile @@ -17,24 +17,7 @@ install: $(PYTHON) scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 install release: - export MAPNIK_VERSION=$(shell ./utils/mapnik-config/mapnik-config --version) && \ - export TARBALL_NAME="mapnik-v$${MAPNIK_VERSION}" && \ - cd /tmp/ && \ - rm -rf $${TARBALL_NAME} && \ - git clone --depth 1 --branch v$${MAPNIK_VERSION} git@github.com:mapnik/mapnik.git $${TARBALL_NAME} && \ - cd $${TARBALL_NAME} && \ - git checkout "tags/v$${MAPNIK_VERSION}" && \ - git submodule update --depth 100 --init && \ - rm -rf deps/mapbox/variant/.git && \ - rm -rf test/data/.git && \ - rm -rf test/data/.gitignore && \ - rm -rf test/data-visual/.git && \ - rm -rf test/data-visual/.gitignore && \ - rm -rf .git && \ - rm -rf .gitignore && \ - cd ../ && \ - tar cjf $${TARBALL_NAME}.tar.bz2 $${TARBALL_NAME}/ && \ - aws s3 cp --acl public-read $${TARBALL_NAME}.tar.bz2 s3://mapnik/dist/v$${MAPNIK_VERSION}/ + ./scripts/publish_release.sh python: if [ ! -d ./bindings/python ]; then git clone git@github.com:mapnik/python-mapnik.git --recursive ./bindings/python; else (cd bindings/python && git pull && git submodule update --init); fi; @@ -95,10 +78,13 @@ rebuild: uninstall: @$(PYTHON) scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 uninstall -test/data: - git submodule update --init +test/data-visual: + ./scripts/ensure_test_data.sh -test: ./test/data +test/data: + ./scripts/ensure_test_data.sh + +test: ./test/data test/data-visual @./test/run check: test diff --git a/scripts/ensure_test_data.sh b/scripts/ensure_test_data.sh new file mode 100755 index 000000000..288dcd8f4 --- /dev/null +++ b/scripts/ensure_test_data.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -eu +set -o pipefail + +VERSION=$(git describe) + +if [[ -d .git ]]; then + git submodule update --init +else + if [[ ! -d ./test/data-visual ]]; then + echo "Downloading visual test data from https://github.com/mapnik/test-data-visual/archive/${VERSION}.tar.gz" + curl -L -s https://github.com/mapnik/test-data-visual/archive/${VERSION}.tar.gz | tar zxf - --strip-components=1 -C test/data-visual/ + fi + if [[ ! -d ./test/data ]]; then + echo "Downloading unit test data from https://github.com/mapnik/test-data/archive/${VERSION}.tar.gz" + curl -L -s https://github.com/mapnik/test-data/archive/${VERSION}.tar.gz | tar zxf - --strip-components=1 -C test/data/ + fi +fi \ No newline at end of file diff --git a/scripts/publish_release.sh b/scripts/publish_release.sh new file mode 100755 index 000000000..b881c2ad3 --- /dev/null +++ b/scripts/publish_release.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +set -eu +set -o pipefail + +# for normal release leave empty +# for release candidate, add "-rcN" +export MAPNIK_VERSION=$(git describe) +export TARBALL_NAME="mapnik-v${MAPNIK_VERSION}" +cd /tmp/ +rm -rf ${TARBALL_NAME} +echo "Cloning v${MAPNIK_VERSION}" +git clone --depth 1 --branch v${MAPNIK_VERSION} git@github.com:mapnik/mapnik.git ${TARBALL_NAME} +cd ${TARBALL_NAME} +git checkout "tags/v${MAPNIK_VERSION}" +echo "updating submodules" +git submodule update --depth 100 --init +rm -rf deps/mapbox/variant/.git +cd test/data/ +git remote set-url origin git@github.com:mapnik/test-data +git tag v${MAPNIK_VERSION} -a -m "tagging for v${MAPNIK_VERSION}" +git push --tags +cd ../../ +rm -rf test/data/ +cd test/data-visual/ +git remote set-url origin git@github.com:mapnik/test-data-visual +git tag v${MAPNIK_VERSION} -a -m "tagging for v${MAPNIK_VERSION}" +git push --tags +cd ../../ +rm -rf test/data-visual/ +rm -rf .git +rm -rf .gitignore +cd ../ +tar cjf ${TARBALL_NAME}.tar.bz2 ${TARBALL_NAME}/ +#aws s3 cp --acl public-read ${TARBALL_NAME}.tar.bz2 s3://mapnik/dist/v${MAPNIK_VERSION}/ From 48316d47b0bf354fafd9c5da4f3104068b4ba6bf Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 6 Sep 2016 00:20:48 -0700 Subject: [PATCH 8/9] fixes for auto-release script --- scripts/ensure_test_data.sh | 10 ++++++---- scripts/publish_release.sh | 23 ++++++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/scripts/ensure_test_data.sh b/scripts/ensure_test_data.sh index 288dcd8f4..e124f3daa 100755 --- a/scripts/ensure_test_data.sh +++ b/scripts/ensure_test_data.sh @@ -8,12 +8,14 @@ VERSION=$(git describe) if [[ -d .git ]]; then git submodule update --init else - if [[ ! -d ./test/data-visual ]]; then - echo "Downloading visual test data from https://github.com/mapnik/test-data-visual/archive/${VERSION}.tar.gz" - curl -L -s https://github.com/mapnik/test-data-visual/archive/${VERSION}.tar.gz | tar zxf - --strip-components=1 -C test/data-visual/ - fi if [[ ! -d ./test/data ]]; then echo "Downloading unit test data from https://github.com/mapnik/test-data/archive/${VERSION}.tar.gz" + mkdir -p test/data/ curl -L -s https://github.com/mapnik/test-data/archive/${VERSION}.tar.gz | tar zxf - --strip-components=1 -C test/data/ fi + if [[ ! -d ./test/data-visual ]]; then + echo "Downloading visual test data from https://github.com/mapnik/test-data-visual/archive/${VERSION}.tar.gz" + mkdir -p test/data-visual/ + curl -L -s https://github.com/mapnik/test-data-visual/archive/${VERSION}.tar.gz | tar zxf - --strip-components=1 -C test/data-visual/ + fi fi \ No newline at end of file diff --git a/scripts/publish_release.sh b/scripts/publish_release.sh index b881c2ad3..1f2428a66 100755 --- a/scripts/publish_release.sh +++ b/scripts/publish_release.sh @@ -6,30 +6,39 @@ set -o pipefail # for normal release leave empty # for release candidate, add "-rcN" export MAPNIK_VERSION=$(git describe) -export TARBALL_NAME="mapnik-v${MAPNIK_VERSION}" +export TARBALL_NAME="mapnik-${MAPNIK_VERSION}" cd /tmp/ rm -rf ${TARBALL_NAME} -echo "Cloning v${MAPNIK_VERSION}" -git clone --depth 1 --branch v${MAPNIK_VERSION} git@github.com:mapnik/mapnik.git ${TARBALL_NAME} +echo "Cloning ${MAPNIK_VERSION}" +git clone --depth 1 --branch ${MAPNIK_VERSION} git@github.com:mapnik/mapnik.git ${TARBALL_NAME} cd ${TARBALL_NAME} -git checkout "tags/v${MAPNIK_VERSION}" +git checkout "tags/${MAPNIK_VERSION}" echo "updating submodules" +# TODO: skip initializing submodule if data is already tagged +# Will require bundling variant as well git submodule update --depth 100 --init rm -rf deps/mapbox/variant/.git cd test/data/ git remote set-url origin git@github.com:mapnik/test-data -git tag v${MAPNIK_VERSION} -a -m "tagging for v${MAPNIK_VERSION}" +echo "tagging test data" +git tag ${MAPNIK_VERSION} -a -m "tagging for ${MAPNIK_VERSION}" git push --tags cd ../../ +echo "removing test data submodule" rm -rf test/data/ cd test/data-visual/ git remote set-url origin git@github.com:mapnik/test-data-visual -git tag v${MAPNIK_VERSION} -a -m "tagging for v${MAPNIK_VERSION}" +echo "tagging visual data" +git tag ${MAPNIK_VERSION} -a -m "tagging for ${MAPNIK_VERSION}" git push --tags cd ../../ +echo "removing visual test data submodule" rm -rf test/data-visual/ rm -rf .git rm -rf .gitignore cd ../ +echo "creating tarball of ${TARBALL_NAME}.tar.bz2" tar cjf ${TARBALL_NAME}.tar.bz2 ${TARBALL_NAME}/ -#aws s3 cp --acl public-read ${TARBALL_NAME}.tar.bz2 s3://mapnik/dist/v${MAPNIK_VERSION}/ +echo "uploading $(dirname ${TARBALL_NAME})/${TARBALL_NAME}.tar.bz2 to s3://mapnik/dist/${MAPNIK_VERSION}/" +# TODO: upload to github releases instead of s3 +aws s3 cp --acl public-read ${TARBALL_NAME}.tar.bz2 s3://mapnik/dist/${MAPNIK_VERSION}/ From b481d62d3d98cea2fec9ebb85e8796472440f7e8 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 6 Sep 2016 00:26:45 -0700 Subject: [PATCH 9/9] block invalid publish [skip ci] --- scripts/publish_release.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/publish_release.sh b/scripts/publish_release.sh index 1f2428a66..fb79e0c41 100755 --- a/scripts/publish_release.sh +++ b/scripts/publish_release.sh @@ -6,6 +6,13 @@ set -o pipefail # for normal release leave empty # for release candidate, add "-rcN" export MAPNIK_VERSION=$(git describe) +if [[ $(git tag -l) =~ $MAPNIK_VERSION ]]; then echo yes; + echo "Success: found $MAPNIK_VERSION (result of git describe) in tags, continuing" +else + echo "error: $MAPNIK_VERSION (result of git describe) not in "git tag -l" output, aborting" + echo "You must create a valid annotated tag first, before running this ./scripts/publish_release.sh" + exit 1 +fi export TARBALL_NAME="mapnik-${MAPNIK_VERSION}" cd /tmp/ rm -rf ${TARBALL_NAME}