1 ##############################################################################
2 # Travis version specific build environment specification
3 ##############################################################################
5 # The "precise" build environment on Travis is in the process of being decommissioned
6 # see https://blog.travis-ci.com/2017-08-31-trusty-as-default-status
7 # The "precise=true"+"sudo=required" environment seems to lack IPv6 support.
8 # According to some tests, all "sudo=required" environments do not support IPv6, see
9 # https://github.com/travis-ci/travis-ci/issues/8361#issuecomment-328263113
10 # The container environments for "sudo=false" support IPv6 localhost [::1]
11 # connections for server/client test. Thus, all tests with ENABLE_IPV6=YES
15 ##############################################################################
16 # Project specific settings
17 ##############################################################################
38 - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
40 export PATH="$HOME/usr/bin:$PATH";
41 wget https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.sh --no-check-certificate;
42 chmod +x cmake-3.7.2-Linux-x86_64.sh;
43 ./cmake-3.7.2-Linux-x86_64.sh --prefix=$HOME/usr --exclude-subdir --skip-license;
49 - if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
50 PATH=~/.local/bin:${PATH};
51 pip install --user --upgrade pip;
52 pip install --user cpp-coveralls;
56 # Check some settings of the build server (operating system, IPv6 availability, directory)
61 - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
62 apt-cache search gcc | grep "GNU C compiler";
63 apt-cache search clang | grep compiler;
65 - if [[ "${BUILD_TYPE}" == "OSX_OPENSSL_1_1" ]]; then brew install openssl@1.1 ;fi
66 # Generate the build scripts with CMake
68 - gcc test/cgi_test.c -o output/cgi_test.cgi
73 -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
74 -DBUILD_SHARED_LIBS=${BUILD_SHARED}
75 "-DCIVETWEB_THIRD_PARTY_DIR=${HOME}/third-party"
76 -DCIVETWEB_ENABLE_THIRD_PARTY_OUTPUT=YES
77 -DCIVETWEB_ENABLE_SSL=${ENABLE_SSL}
78 -DCIVETWEB_DISABLE_CGI=${NO_CGI}
79 -DCIVETWEB_SERVE_NO_FILES=${NO_FILES}
80 -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=${ENABLE_SSL_DYNAMIC_LOADING}
81 -DCIVETWEB_SSL_OPENSSL_API_1_1=${OPENSSL_1_1}
82 -DCIVETWEB_ENABLE_WEBSOCKETS=${ENABLE_WEBSOCKETS}
83 -DCIVETWEB_ENABLE_CXX=${ENABLE_CXX}
84 -DCIVETWEB_ENABLE_IPV6=${ENABLE_IPV6}
85 -DCIVETWEB_ENABLE_SERVER_STATS=${ENABLE_SERVER_STATS}
86 -DCIVETWEB_ENABLE_LUA=${ENABLE_LUA}
87 -DCIVETWEB_ENABLE_LUA_SHARED=${ENABLE_LUA_SHARED}
88 -DCIVETWEB_ENABLE_DUKTAPE=${ENABLE_DUKTAPE}
89 -DCIVETWEB_DISABLE_CACHING=${NO_CACHING}
90 -DCIVETWEB_C_STANDARD=${C_STANDARD}
91 -DCIVETWEB_CXX_STANDARD=${CXX_STANDARD}
92 -DCIVETWEB_ALLOW_WARNINGS=${ALLOW_WARNINGS}
93 ${ADDITIONAL_CMAKE_ARGS}
98 - if [ "${MACOSX_PACKAGE}" == "1" ]; then
99 cd "${TRAVIS_BUILD_DIR}";
100 make -f Makefile.osx package;
102 CTEST_OUTPUT_ON_FAILURE=1 make all test;
105 # Coveralls options: https://github.com/eddyxu/cpp-coveralls/blob/master/README.md
107 - if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
108 coveralls --include src --exclude src/main.c --exclude src/third_party --include include --gcov-options '\-lp' --root .. --build-root .;
109 bash <(curl -s https://codecov.io/bash);
113 ##############################################################################
114 # build matrix (auto generated)
115 ##############################################################################
129 - ubuntu-toolchain-r-test
130 - llvm-toolchain-precise-3.8
135 N=Clang3.8-Linux-Minimal-Debug
136 MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
138 ENABLE_SSL_DYNAMIC_LOADING=YES
151 ENABLE_SERVER_STATS=NO
164 - ubuntu-toolchain-r-test
165 - llvm-toolchain-precise-3.8
170 N=Clang3.8-Linux-Default-Release
171 MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
173 ENABLE_SSL_DYNAMIC_LOADING=YES
186 ENABLE_SERVER_STATS=NO
200 - ubuntu-toolchain-r-test
201 - llvm-toolchain-precise-3.8
206 N=Clang3.8-Linux-Default-Release
207 MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
209 ENABLE_SSL_DYNAMIC_LOADING=YES
222 ENABLE_SERVER_STATS=NO
235 - ubuntu-toolchain-r-test
236 - llvm-toolchain-precise-3.8
241 N=Clang3.8-Linux-Complete-NoLua-Release
242 MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
244 ENABLE_SSL_DYNAMIC_LOADING=YES
256 ENABLE_WEBSOCKETS=YES
257 ENABLE_SERVER_STATS=YES
271 - ubuntu-toolchain-r-test
276 N=GCC5-Linux-Complete-NoLua-Release
277 MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
279 ENABLE_SSL_DYNAMIC_LOADING=YES
291 ENABLE_WEBSOCKETS=YES
292 ENABLE_SERVER_STATS=YES
302 N=GCCAnyVersion-Linux-Coverage
304 ENABLE_SSL_DYNAMIC_LOADING=YES
316 ENABLE_WEBSOCKETS=YES
317 ENABLE_SERVER_STATS=YES
327 N=Clang-OSX-Complete-NoLua-Release
329 ENABLE_SSL_DYNAMIC_LOADING=YES
341 ENABLE_WEBSOCKETS=YES
342 ENABLE_SERVER_STATS=YES
353 N=Clang-OSX-Complete-NoLua-Release-OpenSSL_1_1_NoDynLoad
354 BUILD_TYPE=OSX_OPENSSL_1_1
355 ENABLE_SSL_DYNAMIC_LOADING=NO
367 ENABLE_WEBSOCKETS=YES
368 ENABLE_SERVER_STATS=YES
373 OPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1"
374 LDFLAGS="-L${OPENSSL_ROOT_DIR}/lib"
375 CFLAGS="-I${OPENSSL_ROOT_DIR}/include"
376 ADDITIONAL_CMAKE_ARGS="-DCMAKE_SHARED_LINKER_FLAGS=${LDFLAGS} -DCMAKE_C_FLAGS=${CFLAGS}"
377 PATH="${OPENSSL_ROOT_DIR}/bin:$PATH"
378 DYLD_LIBRARY_PATH="${OPENSSL_ROOT_DIR}/lib:${DYLD_LIBRARY_PATH}"
387 - ubuntu-toolchain-r-test
388 - llvm-toolchain-trusty-5.0
393 N=Clang50-Linux-Default-Shared
395 ENABLE_SSL_DYNAMIC_LOADING=YES
408 ENABLE_SERVER_STATS=NO
413 MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
422 N=Precise-Clang-Linux-Default
424 ENABLE_SSL_DYNAMIC_LOADING=YES
437 ENABLE_SERVER_STATS=NO
450 ENABLE_SSL_DYNAMIC_LOADING=YES
462 ENABLE_WEBSOCKETS=YES
463 ENABLE_SERVER_STATS=NO
477 - ubuntu-toolchain-r-test
478 - llvm-toolchain-trusty-3.8
483 N=Clang-Linux-32bit-Complete-NoLua-Release
486 ENABLE_SSL_DYNAMIC_LOADING=YES
498 ENABLE_WEBSOCKETS=YES
499 ENABLE_SERVER_STATS=YES
504 MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
507 ### Test all build types:
508 # According to CMakeLists, options are:
509 # None Debug Release RelWithDebInfo MinSizeRel Coverage
516 N=NoSslDynamicLoading
518 ENABLE_SSL_DYNAMIC_LOADING=NO
530 ENABLE_WEBSOCKETS=YES
535 MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
542 N=GCCLinuxDefault_Debug
544 ENABLE_SSL_DYNAMIC_LOADING=YES
567 N=GCCLinuxDefault_RelWithDebInfo
568 BUILD_TYPE=RelWithDebInfo
569 ENABLE_SSL_DYNAMIC_LOADING=YES
592 N=GCCLinuxDefault_MinSizeRel
593 BUILD_TYPE=MinSizeRel
594 ENABLE_SSL_DYNAMIC_LOADING=YES
617 N=GCCLinuxDefault_None
619 ENABLE_SSL_DYNAMIC_LOADING=YES
638 #### Now all define combinations, but only for Linux clang
639 ##### Generated with Lua:
645 # bits[#bits+1] = (math.mod(i, 2) == 1)
656 # elseif t=="NO" then
659 # assert("ERROR in INV!")
663 # if (YN(i, 6)=="NO") and (YN(i, 7)=="NO") then
665 # print(" os: linux")
666 # print(" compiler: clang")
668 # print(" N=C" .. tostring(i) .. "_")
669 # print(" BUILD_TYPE=Release")
670 # print(" ENABLE_SSL_DYNAMIC_LOADING=YES")
671 # print(" OPENSSL_1_1=NO")
672 # print(" ENABLE_CXX=NO")
673 # print(" C_STANDARD=auto")
674 # print(" CXX_STANDARD=auto")
675 # print(" ENABLE_LUA_SHARED=NO")
676 # print(" FEATURES=" .. tostring(i))
677 # print(" BUILD_SHARED=NO")
678 # print(" NO_FILES=" .. INV(YN(i, 1)))
679 # print(" ENABLE_SSL=" .. YN(i, 2))
680 # print(" NO_CGI=" .. INV(YN(i, 3)))
681 # print(" ENABLE_IPV6=" .. YN(i, 4))
682 # print(" ENABLE_WEBSOCKETS=" .. YN(i, 5))
683 # print(" ENABLE_LUA=" .. YN(i, 6))
684 # print(" ENABLE_DUKTAPE=" .. YN(i, 7))
685 # print(" NO_CACHING=" .. INV(YN(i, 8)))
686 # print(" ENABLE_SERVER_STATS=" .. YN(i, 9))
692 # TODO: Regenerate this matrix, once a stable Travis build is re-established