[geos-commits] r3941 - in branches/3.3: . tools tools/ci

svn_geos at osgeo.org svn_geos at osgeo.org
Wed Sep 4 15:04:52 PDT 2013


Author: mloskot
Date: 2013-09-04 15:04:51 -0700 (Wed, 04 Sep 2013)
New Revision: 3941

Added:
   branches/3.3/.travis.yml
   branches/3.3/tools/ci/
   branches/3.3/tools/ci/before_install.sh
   branches/3.3/tools/ci/before_install_autotools.sh
   branches/3.3/tools/ci/before_install_cmake.sh
   branches/3.3/tools/ci/common.sh
   branches/3.3/tools/ci/script.sh
   branches/3.3/tools/ci/script_autotools.sh
   branches/3.3/tools/ci/script_cmake.sh
Log:
Add Travis CI service to branches/3.3

Added: branches/3.3/.travis.yml
===================================================================
--- branches/3.3/.travis.yml	                        (rev 0)
+++ branches/3.3/.travis.yml	2013-09-04 22:04:51 UTC (rev 3941)
@@ -0,0 +1,40 @@
+# .travis.yml - Travis CI service confiuration for GEOS
+#
+# Copyright (C) 2013 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation. 
+# See the COPYING file for more information.
+#
+language: cpp
+
+compiler:
+    - g++
+    - clang
+
+env:
+    matrix:
+        - GEOS_BUILD_TOOL=autotools CFLAGS=-m32 CXXFLAGS=-m32
+        - GEOS_BUILD_TOOL=autotools CFLAGS=-m64 CXXFLAGS=-m64
+        - GEOS_BUILD_TOOL=cmake CFLAGS=-m32 CXXFLAGS=-m32
+        - GEOS_BUILD_TOOL=cmake CFLAGS=-m64 CXXFLAGS=-m64
+
+before_install: ./tools/ci/before_install.sh
+
+script: ./tools/ci/script.sh
+
+notifications:
+    irc:
+        channels:
+            - "chat.freenode.net#postgis"
+        on_success: always # [always|never|change] # default: change
+        on_failure: always # [always|never|change] # default: always
+        use_notice: true
+    email:
+        recipients:
+            #- geos-devel at lists.osgeo.org # TODO: whitelist this e-mail
+            - mateusz at loskot.net
+        on_success: change
+        on_failure: always
+

Added: branches/3.3/tools/ci/before_install.sh
===================================================================
--- branches/3.3/tools/ci/before_install.sh	                        (rev 0)
+++ branches/3.3/tools/ci/before_install.sh	2013-09-04 22:04:51 UTC (rev 3941)
@@ -0,0 +1,19 @@
+#!/bin/bash -e
+#
+# Travis CI before_install runner for GEOS
+#
+# Copyright (c) 2013 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation. 
+# See the COPYING file for more information.
+#
+source ${TRAVIS_BUILD_DIR}/tools/ci/common.sh
+
+sudo apt-get update -qq
+sudo apt-get install -qq gcc-multilib g++-multilib
+
+before_install="${TRAVIS_BUILD_DIR}/tools/ci/before_install_${GEOS_BUILD_TOOL}.sh"
+[ -x ${before_install} ] && ${before_install} || echo "nothing to run"
+


Property changes on: branches/3.3/tools/ci/before_install.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/3.3/tools/ci/before_install_autotools.sh
===================================================================
--- branches/3.3/tools/ci/before_install_autotools.sh	                        (rev 0)
+++ branches/3.3/tools/ci/before_install_autotools.sh	2013-09-04 22:04:51 UTC (rev 3941)
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+#
+# Travis CI before_install for GEOS build with GNU Autotools
+#
+# Copyright (C) 2013 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation. 
+# See the COPYING file for more information.
+#
+source ${TRAVIS_BUILD_DIR}/tools/ci/common.sh
+
+sudo apt-get install -qq make


Property changes on: branches/3.3/tools/ci/before_install_autotools.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/3.3/tools/ci/before_install_cmake.sh
===================================================================
--- branches/3.3/tools/ci/before_install_cmake.sh	                        (rev 0)
+++ branches/3.3/tools/ci/before_install_cmake.sh	2013-09-04 22:04:51 UTC (rev 3941)
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+#
+# Travis CI before_install for GEOS build with CMake
+#
+# Copyright (C) 2013 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation. 
+# See the COPYING file for more information.
+#
+source ${TRAVIS_BUILD_DIR}/tools/ci/common.sh
+
+sudo apt-get install -qq cmake


