forked from jeremyong/klein
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
127 lines (114 loc) · 3.98 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
language: cpp
sudo: false
# Default to Ubuntu Bionic
os: linux
dist: bionic
branches:
only:
- master
- coverity_scan
env:
global:
# COVERITY_SCAN_TOKEN
- secure: 'R+LQViHn4EdJCzE3RU40ynnaSQVE+fTp4ipN8YzSBsIP7oUfTh64nJGyt7PmbAHYzF4dUYy9+KcDDdrF252grrzcLGo3HMrMONxmQ1RJUJnj1brLaGNRw2iwEA1qBm2pznDmOMrbXm7vjIfzVbx7Y7Orv658d85osT9rfWODgkpK9AYDm6SgMZrwpN9RR2Mzie6/hnBkTpmYvLtnwLBi20nkocxnMwMt5SMJ6voGciKqnO5yh77gODO0K7otcwJVruHRZ8ldCxFy3fb3+bGHuf/lYxR0IXlEz+zvCfmLrKQcVK8FGaUr53JJ9G2M+fGmB1UyDQHIktDxnYYQATphHEkLo6LsBc7APczb+l3C3CMAGipq4k7zMwBSCbviPrOOTfCDTNzFd6mF71PIdCu+9T29v8yECYUInRVzZMCj/2HEdlMdZvwWmXndCiP8iWIteTkAOerav2cGFhasB6yivKSgk8Z1l5kpFinnYgCFQkk/qLqD2SIzXA6mKhPPu9cvgi7PFqlSt6GE/pGh+iX4q/huYnDkxZZEwm4M2DgU6RDVzX78e+mQ3rby8varWlaTNjoZ7QKXcsvRPHEeH1EjgvJODgJlyCoU/oEK+VR3OtN4QaxIW3z70+rOlnJ3WHtokhElEotcXE1LSFL0DNPoMC+XIcUsGS1rl2b+jOdNrSA='
addons:
coverity_scan:
project:
name: 'jeremyong/Klein'
description: 'Build submitted via Travis CI'
notification_email: [email protected]
build_command_prepend: 'cmake -DENABLE_COVERAGE:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug .'
build_command: 'cmake --build .'
branch_pattern: coverity_scan
jobs:
include:
# MacOS Clang Debug
- env:
- CXX=clang++
- CC=clang
- BUILD_TYPE=Debug
os: osx
osx_image: xcode11.3
# MacOS Clang Release
- env:
- CXX=clang++
- CC=clang
- BUILD_TYPE=Release
os: osx
osx_image: xcode11.3
# Bionic Clang-9 Debug
- env:
- CXX=clang++-9
- CC=clang
- BUILD_TYPE=Debug
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-9
- ninja-build
# Bionic Clang-9 Release
- env:
- CXX=clang++-9
- CC=clang
- BUILD_TYPE=Release
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-9
- ninja-build
# Bionic GCC-9 Debug
- env:
- CXX=g++-9
- CC=gcc
- BUILD_TYPE=Debug
- ENABLE_GCOV=1
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- g++-9
- ninja-build
# Bionic GCC-9 Release
- env:
- CXX=g++-9
- CC=gcc
- BUILD_TYPE=Release
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- g++-9
- ninja-build
install:
- |
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew update
brew upgrade cmake
brew install ninja
export CMAKE=cmake
else
mkdir -p ${TRAVIS_BUILD_DIR}/tools
travis_retry wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-Linux-x86_64.tar.gz
tar -xf cmake-3.16.4-Linux-x86_64.tar.gz
mv cmake-3.16.4-Linux-x86_64 ${TRAVIS_BUILD_DIR}/tools/cmake
export PATH=${TRAVIS_BUILD_DIR}/tools/cmake/bin:$PATH
export CMAKE=${TRAVIS_BUILD_DIR}/tools/cmake/bin/cmake
fi
- ${CMAKE} --version
- ninja --version
before_script:
- ${CMAKE} -G Ninja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DKLEIN_ENABLE_PERF=OFF
- ${CMAKE} --build .
script:
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./klein_test && ./klein_test_sse42 && ./klein_test_glsl && ./klein_test_cxx11; fi
- if [ "${ENABLE_GCOV}" = 1 ]; then bash <(curl -s https://codecov.io/bash) -x gcov-9 -a "-s `pwd`"; fi