Use Travis-CI Matrix to add more type of builds (#366)
This commit is contained in:
parent
7ccb72b383
commit
14b2631527
86
.travis.yml
86
.travis.yml
@ -1,36 +1,72 @@
|
|||||||
sudo: false
|
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- coverity_scan
|
||||||
|
- /recast-.*$/
|
||||||
|
|
||||||
# Build with gcc and clang.
|
sudo: false
|
||||||
compiler:
|
|
||||||
- gcc
|
|
||||||
- clang
|
|
||||||
|
|
||||||
# Build both debug and release configurations, through use of an environment variable in the build matrix.
|
|
||||||
env:
|
|
||||||
- BUILD_TYPE=debug CMAKE_BUILD_TYPE=Debug
|
|
||||||
- BUILD_TYPE=release CMAKE_BUILD_TYPE=Release
|
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
sources:
|
||||||
- libsdl2-dev
|
- ubuntu-toolchain-r-test
|
||||||
|
- llvm-toolchain-xenial-7
|
||||||
|
packages: [ cmake, clang-7, clang-tools-7, gcc-8, g++-8, libsdl2-dev ]
|
||||||
|
|
||||||
install:
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: Recastnavigation (all) on MacOS xcode9.4
|
||||||
|
os: osx
|
||||||
|
osx_image: xcode9.4
|
||||||
|
before_install:
|
||||||
|
- brew update
|
||||||
|
- brew install sdl2
|
||||||
|
if: branch != coverity_scan
|
||||||
|
- name: Recastnavigation on Ubuntu Xenial GCC-5
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
|
sudo: required
|
||||||
|
if: branch != coverity_scan
|
||||||
|
- name: Recastnavigation on Ubuntu Xenial GCC-8
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
|
sudo: required
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||||
|
if: branch != coverity_scan
|
||||||
|
- name: Recastnavigation on Ubuntu Xenial GCC-5 using Premake5
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
|
sudo: required
|
||||||
|
if: branch != coverity_scan
|
||||||
|
before_install:
|
||||||
- wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz -O premake.tar.gz
|
- wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz -O premake.tar.gz
|
||||||
- tar -xf premake.tar.gz
|
- tar -xf premake.tar.gz
|
||||||
- rm premake.tar.gz
|
env:
|
||||||
|
- PREMAKE=1
|
||||||
|
- name: Recastnavigation on Ubuntu Xenial Clang-7 with Static Analysis
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
|
sudo: required
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CC=clang-7 && CXX=clang++-7"
|
||||||
|
- ANALYZE="scan-build-7 --force-analyze-debug-code --use-cc clang-7 --use-c++ clang++-7"
|
||||||
|
if: branch != coverity_scan
|
||||||
|
compiler: clang
|
||||||
|
- name: Recastnavigation Coverity Scan
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
|
sudo: required
|
||||||
|
if: branch = coverity_scan
|
||||||
|
|
||||||
# Run premake to generate makefiles.
|
|
||||||
# Have to cd into directory and back out since premake5 doesn't appear to accept a directory argument.
|
|
||||||
before_script:
|
before_script:
|
||||||
- cd RecastDemo && ../premake5 gmake && cd ..
|
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then eval "${MATRIX_EVAL}"; fi
|
||||||
- mkdir build && cd build && cmake -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} .. && cd ..
|
- if [ "${PREMAKE}" = "1" ]; then cd RecastDemo && ../premake5 gmake && cd ..; fi
|
||||||
|
- if [ "${PREMAKE}" != "1" ]; then mkdir -p build && cd build && ${ANALYZE} cmake ../ && cd ..; fi
|
||||||
|
|
||||||
# Run make in the directory containing generated makefiles, on the configuration specified by the environment variable.
|
script: # 2 CPUs on Travis-CI + 1 extra for IO bound process
|
||||||
script:
|
- if [ "${PREMAKE}" = "1" ]; then make -C RecastDemo/Build/gmake -j3; fi
|
||||||
- make -C RecastDemo/Build/gmake -j$(nproc) config=${BUILD_TYPE}
|
- if [ "${PREMAKE}" != "1" ]; then make -C build -j3; fi
|
||||||
- RecastDemo/Bin/Tests
|
- if [ "${PREMAKE}" = "1" ]; then RecastDemo/Bin/Tests; fi
|
||||||
- make -C build -j$(nproc)
|
- if [ "${PREMAKE}" != "1" ]; then cd build && ctest; fi
|
||||||
- cd build && ctest
|
|
||||||
|
@ -38,7 +38,9 @@ endif()
|
|||||||
add_dependencies(RecastDemo DebugUtils Detour DetourCrowd DetourTileCache Recast)
|
add_dependencies(RecastDemo DebugUtils Detour DetourCrowd DetourTileCache Recast)
|
||||||
target_link_libraries(RecastDemo ${OPENGL_LIBRARIES} SDL2::SDL2main DebugUtils Detour DetourCrowd DetourTileCache Recast)
|
target_link_libraries(RecastDemo ${OPENGL_LIBRARIES} SDL2::SDL2main DebugUtils Detour DetourCrowd DetourTileCache Recast)
|
||||||
|
|
||||||
install(TARGETS RecastDemo RUNTIME DESTINATION bin)
|
install(TARGETS RecastDemo
|
||||||
|
RUNTIME DESTINATION bin
|
||||||
|
BUNDLE DESTINATION bin)
|
||||||
install(DIRECTORY Bin/Meshes DESTINATION bin)
|
install(DIRECTORY Bin/Meshes DESTINATION bin)
|
||||||
install(DIRECTORY Bin/TestCases DESTINATION bin)
|
install(DIRECTORY Bin/TestCases DESTINATION bin)
|
||||||
install(FILES Bin/DroidSans.ttf DESTINATION bin)
|
install(FILES Bin/DroidSans.ttf DESTINATION bin)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user