poco/.travis.yml
2017-10-23 10:41:35 -05:00

237 lines
9.3 KiB
YAML

language: cpp
cache:
- apt
branches:
except:
- /.*pp.eyor.*/
- /.*Merge.*/
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y libpcre3-dev libssl-dev libexpat1-dev; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y libpq-dev unixodbc-dev libmysqlclient-dev libsqlite3-dev; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y sloccount cppcheck; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y gcc-5 g++-5; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo bash -c "cat >> /etc/apt/sources.list" < build/script/clang.apt; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
services:
- mongodb
- redis-server
- postgresql
- mysql
dist: trusty
sudo: enabled
addons:
postgresql: "9.4"
notifications:
email:
on_success: never # default: change
on_failure: always # default: always
slack:
rooms:
- pocoproject:ItIUZvs8aJGyPdaKxIKMnS1t#travis
on_success: never # default: change
on_failure: always # default: always
env:
global:
TEST_NAME=""
before_script:
- echo ${TEST_NAME}
- chmod 755 ./travis/Linux/runtests.sh
- chmod 755 ./travis/OSX/runtests.sh
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mysql -u root -e 'create database pocotestdb;'; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mysql --version; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then postgres --version; fi
- sqlite3 -version
matrix:
fast_finish: true
include:
- env: TEST_NAME="gcc 4.9 (make) bundled"
compiler: gcc
script:
- sudo apt-get install -qq -y gcc-4.9 g++-4.9
- export CC="gcc-4.9"
- export CXX="g++-4.9"
- $CXX --version
- ./configure --everything --omit=PDF && source config.make && cat build/config/$POCO_CONFIG
- make -s -j2 && ./travis/Linux/runtests.sh
- env: TEST_NAME="gcc 5.4 (make) bundled"
compiler: gcc
script:
- export CC="gcc-5"
- export CXX="g++-5"
- $CXX --version
- ./configure --everything --omit=PDF && source config.make && cat build/config/$POCO_CONFIG
- make -s -j2 && ./travis/Linux/runtests.sh
#- env: TEST_NAME="gcc 5.4 (make) unbundled"
# ======================================= unit tests fail ures due to unbundled pcre
# There was 1 error:
# 1: N7CppUnit10TestCallerI21RegularExpressionTestEE.testSubst2
# "St9bad_alloc: std::bad_alloc"
# in "<unknown>", line -1
#
# There were 4 failures:
# 1: N7CppUnit10TestCallerI21RegularExpressionTestEE.testMatch4
# "re.match("123 456", 0, matches) == 3"
# in "src/RegularExpressionTest.cpp", line 103
# 2: N7CppUnit10TestCallerI21RegularExpressionTestEE.testMatch6
# "expr.match("abcde", 0, 0)"
# in "src/RegularExpressionTest.cpp", line 136
# 3: N7CppUnit10TestCallerI21RegularExpressionTestEE.testSplit2
# "re.split("123 456", 0, strings) == 3"
# in "src/RegularExpressionTest.cpp", line 184
# 4: N7CppUnit10TestCallerI21RegularExpressionTestEE.testGroup
# "re.match("abcd 1234", 0, matches) == 3"
# in "src/RegularExpressionTest.cpp", line 271
#
# failed=Foundation
# =======================================
# compiler: gcc
# script:
# - sudo apt-get install -qq -y gcc-5 g++-5
# - export CC="gcc-5"
# - export CXX="g++-5"
# - $CXX --version
# - ./configure --everything --omit=PDF --unbundled && make -s -j2 && ./travis/Linux/runtests.sh
- env: TEST_NAME="gcc 4.9 (CMake)"
compiler: gcc
script:
- sudo apt-get install -qq -y gcc-4.9 g++-4.9
- export CC="gcc-4.9"
- export CXX="g++-4.9"
- $CXX --version
- source ./travis/ignored.sh
- export POCO_BASE=`pwd`
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_PDF=OFF -DENABLE_TESTS=ON .. && make -s -j2 && ctest -VV -E Data && cd ..
- env: TEST_NAME="clang (make) bundled"
os: osx
compiler: clang
script:
- export CC="clang"
- export CXX="clang++"
- $CXX --version
- $CXX -x c++ /dev/null -dM -E
- ./configure --everything --omit=PDF,Data/ODBC,Data/MySQL,Data/PostgreSQL && source config.make && cat build/config/$POCO_CONFIG
- make -s -j2 && sudo make install && ./travis/OSX/runtests.sh
- env: TEST_NAME="clang 4.0 (make) bundled"
compiler: clang
script:
- sudo apt-get install -qq -y clang-4.0 lldb-4.0 libc++-dev libc++abi-dev
- export CLANG_VERSTION="-4.0"
- export CC="clang-4.0"
- export CXX="clang++-4.0"
- $CXX --version
- ./configure --config=Linux-clang --everything --omit=PDF && source config.make && cat build/config/$POCO_CONFIG
- make -s -j2 && ./travis/Linux/runtests.sh
- env: TEST_NAME="clang 5.0 (make) bundled"
compiler: clang
script:
- sudo apt-get install -qq -y clang-5.0 lldb-5.0 libc++-dev libc++abi-dev
- export CLANG_VERSTION="-5.0"
- export CC="clang-5.0"
- export CXX="clang++-5.0"
- $CXX --version
- ./configure --config=Linux-clang --everything --omit=PDF && source config.make && cat build/config/$POCO_CONFIG
- make -s -j2 && ./travis/Linux/runtests.sh
#- env: TEST_NAME="clang 3.5.0 (make) unbundled"
# ======================================= compiler error on generating debug info for auto return
# error: debug information for auto is not yet supported
# error: debug information for auto is not yet supported
# ** Creating dependency info for src/Timespan.cpp
# make[1]: *** [/home/travis/build/Kampbell/poco/CppUnit/obj/Linux/x86_64/debug_shared/TestRunner.o] Error 1 # compiler: clang
# =======================================
# script:
# - export CC="clang"
# - export CXX="clang++"
# - $CXX --version
# - ./configure --config=Linux-clang --everything --omit=PDF --unbundled && make -s -j2 && ./travis/Linux/runtests.sh
#- env: TEST_NAME="arm-linux-gnueabi-g++ (make)"
# compiler: gcc
# script:
# - sudo apt-get install -qq -y g++-arm-linux-gnueabi g++-arm-linux-gnueabihf
# - arm-linux-gnueabi-g++ --version
# - arm-linux-gnueabi-g++ -x c++ /dev/null -dM -E
# - ./configure --omit=PDF,Data/ODBC,Data/MySQL,Data/PostgreSQL,Crypto,NetSSL,PageCompiler && make -s -j2 CROSS_COMPILE=arm-linux-gnueabi- POCO_TARGET_OSARCH=armv7l
#- env: TEST_NAME="clang (CMake)"
# compiler: clang
# script:
# - source ./travis/ignored.sh
# - export POCO_BASE=`pwd`
# - mkdir cmake-build && cd cmake-build && cmake -DENABLE_PDF=OFF -DENABLE_TESTS=ON .. && make -s -j2 && ctest -VV -E Data && cd ..
#- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
# ======================================= "arm-linux-gnueabi-g++: version 4.7.0: non compliant to c++11
# compiler: gcc
# script:
# - sudo apt-get install -qq -y g++-arm-linux-gnueabi g++-arm-linux-gnueabihf
# - export CC="arm-linux-gnueabi-gcc"
# - export CXX="arm-linux-gnueabi-g++"
# - $CXX --version
# - source ./travis/ignored.sh
# - export POCO_BASE=`pwd`
# - mkdir cmake-build
# - cd cmake-build && cmake -DENABLE_PDF=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -s -j2 && cd ..
- env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)"
compiler: gcc
script:
- sudo apt-get install -qq -y g++-arm-linux-gnueabi g++-arm-linux-gnueabihf
- export CC="arm-linux-gnueabihf-gcc"
- export CXX="arm-linux-gnueabihf-g++"
- $CXX --version
- source ./travis/ignored.sh
- export POCO_BASE=`pwd`
- mkdir cmake-build
- cd cmake-build && cmake -DENABLE_PDF=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -s -j2 && cd ..
# QA jobs for code analytics and metrics
# build documentation and release
- env: TEST_NAME="documentation & release"
compiler: gcc
script:
- $CXX --version
- . env.sh && mkdoc all && mkrel all
# static code analysis with cppcheck (we can add --enable=all later)
- env: TEST_NAME="cppcheck"
script: cppcheck --force --quiet --inline-suppr -j2 -iData/SQLite/src/sqlite3.c .
# search for TODO within source tree
- env: TEST_NAME="TODO"
script: grep -r TODO *
# search for FIXME within source tree
- env: TEST_NAME="FIXME"
script: grep -r FIXME *
# search for HACK within source tree
- env: TEST_NAME="HACK"
script: grep -r HACK *
# some statistics about the code base
- env: TEST_NAME="sloccount"
script: sloccount .