2017-05-30 22:15:39 +00:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
|
2017-08-14 20:32:05 +00:00
|
|
|
# If linux, use precise
|
2017-11-27 23:25:11 +00:00
|
|
|
dist: trusty
|
|
|
|
sudo: false
|
2017-08-14 20:32:05 +00:00
|
|
|
|
2017-05-30 22:15:39 +00:00
|
|
|
language:
|
|
|
|
- cpp
|
|
|
|
|
2018-04-03 20:54:11 +00:00
|
|
|
python:
|
|
|
|
- "2.7"
|
|
|
|
|
2017-05-30 22:15:39 +00:00
|
|
|
env:
|
|
|
|
- BUILD_TYPE=Debug
|
|
|
|
- BUILD_TYPE=Release
|
|
|
|
|
|
|
|
compiler:
|
|
|
|
- clang
|
|
|
|
|
2018-04-03 20:54:11 +00:00
|
|
|
cache:
|
|
|
|
- pip
|
|
|
|
|
2017-05-30 22:15:39 +00:00
|
|
|
addons:
|
|
|
|
# Everything under apt is only used on linux
|
|
|
|
apt:
|
|
|
|
sources:
|
2017-11-27 22:04:35 +00:00
|
|
|
# PPA for clang 5.0
|
2017-11-27 23:25:11 +00:00
|
|
|
- llvm-toolchain-trusty-5.0
|
2018-01-29 16:25:51 +00:00
|
|
|
# PPA for clang-format 7
|
2017-11-27 22:04:35 +00:00
|
|
|
- llvm-toolchain-trusty
|
|
|
|
# PPA for a more recen libstdc++
|
2017-05-30 22:15:39 +00:00
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
# Get recent compilers
|
|
|
|
- clang-5.0
|
2017-11-27 23:25:11 +00:00
|
|
|
# Pull a recent version of libstdc++
|
|
|
|
- libstdc++-6-dev
|
2017-05-30 22:15:39 +00:00
|
|
|
# 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
|
2017-11-27 22:04:35 +00:00
|
|
|
# Format using the latest and greatest
|
2018-01-29 16:25:51 +00:00
|
|
|
- clang-format-7
|
2017-05-30 22:15:39 +00:00
|
|
|
|
2017-10-31 18:59:55 +00:00
|
|
|
before_install:
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
|
|
|
|
|
2017-05-30 22:15:39 +00:00
|
|
|
install:
|
|
|
|
# Install dependencies required on OSX
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ninja; fi
|
2018-04-06 23:46:21 +00:00
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then pip2 install --user jinja2; fi
|
2017-05-30 22:15:39 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2017-11-23 22:22:23 +00:00
|
|
|
# Build the Vulkan backend on Linux
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export BUILD_VULKAN=1; else export BUILD_VULKAN=0; fi
|
|
|
|
|
2017-05-30 22:15:39 +00:00
|
|
|
# Build
|
|
|
|
- mkdir -p build
|
|
|
|
- cd build
|
|
|
|
- cmake --version
|
2018-07-18 11:52:46 +00:00
|
|
|
- cmake -G "Ninja" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDAWN_USE_WERROR=1 -DDAWN_ENABLE_VULKAN=$BUILD_VULKAN ..
|
2017-05-30 22:15:39 +00:00
|
|
|
- cmake --build .
|
|
|
|
|
|
|
|
# Test
|
2017-11-28 18:08:17 +00:00
|
|
|
- ./nxt_unittests
|
2017-11-27 22:04:35 +00:00
|
|
|
|
|
|
|
# Get out of the build dir
|
|
|
|
- cd ..
|
|
|
|
|
|
|
|
# Lint
|
2018-01-29 16:25:51 +00:00
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./scripts/travis_lint_format.sh clang-format-7; fi
|