Jakob Botsch Nielsen c2d7463a38 Add Clang to Travis and treat warnings as errors
The GCC version used by Travis is old and appears not to support all the
warnings we would like to get, so reenable Clang. Additionally make lots
of cleanups to Travis config and make the build a lot faster too.

Also change both Travis and AppVeyor builds to treat warnings as errors,
and include VS2017 in the matrix for AppVeyor. I have also removed
VS2010 because it is ancient at this point.

Updated Premake to alpha12 and fixed the premake build file
appropriately.
2018-06-16 17:04:54 +02:00

37 lines
1.1 KiB
YAML

sudo: false
language: cpp
# Build with gcc and clang.
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:
apt:
packages:
- libsdl2-dev
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
- tar -xf premake.tar.gz
- rm premake.tar.gz
# 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:
- cd RecastDemo && ../premake5 gmake && cd ..
- mkdir build && cd build && cmake -DRECASTNAVIGATION_STATIC=TRUE -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} .. && cd ..
# Run make in the directory containing generated makefiles, on the configuration specified by the environment variable.
script:
- make -C RecastDemo/Build/gmake -j$(nproc) config=${BUILD_TYPE}
- RecastDemo/Bin/Tests
- make -C build -j$(nproc)
- cd build && ctest