From fd0ed462259bfb5aca7bf985af0c2c32f3476b63 Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Sat, 25 Aug 2018 11:57:24 +0200 Subject: [PATCH] travis: switch to trusty, tweaks from master --- .travis.yml | 42 ++++++++++++++++++++-------------------- scripts/travis-common.sh | 4 ++++ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index f794280f2..95f559492 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,43 +11,42 @@ env: - HEAVY_JOBS="2" - PREFIX=/tmp/mapnik - secure: "F6ivqDNMBQQnrDGA9+7IX+GDswuIqQQd7YPJdQqa2Ked9jddAQDeJClb05ig3JlwfOlYLGZOd43ZX0pKuMtI2Gbkwz211agGP9S3YunwlRg8iWtJlO5kYFUdKCmJNhjg4icfkGELCgwXn+zuEWFSLpkPcjqAFKFlQrIJeAJJgKM=" -addons: - postgresql: "9.4" cache: directories: - $HOME/.ccache -dist: precise +dist: trusty +sudo: false matrix: include: - os: linux - sudo: false - compiler: ": clang" + name: Linux gcc-6 env: JOBS=4 CXX="ccache g++-6" CC="gcc-6" addons: + postgresql: "9.4" apt: sources: [ 'ubuntu-toolchain-r-test'] - packages: [ 'libstdc++-6-dev', 'g++-6', 'xutils-dev'] + packages: [ 'libstdc++-6-dev', 'g++-6', 'xutils-dev', 'postgresql-9.4-postgis-2.3' ] - os: linux - sudo: false - compiler: ": clang" + name: Linux clang-3.9 env: JOBS=8 CXX="ccache clang++-3.9 -Qunused-arguments" CC="clang-3.9" ENABLE_GLIBC_WORKAROUND=true TRIGGER=true addons: + postgresql: "9.4" apt: - sources: [ 'ubuntu-toolchain-r-test'] - packages: [ 'libstdc++-4.9-dev', 'xutils-dev'] + sources: [ 'ubuntu-toolchain-r-test' ] + packages: [ 'libstdc++-4.9-dev', 'xutils-dev', 'postgresql-9.4-postgis-2.3' ] - os: linux - sudo: false - compiler: ": clang-coverage" + name: Linux clang-3.9 + coverage env: JOBS=8 COVERAGE=true CXX="ccache clang++-3.9 -Qunused-arguments" CC="clang-3.9" addons: + postgresql: "9.4" apt: - sources: [ 'ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev', 'xutils-dev' ] + sources: [ 'ubuntu-toolchain-r-test' ] + packages: ['libstdc++-4.9-dev', 'xutils-dev', 'postgresql-9.4-postgis-2.3' ] - os: osx - compiler: ": clang-osx" + name: OSX clang # https://docs.travis-ci.com/user/languages/objective-c/#Supported-OS-X-iOS-SDK-versions osx_image: xcode7.3 # upgrades clang from 6 -> 7 env: JOBS=4 CXX="ccache clang++ -Qunused-arguments" @@ -63,7 +62,7 @@ before_install: - export PATH=${PREFIX}/bin:$(pwd)/mason_packages/.link/bin:${PATH} - export COVERAGE=${COVERAGE:-false} - export BENCH=${BENCH:-false} - - git_submodule_update --init + - git_submodule_update --init deps/ install: - on 'osx' export DATA_PATH=$(brew --prefix)/var/postgres @@ -101,11 +100,12 @@ script: # to ensure that slow builds still upload their # ccache results and therefore should be faster # (and might work) for the next build - - DURATION=2400 - - scripts/travis-command-wrapper.py -s "date" -i 120 --deadline=$(( $(date +%s) + ${DURATION} )) make - - make test - - enabled ${COVERAGE} coverage - - enabled ${BENCH} make bench + - DEADLINE=$(( $(date +%s) + 40 * 60 )) + - scripts/travis-command-wrapper.py -s "date" -i 120 --deadline="$DEADLINE" make + - test_ok && git_submodule_update --init test/ + - test_ok && make test + - test_ok && enabled ${COVERAGE} coverage + - test_ok && enabled ${BENCH} make bench - ./scripts/check_glibcxx.sh after_success: diff --git a/scripts/travis-common.sh b/scripts/travis-common.sh index d3ce79f10..1e610a028 100644 --- a/scripts/travis-common.sh +++ b/scripts/travis-common.sh @@ -28,6 +28,10 @@ on () { esac } +test_ok () { + return $TRAVIS_TEST_RESULT +} + git_submodule_update () { git submodule update "$@" && return # failed, search branch and pull request heads for matching commit