This repository has been archived by the owner on Aug 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy path.travis.yml
75 lines (61 loc) · 1.58 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
os:
- linux
- osx
# If linux, use precise
dist: trusty
sudo: false
language:
- cpp
python:
- "2.7"
env:
- BUILD_TYPE=Debug
- BUILD_TYPE=Release
compiler:
- clang
cache:
- pip
addons:
# Everything under apt is only used on linux
apt:
sources:
# PPA for clang 6.0
- llvm-toolchain-trusty-6.0
# PPA for clang-format 8
- llvm-toolchain-trusty
# PPA for a more recen libstdc++
- ubuntu-toolchain-r-test
packages:
# Get recent compilers
- clang-6.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
# Format using the latest and greatest
- clang-format-8
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 pip2 install --user jinja2; fi
script:
# Use the more recent compilers we just installed
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" == "clang++" ]; then export CXX="clang++-6.0" CC="clang-6.0"; fi
# Build
- mkdir -p build
- cd build
- cmake --version
- cmake -G "Ninja" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDAWN_USE_WERROR=1 ..
- cmake --build . -- -j 1
# Test
- ./dawn_unittests
# Get out of the build dir
- cd ..
# Lint
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./scripts/travis_lint_format.sh clang-format-8; fi