Property changes on: branches/3.3/tools/ci/before_install_cmake.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/3.3/tools/ci/common.sh
===================================================================
--- branches/3.3/tools/ci/common.sh	                        (rev 0)
+++ branches/3.3/tools/ci/common.sh	2013-09-04 22:04:51 UTC (rev 3941)
@@ -0,0 +1,42 @@
+#!/bin/bash -e
+#
+# Common utilities for Travis CI setup for GEOS
+#
+# Copyright (c) 2013 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation. 
+# See the COPYING file for more information.
+#
+if [[ "$TRAVIS" != "true" ]] ; then
+	echo "Running this script makes no sense outside of travis-ci.org"
+	exit 1
+fi
+#
+# Environment
+#
+TCI_NUMTHREADS=2
+if [[ -f /sys/devices/system/cpu/online ]]; then
+	# Calculates 1.5 times physical threads
+	TCI_NUMTHREADS=$(( ( $(cut -f 2 -d '-' /sys/devices/system/cpu/online) + 1 ) * 15 / 10  ))
+fi
+#
+# Functions
+#
+tmstamp()
+{
+    echo -n "[$(date '+%H:%M:%S')]" ;
+}
+
+run_make()
+{
+    [ $TCI_NUMTHREADS -gt 0 ] && make -j $TCI_NUMTHREADS || make 
+}
+
+run_test()
+{
+    [ -f CMakeCache.txt ] && \
+        ctest -V --output-on-failure . || \
+        make check
+}

Added: branches/3.3/tools/ci/script.sh
===================================================================
--- branches/3.3/tools/ci/script.sh	                        (rev 0)
+++ branches/3.3/tools/ci/script.sh	2013-09-04 22:04:51 UTC (rev 3941)
@@ -0,0 +1,20 @@
+#!/bin/bash -e
+#
+# Travis CI script runner for GEOS
+#
+# Copyright (c) 2013 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation. 
+# See the COPYING file for more information.
+#
+source ${TRAVIS_BUILD_DIR}/tools/ci/common.sh
+
+# prepare build directory
+builddir="${TRAVIS_BUILD_DIR}/_build"
+mkdir -p ${builddir}
+cd ${builddir}
+
+# build and run tests
+${TRAVIS_BUILD_DIR}/tools/ci/script_${GEOS_BUILD_TOOL}.sh


Property changes on: branches/3.3/tools/ci/script.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/3.3/tools/ci/script_autotools.sh
===================================================================
--- branches/3.3/tools/ci/script_autotools.sh	                        (rev 0)
+++ branches/3.3/tools/ci/script_autotools.sh	2013-09-04 22:04:51 UTC (rev 3941)
@@ -0,0 +1,19 @@
+#!/bin/bash -e
+#
+# Travis CI script for GEOS build with GNU Autotools
+#
+# Copyright (C) 2013 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation. 
+# See the COPYING file for more information.
+#
+source ${TRAVIS_BUILD_DIR}/tools/ci/common.sh
+
+cd ${TRAVIS_BUILD_DIR}
+./autogen.sh
+cd -
+${TRAVIS_BUILD_DIR}/configure
+run_make
+run_test


Property changes on: branches/3.3/tools/ci/script_autotools.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/3.3/tools/ci/script_cmake.sh
===================================================================
--- branches/3.3/tools/ci/script_cmake.sh	                        (rev 0)
+++ branches/3.3/tools/ci/script_cmake.sh	2013-09-04 22:04:51 UTC (rev 3941)
@@ -0,0 +1,16 @@
+#!/bin/bash -e
+#
+# Travis CI script for GEOS build with CMake
+#
+# Copyright (C) 2013 Mateusz Loskot <mateusz at loskot.net>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU Lesser General Public Licence as published
+# by the Free Software Foundation. 
+# See the COPYING file for more information.
+#
+source ${TRAVIS_BUILD_DIR}/tools/ci/common.sh
+
+cmake ${TRAVIS_BUILD_DIR}
+run_make
+run_test


Property changes on: branches/3.3/tools/ci/script_cmake.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the geos-commits mailing list