-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
150 lines (138 loc) · 4.44 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
language: cpp
sudo: false
notifications:
email: false
matrix:
include:
# Clang on OSX
- os: osx
env: C_COMPILER=clang CXX_COMPILER=clang++ DEPLOY_PAGES=0
osx_image: xcode9.4
compiler: clang
- os: osx
env: C_COMPILER=clang CXX_COMPILER=clang++ DEPLOY_PAGES=0
osx_image: xcode10
compiler: clang
- os: osx
env: C_COMPILER=clang CXX_COMPILER=clang++ DEPLOY_PAGES=0
osx_image: xcode10.2
compiler: clang
# Clang on Linux
- os: linux
dist: xenial
env: C_COMPILER=clang-5.0 && CXX_COMPILER=clang++-5.0 DEPLOY_PAGES=0
addons: &clang50
apt:
packages:
- clang-5.0
- g++-7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-5.0
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- os: linux
dist: xenial
env: C_COMPILER=clang-6.0 && CXX_COMPILER=clang++-6.0 DEPLOY_PAGES=1
addons: &clang60
apt:
packages:
- clang-6.0
- g++-7
- doxygen
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-6.0
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- os: linux
dist: xenial
env: C_COMPILER=clang-7 && CXX_COMPILER=clang++-7 DEPLOY_PAGES=0
addons: &clang70
apt:
packages:
- clang-7
- g++-7
- doxygen
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-7
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
#GCC on Linux
- os: linux
dist: xenial
env: C_COMPILER=gcc-6 && CXX_COMPILER=g++-6 DEPLOY_PAGES=0
addons: &gcc6
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: xenial
env: C_COMPILER=gcc-7 && CXX_COMPILER=g++-7 DEPLOY_PAGES=0
addons: &gcc7
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: xenial
env: C_COMPILER=gcc-8 && CXX_COMPILER=g++-8 DEPLOY_PAGES=0
addons: &gcc8
apt:
packages:
- g++-8
sources:
- ubuntu-toolchain-r-test
branches:
except:
- gh-pages
before_install:
- export CC=${C_COMPILER}
- export CXX=${CXX_COMPILER}
- ${CC} --version
- ${CXX} --version
- git clone --branch release-1.8.0 --depth 1 https://github.com/google/googletest.git
- cd googletest && mkdir build
- cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=$HOME/gtest-root -Bbuild -H.
- cmake --build build -- -j 2
- cmake --build build --target install
- cd ..
- git clone https://github.com/oneapi-src/oneTBB.git --branch v2020.3 tbb
- cd tbb
- make work_dir=$(pwd)/build-tbb tbb_root=$(pwd)
- mkdir $HOME/tbb-root && cp -r include $HOME/tbb-root/
- mkdir $HOME/tbb-root/lib && cp $(pwd)/build-tbb_release/libtbb* $HOME/tbb-root/lib/
- cd ..
- git clone --depth 1 --branch v1.4.1 https://github.com/google/benchmark.git
- cd benchmark
- mkdir build
- cd build
- cmake .. -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=$HOME/benchmark-root
- make
- make install
- cd ../..
script:
- mkdir build-release
- cmake -DCMAKE_BUILD_TYPE=Release -DSHAD_RUNTIME_SYSTEM=TBB -DGTEST_ROOT=$HOME/gtest-root -DTBB_ROOT=$HOME/tbb-root -Dbenchmark_ROOT=$HOME/benchmark-root -Bbuild-release -H.
- cmake --build build-release -- -j 2
- cmake --build build-release --target test -- ARGS="--output-on-failure"
# Generate documentation
after_success:
- test $DEPLOY_PAGES = 1 &&
pip install --user -r docs/requirements.txt &&
cd $TRAVIS_BUILD_DIR &&
mkdir build-doxygen && cd build-doxygen && cmake .. -DSHAD_ENABLE_UNIT_TEST=OFF -DSHAD_ENABLE_DOXYGEN=ON &&
make docs && touch $TRAVIS_BUILD_DIR/build-doxygen/docs/html/.nojekyll
deploy:
provider: pages
local-dir: $TRAVIS_BUILD_DIR/build-doxygen/docs/html
skip-cleanup: true
github-token: $DOCS_DEPLOY_TOKEN
keep-history: true
on:
branch: master
condition: $DEPLOY_PAGES = 1