-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
75 lines (63 loc) · 2.15 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
# Only non OpenGL components of Yocto/GL are built
# This Travis file is a heavily modified version of https://github.com/nlohmann/json
language: cpp
dist: xenial
sudo: required
matrix:
include:
- os: osx
osx_image: xcode10
- os: linux
compiler: gcc
env:
- COMPILER=g++-7
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
packages: ['g++-7', 'ninja-build']
# - os: linux
# compiler: clang
# env:
# - COMPILER=clang++-5.0
# - CMAKE_OPTIONS="-DYOCTO_OPENGL=OFF -DYOCTO_EMBREE=OFF"
# addons:
# apt:
# # sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0', 'sourceline': 'deb http://ppa.launchpad.net/keithw/glfw3/ubuntu trusty main']
# # packages: ['g++-6', 'clang-5.0', 'ninja-build', 'libgl1-mesa-dev', 'libglew-dev', 'libglfw3-dev']
# sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
# packages: ['g++-7', 'clang-5.0', 'ninja-build']
# - os: linux
# compiler: gcc
# env:
# - COMPILER=g++-8
# - CMAKE_OPTIONS="-DYOCTO_OPENGL=OFF -DYOCTO_EMBREE=OFF"
# addons:
# apt:
# # sources: ['ubuntu-toolchain-r-test', 'sourceline': 'deb http://ppa.launchpad.net/keithw/glfw3/ubuntu trusty main']
# # packages: ['g++-7', 'ninja-build', 'libgl1-mesa-dev', 'libglew-dev', 'libglfw3-dev']
# sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
# packages: ['g++-8', 'ninja-build']
branches:
only:
- master
- devel
script:
# get CMake and Ninja (only for systems with brew - macOS)
- |
if [[ (-x $(which brew)) ]]; then
brew update
brew install cmake ninja
cmake --version
fi
# make sure CXX is correctly set
- if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi
# show OS/compiler version
- uname -a
- $CXX --version
# compile and execute unit tests
- mkdir -p build && cd build
- cmake .. ${CMAKE_OPTIONS} -DpbrtParser_ENABLE_UNITTESTS=ON -GNinja && cmake --build . --config Release
# - if [[ (-x $(which brew)) ]]; then ctest -j 4; fi
# - ctest -j 4
- ./unittests
- cd ..