diff --git a/.travis.yml b/.travis.yml index a833f721a..ec76dcd1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,3 @@ -os: - - linux -# - osx -osx_image: xcode8.3 language: cpp sudo: required dist: trusty @@ -10,6 +6,7 @@ branches: - master - coverity_scan - /openmw-.*$/ + - /^[0-9]+\.[0-9]+\.[0-9]+.*$/ env: global: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created @@ -20,22 +17,25 @@ addons: apt: sources: - sourceline: 'ppa:openmw/openmw' + - sourceline: 'ppa:rakhimov/boost' - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.6 + - llvm-toolchain-precise-3.8 packages: [ # Dev - cmake, clang-3.6, libunshield-dev, libtinyxml-dev, + cmake, clang-3.8, libunshield-dev, libtinyxml-dev, g++-6, # Tests libgtest-dev, google-mock, # Boost - libboost-filesystem-dev, libboost-program-options-dev, libboost-system-dev, + libboost-filesystem1.61-dev, libboost-program-options1.61-dev, libboost-system1.61-dev, # FFmpeg libavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev, # Audio & Video libsdl2-dev, qtbase5-dev, libopenal-dev, # The other ones from OpenMW ppa - libbullet-dev, libswresample-dev, libopenscenegraph-3.4-dev, libmygui-dev + libbullet-dev, libswresample-dev, libopenscenegraph-3.4-dev, libmygui-dev, + # tes3mp stuff + libboost1.61-dev, libqt5opengl5-dev ] coverity_scan: @@ -50,12 +50,23 @@ matrix: include: - os: linux env: - ANALYZE="scan-build-3.6 --use-cc clang-3.6 --use-c++ clang++-3.6 " + - ANALYZE="scan-build-3.8 --use-cc clang-3.8 --use-c++ clang++-3.8 " + - MATRIX_CC="CC=clang-3.8 && CXX=clang++-3.8" compiler: clang + - os: linux + env: + - MATRIX_CC="CC=gcc-6 && CXX=g++-6" + - os: linux + env: + - MATRIX_CC="CC=clang-3.8 && CXX=clang++-3.8" allow_failures: - - env: ANALYZE="scan-build-3.6 --use-cc clang-3.6 --use-c++ clang++-3.6 " + - env: + - MATRIX_CC="CC=clang-3.8 && CXX=clang++-3.8" + - env: + - ANALYZE="scan-build-3.8 --use-cc clang-3.8 --use-c++ clang++-3.8 " + - MATRIX_CC="CC=clang-3.8 && CXX=clang++-3.8" -before_install: +before_install: - ./CI/before_install.${TRAVIS_OS_NAME}.sh before_script: ./CI/before_script.${TRAVIS_OS_NAME}.sh script: diff --git a/CI/before_install.linux.sh b/CI/before_install.linux.sh index f4b448900..e2313b443 100755 --- a/CI/before_install.linux.sh +++ b/CI/before_install.linux.sh @@ -1,7 +1,10 @@ #!/bin/sh echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- -sudo ln -s /usr/bin/clang-3.6 /usr/local/bin/clang -sudo ln -s /usr/bin/clang++-3.6 /usr/local/bin/clang++ + +# Set up compilers +if [ ! -z "${MATRIX_CC}" ]; then + eval "${MATRIX_CC}" +fi # build libgtest & libgtest_main sudo mkdir /usr/src/gtest/build @@ -15,10 +18,16 @@ cd ~/ git clone https://github.com/TES3MP/RakNet cd RakNet cmake . -DRAKNET_ENABLE_DLL=OFF -DRAKNET_ENABLE_SAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -mkdir ./lib -make -j3 install -cp ./Lib/RakNetLibStatic/libRakNetLibStatic.a ./lib -cd .. +make -j3 + +cd ~/ +git clone https://github.com/Koncord/CallFF +cd CallFF +mkdir build +cd build +cmake ../ +make -j3 +cd ~/ wget https://github.com/zdevito/terra/releases/download/release-2016-03-25/terra-Linux-x86_64-332a506.zip unzip terra-Linux-x86_64-332a506.zip diff --git a/CI/before_script.linux.sh b/CI/before_script.linux.sh index efdf28c6c..f1ba38415 100755 --- a/CI/before_script.linux.sh +++ b/CI/before_script.linux.sh @@ -3,15 +3,40 @@ free -m mkdir build cd build -export CODE_COVERAGE=1 + +# Set up compilers +if [ ! -z "${MATRIX_CC}" ]; then + eval "${MATRIX_CC}" +fi + export RAKNET_ROOT=~/RakNet export Terra_ROOT=~/terra-Linux-x86_64-332a506 -export BUILD_SERVER=OFF -if [ "${CC}" = "clang" ]; then export CODE_COVERAGE=0; -else - export COMPILER_NAME=gcc - export CXX=g++-6 - export CC=gcc-6 - export BUILD_SERVER=ON + +export CODE_COVERAGE=0 +if [ ! -z "${ANALYZE}" ]; then + CODE_COVERAGE=1 fi -${ANALYZE}cmake .. -DBUILD_OPENMW_MP=${BUILD_SERVER} -DBUILD_WITH_CODE_COVERAGE=${CODE_COVERAGE} -DBUILD_BSATOOL=OFF -DBUILD_ESMTOOL=OFF -DBUILD_ESSIMPORTER=OFF -DBUILD_LAUNCHER=OFF -DBUILD_MWINIIMPORTER=OFF -DBUILD_MYGUI_PLUGIN=OFF -DBUILD_OPENCS=OFF -DBUILD_WIZARD=OFF -DBUILD_BROWSER=OFF -DBUILD_UNITTESTS=1 -DCMAKE_INSTALL_PREFIX=/usr -DBINDIR=/usr/games -DCMAKE_BUILD_TYPE="None" -DUSE_SYSTEM_TINYXML=TRUE -DRakNet_LIBRARY_RELEASE=~/RakNet/lib/libRakNetLibStatic.a -DRakNet_LIBRARY_DEBUG=~/RakNet/lib/libRakNetLibStatic.a + +${ANALYZE}cmake .. \ + -DDESIRED_QT_VERSION=5 \ + -DBUILD_OPENMW_MP=ON \ + -DBUILD_BROWSER=ON \ + -DBUILD_MASTER=ON \ + -DBUILD_WITH_CODE_COVERAGE=${CODE_COVERAGE} \ + -DBUILD_BSATOOL=OFF \ + -DBUILD_ESMTOOL=OFF \ + -DBUILD_ESSIMPORTER=OFF \ + -DBUILD_LAUNCHER=OFF \ + -DBUILD_MWINIIMPORTER=OFF \ + -DBUILD_MYGUI_PLUGIN=OFF \ + -DBUILD_OPENCS=OFF \ + -DBUILD_WIZARD=OFF \ + -DBUILD_UNITTESTS=1 \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBINDIR=/usr/games \ + -DCMAKE_BUILD_TYPE="None" \ + -DUSE_SYSTEM_TINYXML=TRUE \ + -DRakNet_LIBRARY_RELEASE=~/RakNet/lib/libRakNetLibStatic.a \ + -DRakNet_LIBRARY_DEBUG=~/RakNet/lib/libRakNetLibStatic.a \ + -DCallFF_INCLUDES=~/CallFF/include \ + -DCallFF_LIBRARY=~/CallFF/build/src/libcallff.a diff --git a/CMakeLists.txt b/CMakeLists.txt index 72392e77a..9ce0d41bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -361,9 +361,9 @@ if (NOT WIN32 AND NOT APPLE) endif() # CXX Compiler settings -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 14) if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++11 -pedantic -Wno-long-long") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -pedantic -Wno-long-long") add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON ) if (APPLE) @@ -507,7 +507,7 @@ if(WIN32) INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Debug/resources" DESTINATION "." CONFIGURATIONS Debug) INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/Release/resources" DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel) - + FILE(GLOB plugin_dir_debug "${OpenMW_BINARY_DIR}/Debug/osgPlugins-*") FILE(GLOB plugin_dir_release "${OpenMW_BINARY_DIR}/Release/osgPlugins-*") INSTALL(DIRECTORY ${plugin_dir_debug} DESTINATION "." CONFIGURATIONS Debug) @@ -893,4 +893,3 @@ if (DOXYGEN_FOUND) WORKING_DIRECTORY ${OpenMW_BINARY_DIR} COMMENT "Generating documentation for the github-pages at ${DOXYGEN_PAGES_OUTPUT_DIR}" VERBATIM) endif () -