-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
230 lines (214 loc) · 5.22 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#
# Copyright (C) 2019 Assured Information Security, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# Configuration
#
language: cpp
dist: xenial
#
# Cache Dependencies
#
cache:
directories:
- ../cache
#
# Build Dependencies
#
before_script:
#
# Cache / Depends
#
- mkdir -p ../cache
#
# Build Enviornment
#
- mkdir -p build
- cd build
#
# Update GCC
#
- |
if [[ -f "/usr/bin/gcc-8" ]]; then
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100
fi
#
# Update CMake
#
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="http://www.cmake.org/files/v3.13/cmake-3.13.4-Linux-x86_64.tar.gz"
mkdir cmake
travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=$(pwd)/cmake/bin:${PATH}
fi
#
# Build Matrix
#
matrix:
include:
#
# Doxygen
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- doxygen
env:
- TEST="Doxygen"
script:
- cmake -DBUILD_DOCS=ON ..
- make docs
- |
if [[ -s ../doxygen_warnings.txt ]]; then
echo "You must fix doxygen before submitting a pull request"
echo ""
cat doxygen_warnings.txt
exit -1
fi
#
# Git Check
#
- os: linux
env:
- TEST="Git Check"
script:
- |
if [[ -n $(git diff --check HEAD^) ]]; then
echo "You must remove whitespace before submitting a pull request"
echo ""
git diff --check HEAD^
exit -1
fi
#
# Format
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
packages:
- clang-format-8
env:
- TEST="Format"
script:
- sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-8 100
- cmake ..
- make format
- |
if [[ -n $(git diff) ]]; then
echo "You must run make format before submitting a pull request"
echo ""
git diff
exit -1
fi
#
# Unit tests and static analysis
#
- os: linux
env:
- TEST="Tests"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- g++-8
script:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100
- git clone https://github.com/catchorg/catch2.git
- cd catch2
- mkdir build
- cd build
- cmake -DBUILD_TESTING=OFF ..
- sudo make install
- cd ../../
- cmake -DBUILD_TESTS=ON ..
- make
- make test
#
# Xen driver
#
- os: linux
env:
- TEST="Xen"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- g++-8
script:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100
- git clone https://github.com/connojd/xen.git -b xue
- cp ../include/xue.h xen/xen/include/xue.h
- cd xen
- ./configure --disable-tools --disable-stubdom --disable-docs
- make dist-xen -j3
#
# UEFI application
#
- os: linux
env:
- TEST="UEFI"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- g++-8
- gnu-efi
script:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100
- cd ../test
- make
#
# Bareflank
#
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
packages:
- gcc-8
- g++-8
- clang-8
- nasm
env:
- TEST="Bareflank"
script:
- export CLANG_BIN=/usr/bin/clang-8
- git clone https://github.com/connojd/hypervisor.git -b xue
- mkdir bfbuild
- cd bfbuild
- cmake -DCONFIG=travis_static -DCACHE_DIR=../../../cache -DXUE_DIR=../../ ../hypervisor
- make -j3