-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
191 lines (181 loc) · 6.21 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
# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
notifications:
email: false
language: cpp
# The |CFG| variable name is hooked up by the perfetto-ci.appspot.com frontend.
# Please keep infra/perfetto-ci.appspot.com/ updated when adding/removing
# entries below.
matrix:
include:
# OS X builds are processing too slow and block the queue.
# Commenting out until the problem is resolved.
# - os: osx
# osx_image: xcode8.3
# compiler: clang
# env: CFG=mac-clang-x86_64-release GN_ARGS="is_debug=false"
# - os: osx
# osx_image: xcode8.3
# compiler: clang
# env: CFG=mac-clang-x86_64-debug GN_ARGS="is_debug=true"
# - os: osx
# osx_image: xcode8.3
# compiler: clang
# env: CFG=mac-clang-x86_64-asan GN_ARGS="is_debug=false is_asan=true"
# - os: osx
# osx_image: xcode8.3
# compiler: clang
# env: CFG=mac-clang-x86_64-tsan GN_ARGS="is_debug=false is_tsan=true"
# - os: osx
# osx_image: xcode8.3
# compiler: clang
# env: CFG=mac-clang-x86_64-ubsan GN_ARGS="is_debug=false is_ubsan=true"
- os: linux
dist: xenial
sudo: false
# Test the system-version of clang, not our own at least in this config.
addons:
apt:
packages:
- clang
env: CFG=linux_trusty-clang-x86_64-debug GN_ARGS="is_debug=true is_hermetic_clang=false"
- os: linux
dist: xenial
sudo: false
compiler: clang
env: CFG=linux_trusty-clang-x86_64-tsan GN_ARGS="is_debug=false is_tsan=true"
- os: linux
dist: xenial
sudo: false
compiler: clang
env: CFG=linux_trusty-clang-x86_64-msan GN_ARGS="is_debug=false is_msan=true"
# TODO(b/117093687): ubsan always times out in Travis.
# Re-enable once that is fixed.
- os: linux
dist: xenial
sudo: true
compiler: clang
env: CFG=linux_trusty-clang-x86_64-asan_lsan GN_ARGS="is_debug=false is_asan=true is_lsan=true"
- os: linux
dist: xenial
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env: CFG=linux_trusty-gcc7-x86_64-release GN_ARGS="is_debug=false is_clang=false use_custom_libcxx=false cc=\"gcc-7\" cxx=\"g++-7\""
- os: linux
dist: xenial
sudo: false
compiler: clang
env: CFG=android-clang-arm-release GN_ARGS="is_debug=false target_os=\"android\" target_cpu=\"arm\""
- os: linux
dist: xenial
sudo: true
compiler: clang
env: CFG=android-clang-arm-asan GN_ARGS="is_debug=false target_os=\"android\" target_cpu=\"arm\" is_asan=true"
- os: linux
dist: xenial
sudo: true
compiler: clang
env: CFG=linux_trusty-clang-x86_64-libfuzzer GN_ARGS="is_clang=true is_debug=false is_fuzzer=true is_asan=true"
- os: linux
dist: xenial
sudo: false
compiler: clang
env: CFG=ui-clang-x86_64-release GN_ARGS="is_debug=false is_clang=true"
- os: linux
dist: xenial
sudo: false
compiler: clang
env: CFG=ui-clang-x86_64-debug GN_ARGS="is_debug=true is_clang=true"
# Cache the deps that get git-pulled to avoid hitting quota limits (b/68252114).
# Do not cache NDK/SDK and things that come from .zip files rather than git.
# Doing that is discouraged (https://docs.travis-ci.com/user/caching/).
cache:
timeout: 1800 # 30 mins
directories:
- buildtools/android-core
- buildtools/benchmark
- buildtools/bionic
- buildtools/emulator
- buildtools/googletest
- buildtools/jsoncpp
- buildtools/libbacktrace
- buildtools/libcxx
- buildtools/libcxxabi
- buildtools/libfuzzer
- buildtools/libunwind
- buildtools/linenoise
- buildtools/lzma
before_install:
- set -e
- echo "$CFG" && echo "$GN_ARGS"
- export ASAN_SYMBOLIZER_PATH="$(which llvm-symbolizer
|| echo /usr/bin/llvm-symbolizer-*)"
- pip install --user protobuf
install:
- |
if [[ "$CFG" == android-* ]]; then
tools/install-build-deps
elif [[ "$CFG" == ui-* ]]; then
tools/install-build-deps --no-android --ui
else
tools/install-build-deps --no-android
fi
- |
if [[ -e buildtools/clang/bin/llvm-symbolizer ]]; then
export ASAN_SYMBOLIZER_PATH="buildtools/clang/bin/llvm-symbolizer"
fi
script:
- tools/gn gen out/dist --args="${GN_ARGS}" --check
- |
if [[ "$CFG" == ui-* ]]; then
tools/ninja -C out/dist ui 2>&1 | grep -v "no version information"
elif [[ "$CFG" == *-libfuzzer ]]; then
tools/ninja -C out/dist fuzzers
else
tools/ninja -C out/dist
fi
- |
TEST_TARGETS="
perfetto_integrationtests
perfetto_unittests
"
if [[ "$CFG" == ui-* ]]; then
out/dist/ui_unittests --ci
elif [[ "$CFG" == *-libfuzzer ]]; then
# Run a single iteration each to make sure they are not crashing.
for fuzzer in $(find out/dist -name '*_fuzzer' -executable); do
$fuzzer -runs=1
done
elif [[ "$CFG" == android-* ]]; then
TARGET_ARCH=$(echo $CFG | cut -d- -f3)
tools/run_android_emulator --pid /tmp/emulator.pid -v &
for TEST_TARGET in $TEST_TARGETS; do
tools/run_android_test out/dist "$TEST_TARGET"
done
tools/run_android_test --env BENCHMARK_FUNCTIONAL_TEST_ONLY=true out/dist "perfetto_benchmarks"
else
for TEST_TARGET in $TEST_TARGETS; do
"out/dist/$TEST_TARGET"
done
BENCHMARK_FUNCTIONAL_TEST_ONLY=true out/dist/perfetto_benchmarks
tools/diff_test_trace_processor.py --test-type=queries out/dist/trace_processor_shell
tools/diff_test_trace_processor.py --test-type=metrics out/dist/trace_processor_shell
fi
after_script:
- test -f /tmp/emulator.pid && kill -9 $(cat /tmp/emulator.pid); true