[osmium-tool] 24/44: Test new travis setup.
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Tue Jul 21 20:15:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to tag v1.1.0
in repository osmium-tool.
commit 94f91cc6bd9ec7c05f55b6a0eac1502539288f74
Author: Jochen Topf <jochen at topf.org>
Date: Fri Jun 26 16:59:51 2015 +0200
Test new travis setup.
---
.travis.yml | 69 ++++++++++++++++++++++++-----------------------
scripts/travis_install.sh | 15 +++++++++++
scripts/travis_script.sh | 31 +++++++++++++++++++++
3 files changed, 82 insertions(+), 33 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index dcbe03d..e845da9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,43 +6,46 @@
language: cpp
-compiler:
- - gcc
- - clang
+sudo: false
-env:
- - CONFIGURATION=Dev
- - CONFIGURATION=Release
+matrix:
+ include:
+ - os: linux
+ compiler: clang
+ env: BUILD_TYPE=Dev
+ - os: linux
+ compiler: clang
+ env: BUILD_TYPE=Release
+ - os: linux
+ compiler: gcc
+ env: BUILD_TYPE=Dev
+ - os: linux
+ compiler: gcc
+ env: BUILD_TYPE=Release
+ - os: osx
+ compiler: clang
+ env: BUILD_TYPE=Dev
+ - os: osx
+ compiler: clang
+ env: BUILD_TYPE=Release
-before_install:
- # upgrade compiler (we need at least g++-4.8 for C++11 features)
- - sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
- - sudo apt-get update --yes -qq
- - gcc_version=4.8
- - sudo apt-get install --yes gcc-${gcc_version} g++-${gcc_version}
- - gcc-${gcc_version} --version
- # make sure compiler executables point to the just installed version
- - sudo ln -sf /usr/bin/cpp-${gcc_version} /usr/bin/cpp
- - sudo ln -sf /usr/bin/gcc-${gcc_version} /usr/bin/gcc
- - sudo ln -sf /usr/bin/g++-${gcc_version} /usr/bin/g++
- # install dependencies
- - sudo apt-get install --yes make libboost-dev libboost-program-options-dev libprotobuf-dev protobuf-compiler pandoc
+# http://docs.travis-ci.com/user/apt/
+addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - g++-4.8
+ - gcc-4.8
+ - libboost-dev
+ - libboost-program-options-dev
+ - libprotobuf-dev
+ - pandoc
+ - protobuf-compiler
install:
- - cd ..
- - git clone https://github.com/osmcode/libosmium.git
- - git clone https://github.com/scrosby/OSM-binary.git
- - cd OSM-binary/src
- - make
- - sudo make install
+ - scripts/travis_install.sh
script:
- - cd $TRAVIS_BUILD_DIR
- - mkdir build
- - cd build
- # GCC ignores the pragmas in the code that disable the "return-type" warning selectively, so use this workaround
- - if [ "${CXX}" = 'g++' ]; then WORKAROUND="-DCMAKE_CXX_FLAGS=-Wno-return-type"; else WORKAROUND=""; fi
- - cmake -LA -DCMAKE_BUILD_TYPE=${CONFIGURATION} ${WORKAROUND} ..
- - make VERBOSE=1
- - ctest --output-on-failure
+ - scripts/travis_script.sh
diff --git a/scripts/travis_install.sh b/scripts/travis_install.sh
new file mode 100755
index 0000000..2285f5f
--- /dev/null
+++ b/scripts/travis_install.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# travis_install.sh
+#
+
+if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ brew install protobuf osm-pbf || true
+fi
+
+cd ..
+git clone --quiet --depth 1 https://github.com/osmcode/libosmium.git
+git clone --quiet --depth 1 https://github.com/scrosby/OSM-binary.git
+cd OSM-binary/src
+make
+
diff --git a/scripts/travis_script.sh b/scripts/travis_script.sh
new file mode 100755
index 0000000..c0f511e
--- /dev/null
+++ b/scripts/travis_script.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# travis_script.sh
+#
+
+mkdir build
+cd build
+
+# GCC ignores the pragmas in the code that disable the "return-type" warning
+# selectively, so use this workaround.
+if [ "${CXX}" = "g++" ]; then
+ WORKAROUND="-DCMAKE_CXX_FLAGS=-Wno-return-type"
+else
+ WORKAROUND=""
+fi
+
+if [ "${CXX}" = "g++" ]; then
+ CXX=g++-4.8
+ CC=gcc-4.8
+fi
+
+cmake -LA \
+ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
+ -DOSMPBF_INCLUDE_DIR=${TRAVIS_BUILD_DIR}/../OSM-binary/include \
+ -DOSMPBF_LIBRARY=${TRAVIS_BUILD_DIR}/../OSM-binary/src/libosmpbf.a \
+ ${WORKAROUND} \
+ ..
+
+make VERBOSE=1
+ctest --output-on-failure
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmium-tool.git
More information about the Pkg-grass-devel
mailing list