mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
166 lines
8.5 KiB
YAML
166 lines
8.5 KiB
YAML
language: cpp
|
|
|
|
cache:
|
|
- apt
|
|
|
|
before_install:
|
|
# we need a recent version of CMake
|
|
# linux prereqisite packages
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget --no-check-certificate https://www.cmake.org/files/v3.5/cmake-3.5.1-Linux-x86_64.tar.gz; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then tar -xzvf cmake-3.5.1-Linux-x86_64.tar.gz; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$PWD/cmake-3.5.1-Linux-x86_64/bin:$PATH; 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 libssl-dev unixodbc-dev libmysqlclient-dev g++-arm-linux-gnueabi g++-arm-linux-gnueabihf clang-3.5 libc++-dev ninja-build sloccount cppcheck; fi
|
|
|
|
services:
|
|
- mongodb
|
|
- redis-server
|
|
- postgresql
|
|
- mysql
|
|
|
|
addons:
|
|
postgresql: "9.4"
|
|
|
|
git:
|
|
submodules: false
|
|
|
|
notifications:
|
|
slack:
|
|
secure: "EKysuMlTU3Uv5XFX+zuwHK/ej4wtD8+UjO5xvchCFMkRgM0V3rERVT1rV6NocNBH4hjTcvue9DEKdWAtqdDh06vTOHGKdnZ/e204jA38HfcIA0SPVbQXzjckQXALvKl51OPOmGuI7Feo4wyohzUyGoDLo1bom02xqDfC3caQB5Q="
|
|
|
|
env:
|
|
global: TEST_NAME=""
|
|
|
|
before_script:
|
|
- echo ${TEST_NAME}
|
|
|
|
matrix:
|
|
include:
|
|
- env: TEST_NAME="android API level 19"
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- openjdk-8-jdk
|
|
before_install:
|
|
- export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
|
- wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
|
|
- unzip -qq sdk-tools-linux-4333796.zip -d /opt/android-sdk
|
|
- rm sdk-tools-linux-4333796.zip
|
|
- echo "y" | /opt/android-sdk/tools/bin/sdkmanager "platform-tools" "system-images;android-24;default;armeabi-v7a" "platforms;android-24" "emulator" "ndk-bundle" "cmake;3.10.2.4988404" > /dev/null
|
|
before_script:
|
|
- export TERM=dumb
|
|
- export _NO_CHECK_SIGNATURE=true
|
|
- export ANDROID_SDK_ROOT=/opt/android-sdk
|
|
- echo no | /opt/android-sdk/tools/bin/avdmanager create avd -n test -k "system-images;android-24;default;armeabi-v7a"
|
|
- /opt/android-sdk/emulator/emulator -avd test -no-audio -no-window -dns-server 8.8.8.8 &
|
|
#- android-wait-for-emulator || android-wait-for-emulator
|
|
- /opt/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.
|
|
- /opt/android-sdk/cmake/3.10.2.4988404/bin/cmake -H. -Bcmake-build -GNinja -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/opt/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-19 -DCMAKE_MAKE_PROGRAM=/opt/android-sdk/cmake/3.10.2.4988404/bin/ninja -DANDROID_STL="c++_static" -DANDROID_CPP_FEATURES="exceptions rtti" -DENABLE_APACHECONNECTOR=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_DATA_MYSQL=OFF -DENABLE_DATA_POSTGRESQL=OFF -DENABLE_TESTS=ON -DENABLE_LONG_RUNNING_TESTS=OFF -DOLD_REDIS_VERSION=ON &&
|
|
/opt/android-sdk/cmake/3.10.2.4988404/bin/cmake --build cmake-build --target all #&&
|
|
#cd cmake-build && travis_wait 30 /opt/android-sdk/cmake/3.10.2.4988404/bin/ctest -E Foundation --output-on-failure FIXME Android emulator hangs
|
|
|
|
- env: TEST_NAME="android API level 24 arm64-v8a"
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- openjdk-8-jdk
|
|
before_install:
|
|
- export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
|
- wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
|
|
- unzip -qq sdk-tools-linux-4333796.zip -d /opt/android-sdk
|
|
- rm sdk-tools-linux-4333796.zip
|
|
- echo "y" | /opt/android-sdk/tools/bin/sdkmanager "platform-tools" "system-images;android-24;default;arm64-v8a" "platforms;android-24" "emulator" "ndk-bundle" "cmake;3.10.2.4988404" > /dev/null
|
|
before_script:
|
|
- export TERM=dumb
|
|
- export _NO_CHECK_SIGNATURE=true
|
|
- export ANDROID_SDK_ROOT=/opt/android-sdk
|
|
- echo no | /opt/android-sdk/tools/bin/avdmanager create avd -n test -k "system-images;android-24;default;arm64-v8a"
|
|
- /opt/android-sdk/emulator/emulator -avd test -no-audio -no-window -dns-server 8.8.8.8 &
|
|
#- android-wait-for-emulator || android-wait-for-emulator
|
|
- /opt/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.
|
|
- /opt/android-sdk/cmake/3.10.2.4988404/bin/cmake -H. -Bcmake-build -GNinja -DANDROID_ABI=arm64-v8a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/opt/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-24 -DCMAKE_MAKE_PROGRAM=/opt/android-sdk/cmake/3.10.2.4988404/bin/ninja -DANDROID_STL="c++_static" -DANDROID_CPP_FEATURES="exceptions rtti" -DENABLE_APACHECONNECTOR=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_DATA_MYSQL=OFF -DENABLE_DATA_POSTGRESQL=OFF -DENABLE_TESTS=ON -DENABLE_LONG_RUNNING_TESTS=OFF -DOLD_REDIS_VERSION=ON &&
|
|
/opt/android-sdk/cmake/3.10.2.4988404/bin/cmake --build cmake-build --target all #&&
|
|
#cd cmake-build && travis_wait 30 /opt/android-sdk/cmake/3.10.2.4988404/bin/ctest -E Foundation --output-on-failure FIXME Android emulator hangs
|
|
|
|
- env: TEST_NAME="clang (make)"
|
|
compiler: clang
|
|
script:
|
|
- ./configure --everything --omit=PDF --config=Linux-clang && make all -s -j2 && sudo make install
|
|
- sudo -s ./travis/runtests.sh
|
|
|
|
# - env: TEST_NAME="arm-linux-gnueabi- (make)"
|
|
# script:
|
|
# - ./configure --omit=PDF,Data/ODBC,Data/MySQL,Crypto,NetSSL,PageCompiler && make all -s -j2 CROSS_COMPILE=arm-linux-gnueabi- POCO_TARGET_OSARCH=armv7l
|
|
|
|
- env: TEST_NAME="gcc-5.4.0 (CMake)"
|
|
compiler: gcc
|
|
script:
|
|
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
|
|
|
- env: TEST_NAME="clang (CMake)"
|
|
compiler: clang
|
|
script:
|
|
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
|
|
|
- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
|
|
script:
|
|
- export CC="arm-linux-gnueabi-gcc"
|
|
- export CXX="arm-linux-gnueabi-g++"
|
|
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
|
|
|
- env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)"
|
|
script:
|
|
- export CC="arm-linux-gnueabihf-gcc"
|
|
- export CXX="arm-linux-gnueabihf-g++"
|
|
- cmake -H. -Bcmake-build -GNinja -DENABLE_PDF=OFF -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_JWT=OFF -DENABLE_TESTS=ON && cmake --build cmake-build --target all
|
|
|
|
# TODO osx build
|
|
# TODO run test suite
|
|
# script:
|
|
# - ./configure && make all -s -j2
|
|
# - sudo ifconfig -a
|
|
# - sudo ifconfig venet0 multicast
|
|
# - sudo ifconfig -a
|
|
# - export POCO_BASE=`pwd`
|
|
# - sudo -E build/script/runtests.sh
|
|
|
|
# build documentation and release
|
|
- env: TEST_NAME="documentation & release"
|
|
compiler: clang
|
|
script:
|
|
- . env.sh && mkdoc all && mkrel all
|
|
- ls -l releases
|
|
|
|
# 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 .
|
|
|
|
# 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 .
|