59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
os:
|
|
- linux
|
|
- osx
|
|
|
|
# If linux, use precise
|
|
dist: trusty
|
|
sudo: false
|
|
|
|
language:
|
|
- cpp
|
|
|
|
env:
|
|
- BUILD_TYPE=Debug
|
|
- BUILD_TYPE=Release
|
|
|
|
compiler:
|
|
- clang
|
|
|
|
addons:
|
|
# Everything under apt is only used on linux
|
|
apt:
|
|
sources:
|
|
# PPAs to get newer toolchains
|
|
- llvm-toolchain-trusty-5.0
|
|
- ubuntu-toolchain-r-test
|
|
packages:
|
|
# Get recent compilers
|
|
- clang-5.0
|
|
# Pull a recent version of libstdc++
|
|
- libstdc++-6-dev
|
|
# Ninja builds are faster
|
|
- ninja-build
|
|
# Required for the code generator, unfortunately this is jinja2 2.6 which lacks some of the options we use
|
|
- python-jinja2
|
|
# Required dependency for GLFW on Linux
|
|
- xorg-dev
|
|
|
|
before_install:
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
|
|
|
|
install:
|
|
# Install dependencies required on OSX
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ninja; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then pip install jinja2; fi
|
|
|
|
script:
|
|
# Use the more recent compilers we just installed
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "clang++" ]; then export CXX="clang++-5.0" CC="clang-5.0"; fi
|
|
|
|
# Build
|
|
- mkdir -p build
|
|
- cd build
|
|
- cmake --version
|
|
- cmake -G "Ninja" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DNXT_USE_WERROR=1 ..
|
|
- cmake --build .
|
|
|
|
# Test
|
|
- ./src/tests/nxt_unittests
|