2012-12-16 02:59:57 +01:00
|
|
|
language: cpp
|
2014-11-08 19:33:26 +01:00
|
|
|
|
|
|
|
cache:
|
|
|
|
- apt
|
|
|
|
|
2013-12-18 14:23:40 +01:00
|
|
|
before_install:
|
2014-11-08 19:33:26 +01:00
|
|
|
# we need a recent version of CMake
|
2015-11-10 21:42:41 +01:00
|
|
|
# linux prereqisite packages
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget --no-check-certificate https://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.tar.gz; fi
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then tar -xzvf cmake-3.2.3-Linux-x86_64.tar.gz; fi
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$PWD/cmake-3.2.3-Linux-x86_64/bin:$PATH; fi
|
2017-11-08 16:42:53 +01:00
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
|
2018-06-03 18:17:50 +02:00
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y unixodbc-dev libmysqlclient-dev g++-arm-linux-gnueabi g++-arm-linux-gnueabihf clang-3.5 libc++-dev ninja-build sloccount cppcheck; fi
|
2014-11-08 19:33:26 +01:00
|
|
|
|
|
|
|
services:
|
|
|
|
- mongodb
|
2017-11-08 21:48:55 +01:00
|
|
|
- redis-server
|
|
|
|
- postgresql
|
|
|
|
- mysql
|
|
|
|
|
|
|
|
addons:
|
|
|
|
postgresql: "9.4"
|
|
|
|
|
2018-04-01 10:50:10 +02:00
|
|
|
git:
|
|
|
|
submodules: false
|
2018-03-08 20:46:19 +01:00
|
|
|
|
2015-11-10 22:26:59 +01:00
|
|
|
notifications:
|
2015-11-11 10:35:20 +01:00
|
|
|
slack: pocoproject:ItIUZvs8aJGyPdaKxIKMnS1t
|
2014-11-08 19:33:26 +01:00
|
|
|
|
|
|
|
env:
|
|
|
|
global: TEST_NAME=""
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- echo ${TEST_NAME}
|
|
|
|
|
|
|
|
matrix:
|
2018-03-08 20:46:19 +01:00
|
|
|
include:
|
|
|
|
- env: TEST_NAME="android API level 19"
|
|
|
|
language: android
|
|
|
|
jdk: openjdk8
|
|
|
|
android:
|
|
|
|
components:
|
|
|
|
- tools
|
|
|
|
- platform-tools
|
|
|
|
- tools
|
|
|
|
- build-tools-23.0.3
|
|
|
|
- extra-android-support
|
|
|
|
- extra-android-m2repository
|
|
|
|
- android-19
|
|
|
|
- android-24
|
|
|
|
- sys-img-armeabi-v7a-android-24
|
|
|
|
# Unfortunaly travis use the old android sdk tool instead of using the new sdkmanager.
|
|
|
|
# In this deprecated android sdk tool there is no ndk-bundle or cmake package!
|
|
|
|
licenses:
|
|
|
|
- '.+'
|
|
|
|
before_install:
|
|
|
|
- export TERM=dumb
|
|
|
|
- sudo apt-get update -qq
|
|
|
|
# I don't understand why redis and mongodb are not installed although services added above !
|
|
|
|
- sudo apt-get install -qq -y mongodb-server redis-server
|
|
|
|
- /usr/bin/redis-server &
|
|
|
|
- sudo /usr/bin/mongod --config /etc/mongodb.conf &
|
|
|
|
- touch ~/.android/repositories.cfg
|
|
|
|
- mkdir -p /usr/local/android-sdk/licenses
|
|
|
|
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > /usr/local/android-sdk/licenses/android-sdk-license
|
|
|
|
- echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> /usr/local/android-sdk/licenses/android-sdk-license
|
|
|
|
# Install NDK and cmake via android sdkmanager.
|
|
|
|
- /usr/local/android-sdk/tools/bin/sdkmanager --update > /dev/null
|
2018-05-20 05:43:55 +02:00
|
|
|
- /usr/local/android-sdk/tools/bin/sdkmanager "emulator" "ndk-bundle" "cmake;3.6.4111459" > /dev/null
|
|
|
|
- /usr/local/android-sdk/tools/bin/sdkmanager --list
|
2018-03-08 20:46:19 +01:00
|
|
|
before_script:
|
|
|
|
- export TERM=dumb
|
|
|
|
- export _NO_CHECK_SIGNATURE=true
|
|
|
|
- echo no | /usr/local/android-sdk/tools/bin/avdmanager create avd -n test -k "system-images;android-24;default;armeabi-v7a"
|
|
|
|
- /usr/local/android-sdk/emulator/emulator -avd test -no-audio -no-window -dns-server 8.8.8.8 &
|
|
|
|
- android-wait-for-emulator
|
|
|
|
- /usr/local/android-sdk/platform-tools/adb shell input keyevent 82 &
|
|
|
|
script:
|
|
|
|
# Mandatory cmake parameter to set API level and platform for the android toolchain:
|
|
|
|
# /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-22
|
|
|
|
# See also in /usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake
|
|
|
|
|
|
|
|
# Using the ninja build command. Is much faster then make build command.
|
2018-06-03 18:17:50 +02:00
|
|
|
- /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -H. -Bcmake-build -G'Android Gradle - Ninja' -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-19 -DCMAKE_MAKE_PROGRAM=/usr/local/android-sdk/cmake/3.6.4111459/bin/ninja -DANDROID_STL="c++_static" -DANDROID_CPP_FEATURES="exceptions rtti" -DENABLE_TESTS=ON -DENABLE_LONG_RUNNING_TESTS=OFF -DOLD_REDIS_VERSION=ON && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake --build cmake-build --target all && cd cmake-build && travis_wait 30 /usr/local/android-sdk/cmake/3.6.4111459/bin/ctest -E Foundation --output-on-failure
|
2018-03-08 20:46:19 +01:00
|
|
|
|
|
|
|
- env: TEST_NAME="android API level 24"
|
|
|
|
language: android
|
|
|
|
jdk: openjdk8
|
|
|
|
android:
|
|
|
|
components:
|
|
|
|
- tools
|
|
|
|
- platform-tools
|
|
|
|
- tools
|
|
|
|
- build-tools-23.0.3
|
|
|
|
- extra-android-support
|
|
|
|
- extra-android-m2repository
|
|
|
|
- android-24
|
|
|
|
- sys-img-armeabi-v7a-android-24
|
|
|
|
# Unfortunaly travis use the old android sdk tool instead of using the new sdkmanager.
|
|
|
|
# In this deprecated android sdk tool there is no ndk-bundle or cmake package!
|
|
|
|
licenses:
|
|
|
|
- '.+'
|
|
|
|
before_install:
|
|
|
|
- export TERM=dumb
|
|
|
|
- sudo apt-get update -qq
|
|
|
|
# I don't understand why redis and mongodb are not installed although services added above !
|
|
|
|
- sudo apt-get install -qq -y mongodb-server redis-server
|
|
|
|
- /usr/bin/redis-server &
|
|
|
|
- sudo /usr/bin/mongod --config /etc/mongodb.conf &
|
|
|
|
- touch ~/.android/repositories.cfg
|
|
|
|
- mkdir -p /usr/local/android-sdk/licenses
|
|
|
|
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > /usr/local/android-sdk/licenses/android-sdk-license
|
|
|
|
- echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> /usr/local/android-sdk/licenses/android-sdk-license
|
|
|
|
# Install NDK and cmake via android sdkmanager.
|
|
|
|
- /usr/local/android-sdk/tools/bin/sdkmanager --update > /dev/null
|
2018-05-20 05:43:55 +02:00
|
|
|
- /usr/local/android-sdk/tools/bin/sdkmanager "emulator" "ndk-bundle" "cmake;3.6.4111459" > /dev/null
|
|
|
|
- /usr/local/android-sdk/tools/bin/sdkmanager --list
|
2018-03-08 20:46:19 +01:00
|
|
|
before_script:
|
|
|
|
- export TERM=dumb
|
|
|
|
- export _NO_CHECK_SIGNATURE=true
|
|
|
|
- echo no | /usr/local/android-sdk/tools/bin/avdmanager create avd -n test -k "system-images;android-24;default;armeabi-v7a"
|
|
|
|
- /usr/local/android-sdk/emulator/emulator -avd test -no-audio -no-window -dns-server 8.8.8.8 &
|
|
|
|
- android-wait-for-emulator
|
|
|
|
- /usr/local/android-sdk/platform-tools/adb shell input keyevent 82 &
|
|
|
|
script:
|
|
|
|
# Mandatory cmake parameter to set API level and platform for the android toolchain:
|
|
|
|
# /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-22
|
|
|
|
# See also in /usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake
|
|
|
|
|
|
|
|
# Using the ninja build command. Is much faster then make build command.
|
2018-06-03 18:17:50 +02:00
|
|
|
- /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake -H. -Bcmake-build -G'Android Gradle - Ninja' -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/usr/local/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-24 -DCMAKE_MAKE_PROGRAM=/usr/local/android-sdk/cmake/3.6.4111459/bin/ninja -DANDROID_STL="c++_static" -DANDROID_CPP_FEATURES="exceptions rtti" -DENABLE_TESTS=ON -DENABLE_LONG_RUNNING_TESTS=OFF -DOLD_REDIS_VERSION=ON && /usr/local/android-sdk/cmake/3.6.4111459/bin/cmake --build cmake-build --target all && cd cmake-build && travis_wait 30 /usr/local/android-sdk/cmake/3.6.4111459/bin/ctest -E Foundation --output-on-failure
|
2018-03-08 20:46:19 +01:00
|
|
|
|
2014-11-08 19:33:26 +01:00
|
|
|
- env: TEST_NAME="gcc (make)"
|
|
|
|
compiler: gcc
|
|
|
|
script:
|
2018-05-13 19:06:09 +02:00
|
|
|
- ./configure --everything --omit=PDF && make all -s -j2 && sudo make install
|
2018-06-02 21:02:33 +02:00
|
|
|
- sudo -s ./travis/runtests.sh
|
2018-03-08 20:46:19 +01:00
|
|
|
|
2015-10-06 16:32:28 +02:00
|
|
|
- env: TEST_NAME="clang (make)"
|
|
|
|
compiler: clang
|
|
|
|
script:
|
2018-05-13 19:06:09 +02:00
|
|
|
- ./configure --everything --omit=PDF --config=Linux-clang && make all -s -j2 && sudo make install
|
2018-06-02 21:02:33 +02:00
|
|
|
- sudo -s ./travis/runtests.sh
|
2014-11-08 19:33:26 +01:00
|
|
|
|
|
|
|
- env: TEST_NAME="arm-linux-gnueabi- (make)"
|
|
|
|
script:
|
2018-05-13 18:25:43 +02:00
|
|
|
- ./configure --omit=PDF,Data/ODBC,Data/MySQL,Crypto,NetSSL,PageCompiler && make all -s -j2 CROSS_COMPILE=arm-linux-gnueabi- POCO_TARGET_OSARCH=armv7l
|
2014-11-08 19:33:26 +01:00
|
|
|
|
|
|
|
- env: TEST_NAME="gcc (CMake)"
|
|
|
|
compiler: gcc
|
|
|
|
script:
|
|
|
|
# disable tests, gcc-4.6 gets an internal compiler error
|
2018-06-03 18:17:50 +02:00
|
|
|
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=OFF && cmake --build cmake-build --target all
|
2014-11-08 19:33:26 +01:00
|
|
|
|
|
|
|
- env: TEST_NAME="gcc-4.8 (CMake)"
|
|
|
|
compiler: gcc
|
|
|
|
script:
|
2015-11-10 22:26:59 +01:00
|
|
|
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
|
|
|
- sudo apt-get update -qq
|
2014-11-08 19:33:26 +01:00
|
|
|
- sudo apt-get install -qq -y g++-4.8
|
|
|
|
- export CC="gcc-4.8"
|
|
|
|
- export CXX="g++-4.8"
|
2018-06-03 18:17:50 +02:00
|
|
|
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
2014-11-08 19:33:26 +01:00
|
|
|
|
|
|
|
- env: TEST_NAME="clang (CMake)"
|
|
|
|
compiler: clang
|
|
|
|
script:
|
2018-06-03 18:17:50 +02:00
|
|
|
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
2014-11-08 19:33:26 +01:00
|
|
|
|
|
|
|
- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
|
|
|
|
script:
|
|
|
|
- export CC="arm-linux-gnueabi-gcc"
|
|
|
|
- export CXX="arm-linux-gnueabi-g++"
|
2018-06-03 18:17:50 +02:00
|
|
|
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
2014-11-08 19:33:26 +01:00
|
|
|
|
|
|
|
- env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)"
|
|
|
|
script:
|
|
|
|
- export CC="arm-linux-gnueabihf-gcc"
|
|
|
|
- export CXX="arm-linux-gnueabihf-g++"
|
2018-06-03 18:17:50 +02:00
|
|
|
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
2014-11-08 19:33:26 +01:00
|
|
|
|
|
|
|
# TODO osx build
|
|
|
|
# TODO run test suite
|
|
|
|
# script:
|
2018-05-13 18:25:43 +02:00
|
|
|
# - ./configure && make all -s -j2
|
2014-11-08 19:33:26 +01:00
|
|
|
# - sudo ifconfig -a
|
|
|
|
# - sudo ifconfig venet0 multicast
|
|
|
|
# - sudo ifconfig -a
|
|
|
|
# - export POCO_BASE=`pwd`
|
|
|
|
# - sudo -E build/script/runtests.sh
|
2013-01-07 04:43:12 +01:00
|
|
|
|
2017-11-08 07:10:10 +01:00
|
|
|
# build documentation and release
|
|
|
|
- env: TEST_NAME="documentation & release"
|
2017-11-08 15:40:38 +01:00
|
|
|
compiler: clang
|
2017-11-08 07:10:10 +01:00
|
|
|
script:
|
|
|
|
- . env.sh && mkdoc all && mkrel all
|
2017-11-08 20:58:20 +01:00
|
|
|
- ls -l releases
|
2018-03-08 20:46:19 +01:00
|
|
|
|
2014-11-08 19:33:26 +01:00
|
|
|
# QA jobs for code analytics and metrics
|
|
|
|
# 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 .
|
2017-11-08 07:10:10 +01:00
|
|
|
|
2014-11-08 19:33:26 +01:00
|
|
|
# search for TODO within source tree
|
|
|
|
- env: TEST_NAME="TODO"
|
|
|
|
script: grep -r TODO *
|
2018-03-08 20:46:19 +01:00
|
|
|
|
2014-11-08 19:33:26 +01:00
|
|
|
# search for FIXME within source tree
|
|
|
|
- env: TEST_NAME="FIXME"
|
|
|
|
script: grep -r FIXME *
|
2018-03-08 20:46:19 +01:00
|
|
|
|
2014-11-08 19:33:26 +01:00
|
|
|
# search for HACK within source tree
|
|
|
|
- env: TEST_NAME="HACK"
|
|
|
|
script: grep -r HACK *
|
2018-03-08 20:46:19 +01:00
|
|
|
|
2014-11-08 19:33:26 +01:00
|
|
|
# some statistics about the code base
|
|
|
|
- env: TEST_NAME="sloccount"
|
|
|
|
script: sloccount .
|