1+ # TRAVIS Configuration file
2+ #
3+ # XXX MIND SYNTAX TRICKS:
4+ # - Keep column consistency
5+ # - TAB characters NOT ALLOWED anywhere
6+ # - COLON characters (in freestanding strings) not allowed in the script
7+
18language : cpp
29dist : xenial
310
@@ -16,27 +23,27 @@ addons:
1623 packages :
1724 - openssl
1825
19- matrix :
26+ jobs :
2027 include :
2128 - os : linux
2229 env :
2330 - BUILD_TYPE=Debug CFG="monotonic openssl werror"
24- - BUILD_OPTS ='-DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
31+ - CMAKE_OPTS ='-DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
2532 - env :
2633 - BUILD_TYPE=Debug CFG="nologging mbedtls monotonic werror"
27- - BUILD_OPTS ='-DENABLE_LOGGING=OFF -DUSE_ENCLIB=mbedtls -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
34+ - CMAKE_OPTS ='-DENABLE_LOGGING=OFF -DUSE_ENCLIB=mbedtls -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
2835 - os : linux
2936 env : BUILD_TYPE=Release CFG=default
30- - os : osx
31- osx_image : xcode11.1
32- env :
33- - BUILD_TYPE=Debug CFG=werror
34- - BUILD_OPTS ='-DCMAKE_CXX_FLAGS="-Werror"'
35- - os : osx
36- osx_image : xcode11.1
37- env :
38- - BUILD_TYPE=Release CFG=werror
39- - BUILD_OPTS ='-DCMAKE_CXX_FLAGS="-Werror"'
37+ # - os: osx
38+ # osx_image: xcode11.1
39+ # env:
40+ # - BUILD_TYPE=Debug CFG=werror
41+ # - CMAKE_OPTS ='-DCMAKE_CXX_FLAGS="-Werror"'
42+ # - os: osx
43+ # osx_image: xcode11.1
44+ # env:
45+ # - BUILD_TYPE=Release CFG=werror
46+ # - CMAKE_OPTS ='-DCMAKE_CXX_FLAGS="-Werror"'
4047 - os : linux
4148 compiler : x86_64-w64-mingw32-g++
4249 addons :
@@ -53,39 +60,70 @@ matrix:
5360 - ./Configure --cross-compile-prefix=x86_64-w64-mingw32- mingw64
5461 - make
5562 - cd ..
56- env : BUILD_TYPE=Release CFG=default
63+ env : BUILD_TYPE=Release CFG=no-UT
5764
5865 # Power jobs
66+ # Forcing Focal distro because Xenial
67+ # has somehow outdated CMake
5968 - os : linux
6069 arch : ppc64le
70+ dist : focal
6171 env :
62- - BUILD_TYPE=Debug
72+ - ARCH=PowerPC BUILD_TYPE=Debug
6373 - arch : ppc64le
74+ dist : focal
6475 env :
65- - BUILD_TYPE=Release CFG=monotonic
66- - BUILD_OPTS ='-DENABLE_MONOTONIC_CLOCK=ON'
76+ - ARCH=PowerPC BUILD_TYPE=Release CFG=monotonic
77+ - CMAKE_OPTS ='-DENABLE_MONOTONIC_CLOCK=ON'
6778script :
79+ - CMAKE_VERSION=$(cmake --version | head -1 | awk '{print $3}')
80+ - echo CMAKE version $CMAKE_VERSION
81+ - CMAKE_VERSION_OK=$(echo "puts [package vcompare $CMAKE_VERSION 3.10]" | tclsh);
82+ - if [ "$CMAKE_VERSION_OK" == "-1" ]; then
83+ echo "ERROR - cmake version too old, >=3.10 required";
84+ exit 1;
85+ fi;
86+ - export REQUIRE_UNITTESTS=1
87+ - if [ "$TRAVIS_COMPILER" == "x86_64-w64-mingw32-g++" ]; then
88+ CMAKE_OPTS+=" -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc";
89+ CMAKE_OPTS+=" -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++";
90+ CMAKE_OPTS+=" -DENABLE_STDCXX_SYNC=OFF -DENABLE_LOCALIF_WIN32=OFF -DENABLE_UNITTESTS=OFF -DUSE_OPENSSL_PC=OFF";
91+ CMAKE_OPTS+=" -DOPENSSL_ROOT_DIR=$PWD/openssl";
92+ CMAKE_OPTS+=" -DOPENSSL_CRYPTO_LIBRARY=$PWD/openssl/libcrypto-1_1-x64.dll";
93+ CMAKE_OPTS+=" -DCMAKE_SYSTEM_NAME=Windows";
94+ REQUIRE_UNITTESTS=0;
95+ fi;
96+ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
97+ export PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig";
98+ fi;
99+ if (( $REQUIRE_UNITTESTS )); then
100+ CMAKE_OPTS+=" -DENABLE_UNITTESTS=ON";
101+ fi;
68102 - echo COMPILER $TRAVIS_COMPILER
69103 - echo SYSTEM $TRAVIS_OS_NAME
70104 - echo BUILD_TYPE $BUILD_TYPE
71- - echo BUILD_OPTS $BUILD_OPTS
72- - cmake --version | head -1
73- - if [ "$TRAVIS_COMPILER" == "x86_64-w64-mingw32-g++" ]; then
74- export CC="x86_64-w64-mingw32-gcc";
75- export CXX="x86_64-w64-mingw32-g++";
76- CMAKE_OPTS="-DENABLE_UNITTESTS=OFF -DUSE_OPENSSL_PC=OFF -DOPENSSL_ROOT_DIR=\"$PWD/openssl\" -DCMAKE_SYSTEM_NAME=Windows"
77- elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
78- CMAKE_OPTS="-DENABLE_UNITTESTS=ON"
79- elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
80- export PKG_CONFIG_PATH=$(brew --prefix openssl)"/lib/pkgconfig";
81- CMAKE_OPTS="-DENABLE_UNITTESTS=ON"
82- fi
83- - cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS $CMAKE_OPTS; then echo "Configure OK"; else cat CMakeFiles/CMakeError.log; fi;
84- - make -j$(nproc);
85- - if [ "$TRAVIS_COMPILER" != "x86_64-w64-mingw32-g++" ]; then
105+ - echo CMAKE_OPTS $CMAKE_OPTS
106+ - export SUCCESS=0
107+ - cmake . --debug-output -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_OPTS 2>&1 || SUCCESS=$?;
108+ - if (($SUCCESS == 0)); then
109+ echo "Configure OK";
110+ else
111+ echo "-- OUTPUT --";
112+ cat CMakeFiles/CMakeOutput.log || echo "NO OUTPUT";
113+ echo "-- ERRORS --";
114+ cat CMakeFiles/CMakeError.log || echo "NO LOGS";
115+ exit 1;
116+ fi;
117+ - make VERBOSE=1 -j$(nproc);
118+ - if (( $REQUIRE_UNITTESTS )); then
86119 ulimit -c unlimited;
87- ./test-srt -disable-ipv6;
88- SUCCESS=$?;
89- if [ -f core ]; then gdb -batch ./test-srt -c core -ex bt -ex "info thread" -ex quit; else echo "NO CORE - NO CRY!"; fi;
90- test $SUCCESS == 0;
91- fi
120+ if [ ! -f ./test-srt ]; then
121+ echo "ERROR - UT application not found";
122+ false;
123+ else
124+ ./test-srt -disable-ipv6;
125+ SUCCESS=$?;
126+ if [ -f core ]; then gdb -batch ./test-srt -c core -ex bt -ex "info thread" -ex quit; else echo "NO CORE - NO CRY!"; fi;
127+ test $SUCCESS == 0;
128+ fi;
129+ fi;
0 commit comments