forked from DynamoRIO/dynamorio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
229 lines (217 loc) · 10.2 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
# **********************************************************
# Copyright (c) 2016-2020 Google, Inc. All rights reserved.
# **********************************************************
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of Google, Inc. nor the names of its contributors may be
# used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
# Travis CI configuration:
notifications:
email:
# This overrides the default of sending to the committer and author.
recipients:
on_success: change
on_failure: always
# Don't run Travis on pushes to feature branches: pull requests cover those.
branches:
only:
- master
# We use Xenial.
sudo: required
dist: xenial
osx_image: xcode11.3
language:
- c
# We use a jobs include approach rather than an os, compiler, env matrix
# with excludes so we can use conditional builds (plus it's clearer this way).
# For packages, "type = cron" is for the real cron builds, and the env var
# TRAVIS_EVENT_TYPE is set for manually-triggered package builds (that
# same env var is set by Travis for "type = cron" but the env var is not
# set during job matrix setup: only once a job starts).
jobs:
include:
#######################################################################
# Regular test jobs:
# 32-bit Linux build with gcc and run tests:
- if: type != cron AND env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS="32_only"
# 64-bit Linux build with gcc and run tests:
- if: type != cron AND env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS="64_only"
# AArchXX cross-compile with gcc, no tests:
- if: type != cron AND env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=yes DEPLOY=no
# Android ARM cross-compile with gcc, no tests:
- if: type != cron AND env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_ANDROID_ONLY=yes DEPLOY=no DYNAMORIO_ANDROID_TOOLCHAIN='/tmp/android-gcc-arm-ndk-10e'
# 64-bit Linux build with clang, no tests (runsuite.cmake disables the tests),
# install and require clang-format.
# We used to build 32-bit with clang but have decided that is not worth
# the Travis resources: 64-bit hits most clang-only warnings and 64-bit
# is the primary target these days.
- if: type != cron AND env(TRAVIS_EVENT_TYPE) != cron
os: linux
compiler: clang
# We need clang 9.0 to avoid a compiler bug: i#3989.
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS="64_only require_format" CC=clang-9 && CXX=clang++-9
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-9
- clang-format-6.0
# 64-bit OSX build with clang and run tests:
- if: type != cron AND env(TRAVIS_EVENT_TYPE) != cron
os: osx
# gcc on Travis claims to not be CMAKE_COMPILER_IS_GNUCC so we only run clang.
compiler: clang
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS=64_only
#######################################################################
# Package jobs
# Linux x86 + amd64:
- if: type = cron OR env(TRAVIS_EVENT_TYPE) = cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=yes DEPLOY_DOCS=yes
# Linux AArch64:
- if: type = cron OR env(TRAVIS_EVENT_TYPE) = cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=yes DEPLOY=yes EXTRA_ARGS=64_only
# Linux ARM:
- if: type = cron OR env(TRAVIS_EVENT_TYPE) = cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=yes DEPLOY=yes EXTRA_ARGS=32_only
# Android ARM:
- if: type = cron OR env(TRAVIS_EVENT_TYPE) = cron
os: linux
compiler: gcc
env: DYNAMORIO_CROSS_ANDROID_ONLY=yes DYNAMORIO_ANDROID_TOOLCHAIN='/tmp/android-gcc-arm-ndk-10e' DEPLOY=yes EXTRA_ARGS=32_only
# For C/C++ there is no default install, so we set "install", not "before_install".
install:
- uname -a
# FIXME: remove the "brew update" step once Travis fixes their Mac VM's
# on 11/15/17. Xref https://github.com/travis-ci/travis-ci/issues/8552.
- if [[ "`uname`" == "Darwin" ]]; then brew update; brew install nasm; fi
- >
if [[ "`uname`" == "Linux" ]]; then
sudo apt-get -y install doxygen vera++ cmake zlib1g-dev libsnappy-dev; fi
# Install multilib for non-cross-compiling Linux builds:
- >
if [[ "`uname`" == "Linux" && $DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY == no ]]; then
sudo apt-get -y install g++-multilib; fi
# Install cross-compilers for cross-compiling Linux build:
- >
if [[ "`uname`" == "Linux" && $DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY == yes ]]; then
sudo apt-get -y install g++-arm-linux-gnueabihf g++-aarch64-linux-gnu; fi
# Fetch and install Android NDK for Andoid cross-compile build only.
- >
if [[ "`uname`" == "Linux" && $DYNAMORIO_CROSS_ANDROID_ONLY == yes ]]; then
cd /tmp
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
unzip -q android-ndk-r10e-linux-x86_64.zip
android-ndk-r10e/build/tools/make-standalone-toolchain.sh --arch=arm \
--toolchain=arm-linux-androideabi-4.9 \
--platform=android-21 \
--install-dir=/tmp/android-gcc-arm-ndk-10e
# Manually force using ld.bfd, setting CMAKE_LINKER does not work.
ln -sf ld.bfd /tmp/android-gcc-arm-ndk-10e/arm-linux-androideabi/bin/ld
ln -sf arm-linux-androideabi-ld.bfd /tmp/android-gcc-arm-ndk-10e/bin/arm-linux-androideabi-ld
cd -
fi
# Include Dr. Memory in cronbuild packages.
# We do shallow clones and assume DrM will update its DR at least once
# every 250 DR commits.
- >
if [[ "`uname`" == "Linux" && $TRAVIS_EVENT_TYPE == cron ]]; then
git clone --depth=2 https://github.com/DynamoRIO/drmemory.git drmemory
cd drmemory && git submodule update --init --depth 250 && cd ..
fi
# i#4126: Despite the incremental output from runsuite_wrapper's stdout tee
# and alarm prints, Travis still kills our jobs. The workaround is to use
# travis_wait, which ironically removes all incremental output and dumps
# it all at the end.
script:
- travis_wait 45 suite/runsuite_wrapper.pl travis $EXTRA_ARGS
# We switch to package.cmake for these builds in runsuite_wrapper.pl by looking
# for $TRAVIS_EVENT_TYPE=="cron".
# The before_deploy commands are run before each deployer, so they are also
# run for DEPLOY_DOCS. We'll just have a git tag failure since it exists.
before_deploy:
- git config --local user.name "Travis Auto-Tag"
- git config --local user.email "[email protected]"
# XXX: for now we duplicate this version number here with CMakeLists.txt.
# We should find a way to share (xref i#1565).
# We support setting VERSION_NUMBER for manual builds to override all
# parts of the version. If a build is included (leading dash and number
# at the end), it will be parsed and passed to package.cmake. We only
# use a non-zero build number when making multiple manual builds in one day.
- >
if test -z "${VERSION_NUMBER}"; then
export GIT_TAG="cronbuild-8.0.$((`git log -n 1 --format=%ct` / (60*60*24)))"
else
export GIT_TAG="release_${VERSION_NUMBER}"
fi
# We handle races among our 4 package jobs by ignoring failure here.
# XXX: That could mask a real failure: we could try to distinguish the
# type of error.
- (git tag $GIT_TAG -a -m "Travis auto-generated tag for build $TRAVIS_BUILD_NUMBER." || true)
deploy:
- provider: releases
api_key:
secure: V3kgcRiwijjpmcSuVio1+/oZ8cqJGaVlL42hN0w/jjO6LoELy2kknT5h80H7wMVKpZnMg+2v/yWj5hawlrwh8nCS51lYllPHN7K+ivzkyJ3R4cp1WAzL56vnYFYz1/twYpeS10Zl6JL6wt788WcibpShMOIlAnXnm1kU9BBVtYE=
file_glob: true
file: "DynamoRIO*.tar.gz"
skip_cleanup: true
# The name must just be the tag in order to match Appveyor.
name: $GIT_TAG
# This body is clobbered by Appveyor.
body: "Auto-generated periodic build (Travis build $TRAVIS_BUILD_NUMBER)."
on:
repo: DynamoRIO/dynamorio
branch: master
condition: $TRAVIS_EVENT_TYPE = cron && $DEPLOY = yes
- provider: pages
repo: DynamoRIO/dynamorio_docs
target_branch: master
local_dir: html
github_token:
secure: NBkUMgYuNa8E2PG28I6I99BbZMXpA6TN67WHHwARVR02hXT2IgvSUyHLHNnp+aLiebRHrZ9ZbcO0icB2t/edZjBIUl2giJPY01FArDqB0CXKuzNzLUe7O3YJFygjroUEs4XPfyYydl+cwxPUm26Gzd36CLh8nA4KO6j+wrEA+KA=
skip_cleanup: true
on:
branch: master
condition: $TRAVIS_EVENT_TYPE = cron && $DEPLOY_DOCS = yes